Result Class¶
-
class
modelindex.models.Result.Result(task: str, dataset: str, metrics: Dict, _filepath: Optional[str] = None)[source]¶ Result represents a model result on a particular benchmark.
- Parameters
task (str) – The name of the ML task
dataset (str) – The name of the dataset
metrics (dict) – A dictionary of metrics
_filepath (str) – Path to the file where the data was loaded from
-
__init__(task: str, dataset: str, metrics: Dict, _filepath: Optional[str] = None)[source]¶ - Parameters
task (str) – The name of the ML task
dataset (str) – The name of the dataset
metrics (dict) – A dictionary of metrics
_filepath (str) – Path to the file where the data was loaded from
-
static
from_dict(d: Dict, _filepath: Optional[str] = None)[source]¶ Create a Result from a dict.
- Parameters
d (dict) – dictionary containing result data
_filepath (str) – The file path to where the data was loaded from
-
static
from_file(filepath: Optional[str] = None, parent_filepath: Optional[str] = None)[source]¶ Load a Result from a file.
- Parameters
filepath (str) – File from which to load the result
parent_filepath (str) – Parent filename (if file is imported from another file)
-
property
dataset¶ Get the dataset name
-
property
task¶ Get the ML task name
-
property
metrics¶ Get the dictionary of metrics