Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
alozowski
commited on
Commit
·
a13949e
1
Parent(s):
b1a0884
add submission size checker
Browse files- src/submission/submit.py +5 -2
src/submission/submit.py
CHANGED
@@ -70,6 +70,11 @@ def add_new_eval(
|
|
70 |
except Exception as e:
|
71 |
return styled_error("Could not get your model information. Please fill it up properly.")
|
72 |
|
|
|
|
|
|
|
|
|
|
|
73 |
# Check for duplicate submission
|
74 |
if f"{model}_{model_info.sha}_{precision}" in REQUESTED_MODELS:
|
75 |
return styled_warning("This model has been already submitted.")
|
@@ -91,8 +96,6 @@ def add_new_eval(
|
|
91 |
if architectures:
|
92 |
architecture = ";".join(architectures)
|
93 |
|
94 |
-
model_size = get_model_size(model_info=model_info, precision=precision)
|
95 |
-
|
96 |
# Were the model card and license filled?
|
97 |
try:
|
98 |
model_info.cardData["license"]
|
|
|
70 |
except Exception as e:
|
71 |
return styled_error("Could not get your model information. Please fill it up properly.")
|
72 |
|
73 |
+
# Check model size early
|
74 |
+
model_size = get_model_size(model_info=model_info, precision=precision)
|
75 |
+
if model_size > 100:
|
76 |
+
return styled_error(f"You can't submit this model, since it's too big for one node evaluation. Model size: {model_size} billion parameters")
|
77 |
+
|
78 |
# Check for duplicate submission
|
79 |
if f"{model}_{model_info.sha}_{precision}" in REQUESTED_MODELS:
|
80 |
return styled_warning("This model has been already submitted.")
|
|
|
96 |
if architectures:
|
97 |
architecture = ";".join(architectures)
|
98 |
|
|
|
|
|
99 |
# Were the model card and license filled?
|
100 |
try:
|
101 |
model_info.cardData["license"]
|