Spaces:
Runtime error
Runtime error
Aaron Mueller
commited on
Commit
•
9b785e1
1
Parent(s):
43332b1
test resultst
Browse files- app.py +0 -6
- src/submission/submit.py +7 -7
app.py
CHANGED
@@ -71,12 +71,6 @@ def init_leaderboard(dataframe, track):
|
|
71 |
),
|
72 |
search_columns=[AutoEvalColumn.model.name, AutoEvalColumn.license.name],
|
73 |
hide_columns=[c.name for c in fields(AutoEvalColumn) if c.hidden],
|
74 |
-
filter_columns=[
|
75 |
-
ColumnFilter(AutoEvalColumn.model_type.name, type="checkboxgroup", label="Model types"),
|
76 |
-
ColumnFilter(
|
77 |
-
AutoEvalColumn.still_on_hub.name, type="boolean", label="Deleted/incomplete", default=True
|
78 |
-
),
|
79 |
-
],
|
80 |
bool_checkboxgroup_label="Hide models",
|
81 |
interactive=False,
|
82 |
)
|
|
|
71 |
),
|
72 |
search_columns=[AutoEvalColumn.model.name, AutoEvalColumn.license.name],
|
73 |
hide_columns=[c.name for c in fields(AutoEvalColumn) if c.hidden],
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
bool_checkboxgroup_label="Hide models",
|
75 |
interactive=False,
|
76 |
)
|
src/submission/submit.py
CHANGED
@@ -31,7 +31,7 @@ def add_new_eval(
|
|
31 |
|
32 |
user_name = ""
|
33 |
model_path = model_name
|
34 |
-
if "/" in
|
35 |
user_name = model_name.split("/")[0]
|
36 |
model_path = model_name.split("/")[1]
|
37 |
|
@@ -58,13 +58,13 @@ def add_new_eval(
|
|
58 |
return styled_error(f'Base model "{base_model}" {error}')
|
59 |
|
60 |
if not weight_type == "Adapter":
|
61 |
-
model_on_hub, error, _ = is_model_on_hub(model_name=
|
62 |
if not model_on_hub:
|
63 |
-
return styled_error(f'Model "{
|
64 |
|
65 |
# Is the model info correctly filled?
|
66 |
try:
|
67 |
-
model_info = API.model_info(repo_id=
|
68 |
except Exception:
|
69 |
return styled_error("Could not get your model information. Please fill it up properly.")
|
70 |
|
@@ -76,7 +76,7 @@ def add_new_eval(
|
|
76 |
except Exception:
|
77 |
return styled_error("Please select a license for your model")
|
78 |
|
79 |
-
modelcard_OK, error_msg = check_model_card(
|
80 |
if not modelcard_OK:
|
81 |
return styled_error(error_msg)
|
82 |
|
@@ -101,7 +101,7 @@ def add_new_eval(
|
|
101 |
}
|
102 |
|
103 |
# Check for duplicate submission
|
104 |
-
if f"{
|
105 |
return styled_warning("This model has been already submitted.")
|
106 |
|
107 |
print("Creating eval file")
|
@@ -118,7 +118,7 @@ def add_new_eval(
|
|
118 |
path_in_repo=out_path.split("eval-queue/")[1],
|
119 |
repo_id=QUEUE_REPO,
|
120 |
repo_type="dataset",
|
121 |
-
commit_message=f"Add {
|
122 |
)
|
123 |
|
124 |
# Remove the local file
|
|
|
31 |
|
32 |
user_name = ""
|
33 |
model_path = model_name
|
34 |
+
if "/" in model_name:
|
35 |
user_name = model_name.split("/")[0]
|
36 |
model_path = model_name.split("/")[1]
|
37 |
|
|
|
58 |
return styled_error(f'Base model "{base_model}" {error}')
|
59 |
|
60 |
if not weight_type == "Adapter":
|
61 |
+
model_on_hub, error, _ = is_model_on_hub(model_name=model_name, revision=revision, token=TOKEN, test_tokenizer=True)
|
62 |
if not model_on_hub:
|
63 |
+
return styled_error(f'Model "{model_name}" {error}')
|
64 |
|
65 |
# Is the model info correctly filled?
|
66 |
try:
|
67 |
+
model_info = API.model_info(repo_id=model_name, revision=revision)
|
68 |
except Exception:
|
69 |
return styled_error("Could not get your model information. Please fill it up properly.")
|
70 |
|
|
|
76 |
except Exception:
|
77 |
return styled_error("Please select a license for your model")
|
78 |
|
79 |
+
modelcard_OK, error_msg = check_model_card(model_name)
|
80 |
if not modelcard_OK:
|
81 |
return styled_error(error_msg)
|
82 |
|
|
|
101 |
}
|
102 |
|
103 |
# Check for duplicate submission
|
104 |
+
if f"{model_name}_{revision}_{precision}" in REQUESTED_MODELS:
|
105 |
return styled_warning("This model has been already submitted.")
|
106 |
|
107 |
print("Creating eval file")
|
|
|
118 |
path_in_repo=out_path.split("eval-queue/")[1],
|
119 |
repo_id=QUEUE_REPO,
|
120 |
repo_type="dataset",
|
121 |
+
commit_message=f"Add {model_name} to eval queue",
|
122 |
)
|
123 |
|
124 |
# Remove the local file
|