Spaces:
Sleeping
Sleeping
Update compute_model_property.py
Browse files- compute_model_property.py +5 -14
compute_model_property.py
CHANGED
@@ -293,28 +293,19 @@ def return_output():
|
|
293 |
|
294 |
model_checkpoint = "sgugger/glue-mrpc"
|
295 |
dataset_name = "nyu-mll/glue"
|
296 |
-
metric = ["glue", "mrpc"]
|
297 |
|
298 |
print(model_checkpoint, dataset_name, metric)
|
299 |
|
300 |
model_checkpoint = model_checkpoint
|
301 |
raw_datasets = load_dataset(dataset_name, "mrpc")
|
302 |
-
metric = load("glue", "mrpc")
|
303 |
#tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
304 |
output = compute_model_card_evaluation_results(model_checkpoint, raw_datasets, metric)
|
305 |
|
306 |
-
return
|
307 |
-
|
308 |
-
|
309 |
-
"
|
310 |
-
"eval_model_preparation_time": 0.0012,
|
311 |
-
"eval_runtime": 6.6806,
|
312 |
-
"eval_samples_per_second": 61.073,
|
313 |
-
"eval_steps_per_second": 3.892
|
314 |
-
}
|
315 |
-
|
316 |
-
if __name__ == "__main__":
|
317 |
-
uvicorn.run(app, host="0.0.0.0", port=8080, log_level="debug")
|
318 |
|
319 |
"""
|
320 |
in_container = True
|
|
|
293 |
|
294 |
model_checkpoint = "sgugger/glue-mrpc"
|
295 |
dataset_name = "nyu-mll/glue"
|
|
|
296 |
|
297 |
print(model_checkpoint, dataset_name, metric)
|
298 |
|
299 |
model_checkpoint = model_checkpoint
|
300 |
raw_datasets = load_dataset(dataset_name, "mrpc")
|
301 |
+
#metric = load("glue", "mrpc")
|
302 |
#tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
303 |
output = compute_model_card_evaluation_results(model_checkpoint, raw_datasets, metric)
|
304 |
|
305 |
+
return output
|
306 |
+
|
307 |
+
#if __name__ == "__main__":
|
308 |
+
# uvicorn.run(app, host="0.0.0.0", port=8080, log_level="debug")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
|
310 |
"""
|
311 |
in_container = True
|