Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Rename results_path
Browse files
src/backend/run_eval_suite_harness.py
CHANGED
@@ -72,15 +72,15 @@ def run_evaluation(
|
|
72 |
dumped = json.dumps(results, indent=2)
|
73 |
logger.info(dumped)
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
|
79 |
logger.info(evaluator.make_table(results))
|
80 |
|
81 |
API.upload_file(
|
82 |
-
path_or_fileobj=
|
83 |
-
path_in_repo=
|
84 |
repo_id=results_repo,
|
85 |
repo_type="dataset",
|
86 |
)
|
|
|
72 |
dumped = json.dumps(results, indent=2)
|
73 |
logger.info(dumped)
|
74 |
|
75 |
+
results_path = Path(local_dir, eval_request.model, f"results_{datetime.now()}.json")
|
76 |
+
results_path.parent.mkdir(exist_ok=True, parents=True)
|
77 |
+
results_path.write_text(dumped)
|
78 |
|
79 |
logger.info(evaluator.make_table(results))
|
80 |
|
81 |
API.upload_file(
|
82 |
+
path_or_fileobj=results_path,
|
83 |
+
path_in_repo=results_path.relative_to(local_dir).as_posix(),
|
84 |
repo_id=results_repo,
|
85 |
repo_type="dataset",
|
86 |
)
|