Skip to content

Parsing of results_path in Evaluate class is strange #1

Description

@JohnGiorgi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions