Spaces:
Running
Running
Update app.py
Browse filesremoving `weight_type`
app.py
CHANGED
@@ -97,7 +97,6 @@ def add_new_eval(
|
|
97 |
repo_id: str,
|
98 |
revision: str,
|
99 |
precision: str,
|
100 |
-
weight_type: str,
|
101 |
task: str,
|
102 |
):
|
103 |
model_owner = repo_id.split("/")[0]
|
@@ -111,16 +110,6 @@ def add_new_eval(
|
|
111 |
#if revision == "":
|
112 |
revision = "main"
|
113 |
|
114 |
-
# Is the model on the hub?
|
115 |
-
#if weight_type in ["Delta", "Adapter"]:
|
116 |
-
# base_model_on_hub, error, _ = is_model_on_hub(model_name=base_model, revision=revision, token=TOKEN, test_tokenizer=True)
|
117 |
-
# if not base_model_on_hub:
|
118 |
-
# return styled_error(f'Base model "{base_model}" {error}')
|
119 |
-
|
120 |
-
#if not weight_type == "Adapter":
|
121 |
-
# model_on_hub, error, _ = is_model_on_hub(model_name=model, revision=revision, token=TOKEN, test_tokenizer=True)
|
122 |
-
# if not model_on_hub:
|
123 |
-
# return styled_error(f'Model "{model}" {error}')
|
124 |
|
125 |
# Is the model info correctly filled?
|
126 |
try:
|
@@ -149,7 +138,6 @@ def add_new_eval(
|
|
149 |
"model": repo_id,
|
150 |
"revision": revision,
|
151 |
"precision": precision,
|
152 |
-
"weight_type": weight_type,
|
153 |
"status": "PENDING",
|
154 |
"submitted_time": current_time,
|
155 |
"task": task,
|
@@ -164,7 +152,7 @@ def add_new_eval(
|
|
164 |
# return styled_warning("This model has been already submitted.")
|
165 |
|
166 |
|
167 |
-
out_file = f"{model_name}_eval_request_{precision}
|
168 |
temp_out_path = f"./temp/{REQUESTS_DATASET_PATH}/{model_owner}/"
|
169 |
temp_out_file = f"./temp/{REQUESTS_DATASET_PATH}/{model_owner}/{out_file}"
|
170 |
print("Making directory to output results at %s" % temp_out_path)
|
@@ -204,7 +192,7 @@ with gr.Blocks() as demo:
|
|
204 |
revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
|
205 |
task = gr.Dropdown(
|
206 |
choices=tasks,
|
207 |
-
label="
|
208 |
multiselect=False,
|
209 |
interactive=True,
|
210 |
)
|
@@ -217,13 +205,6 @@ with gr.Blocks() as demo:
|
|
217 |
value="float16",
|
218 |
interactive=True,
|
219 |
)
|
220 |
-
weight_type = gr.Dropdown(
|
221 |
-
choices=[i.value.name for i in WeightType],
|
222 |
-
label="Weights type",
|
223 |
-
multiselect=False,
|
224 |
-
value="Original",
|
225 |
-
interactive=True,
|
226 |
-
)
|
227 |
|
228 |
with gr.Row():
|
229 |
with gr.Column():
|
@@ -235,7 +216,6 @@ with gr.Blocks() as demo:
|
|
235 |
model_name_textbox,
|
236 |
revision_name_textbox,
|
237 |
precision,
|
238 |
-
weight_type,
|
239 |
task,
|
240 |
],
|
241 |
outputs=submission_result,
|
|
|
97 |
repo_id: str,
|
98 |
revision: str,
|
99 |
precision: str,
|
|
|
100 |
task: str,
|
101 |
):
|
102 |
model_owner = repo_id.split("/")[0]
|
|
|
110 |
#if revision == "":
|
111 |
revision = "main"
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
# Is the model info correctly filled?
|
115 |
try:
|
|
|
138 |
"model": repo_id,
|
139 |
"revision": revision,
|
140 |
"precision": precision,
|
|
|
141 |
"status": "PENDING",
|
142 |
"submitted_time": current_time,
|
143 |
"task": task,
|
|
|
152 |
# return styled_warning("This model has been already submitted.")
|
153 |
|
154 |
|
155 |
+
out_file = f"{model_name}_eval_request_{precision}.json"
|
156 |
temp_out_path = f"./temp/{REQUESTS_DATASET_PATH}/{model_owner}/"
|
157 |
temp_out_file = f"./temp/{REQUESTS_DATASET_PATH}/{model_owner}/{out_file}"
|
158 |
print("Making directory to output results at %s" % temp_out_path)
|
|
|
192 |
revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
|
193 |
task = gr.Dropdown(
|
194 |
choices=tasks,
|
195 |
+
label="Choose a benchmark task",
|
196 |
multiselect=False,
|
197 |
interactive=True,
|
198 |
)
|
|
|
205 |
value="float16",
|
206 |
interactive=True,
|
207 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
|
209 |
with gr.Row():
|
210 |
with gr.Column():
|
|
|
216 |
model_name_textbox,
|
217 |
revision_name_textbox,
|
218 |
precision,
|
|
|
219 |
task,
|
220 |
],
|
221 |
outputs=submission_result,
|