The results filepath that is automatically determined in the Evaluate class is really brittle
|
with open( |
|
self.results_path |
|
+ self.prediction_file.split("_")[-2].split("/")[-1] |
|
+ "_results.json", |
|
"w", |
|
) as f: |
|
json.dump(oc_eval_results, f, indent=2) |
I am not sure what the original intention was but its makes it difficult to provide a non-default argument for results_path. A better solution would just to allow a user to provide an output JSON filepath directly, or make it explicit they are providing a directory, and come up with a default filename.
The results filepath that is automatically determined in the
Evaluateclass is really brittleOCW/ocw/evaluate_only_connect.py
Lines 110 to 116 in ff77ce5
I am not sure what the original intention was but its makes it difficult to provide a non-default argument for
results_path. A better solution would just to allow a user to provide an output JSON filepath directly, or make it explicit they are providing a directory, and come up with a default filename.