@@ -357,7 +357,7 @@ def make_run_report(
357
357
full_dataset : list ,
358
358
client : docker .DockerClient ,
359
359
run_id : str
360
- ):
360
+ ) -> Path :
361
361
"""
362
362
Make a final evaluation and run report of the instances that have been run.
363
363
Also reports on images and containers that may still running!
@@ -367,6 +367,9 @@ def make_run_report(
367
367
full_dataset (list): List of all instances
368
368
client (docker.DockerClient): Docker client
369
369
run_id (str): Run ID
370
+
371
+ Returns:
372
+ Path to report file
370
373
"""
371
374
# instantiate sets to store IDs of different outcomes
372
375
completed_ids = set ()
@@ -453,6 +456,7 @@ def make_run_report(
453
456
"error_ids" : list (sorted (error_ids )),
454
457
"unstopped_containers" : list (sorted (unstopped_containers )),
455
458
"unremoved_images" : list (sorted (unremoved_images )),
459
+ "schema_version" : 2 ,
456
460
}
457
461
report_file = Path (
458
462
list (predictions .values ())[0 ]["model_name_or_path" ].replace ("/" , "__" )
@@ -462,6 +466,7 @@ def make_run_report(
462
466
with open (report_file , "w" ) as f :
463
467
print (json .dumps (report , indent = 4 ), file = f )
464
468
print (f"Report written to { report_file } " )
469
+ return report_file
465
470
466
471
467
472
def get_gold_predictions (dataset_name : str , split : str ):
0 commit comments