class openml.runs.OpenMLRun(task_id, flow_id, dataset_id, setup_string=None, output_files=None, setup_id=None, tags=None, uploader=None, uploader_name=None, evaluations=None, fold_evaluations=None, sample_evaluations=None, data_content=None, trace=None, model=None, task_type=None, task_evaluation_measure=None, flow_name=None, parameter_settings=None, predictions_url=None, task=None, flow=None, run_id=None, description_text=None, run_details=None)

OpenML Run: result of running a model on an openml dataset.

task_id: int
flow_id: int
dataset_id: int
setup_string: str
output_files: Dict[str, str]

A dictionary that specifies where each related file can be found.

setup_id: int
tags: List[str]
uploader: int

User ID of the uploader.

uploader_name: str
evaluations: Dict
fold_evaluations: Dict
sample_evaluations: Dict
data_content: List[List]

The predictions generated from executing this run.

trace: OpenMLRunTrace
model: object
task_type: str
task_evaluation_measure: str
flow_name: str
parameter_settings: List[OrderedDict]
predictions_url: str
task: OpenMLTask
flow: OpenMLFlow
run_id: int
description_text: str, optional

Description text to add to the predictions file. If left None, is set to the time the arff file is generated.

run_details: str, optional (default=None)

Description of the run stored in the run meta-data.

classmethod from_filesystem(directory: str, expect_model: bool = True)

The inverse of the to_filesystem method. Instantiates an OpenMLRun object based on files stored on the file system.


a path leading to the folder where the results are stored


if True, it requires the model pickle to be present, and an error will be thrown if not. Otherwise, the model might or might not be present.


the re-instantiated run object

get_metric_fn(sklearn_fn, kwargs=None)

Calculates metric scores based on predicted values. Assumes the run has been executed locally (and contains run_data). Furthermore, it assumes that the ‘correct’ or ‘truth’ attribute is specified in the arff (which is an optional field, but always the case for openml-python runs)


a function pointer to a sklearn function that accepts y_true, y_pred and **kwargs


a list of floats, of length num_folds * num_repeats

property id: Optional[int]

The id of the entity, it is unique for its entity type.


Opens the OpenML web page corresponding to this object in your default browser.

property openml_url: Optional[str]

The URL of the object on the server, if it was uploaded, else None.

push_tag(tag: str)

Annotates this entity with a tag on the server.


Tag to attach to the flow.

remove_tag(tag: str)

Removes a tag from this entity on the server.


Tag to attach to the flow.

to_filesystem(directory: str, store_model: bool = True) None

The inverse of the from_filesystem method. Serializes a run on the filesystem, to be uploaded later.


a path leading to the folder where the results will be stored. Should be empty

store_modelbool, optional (default=True)

if True, a model will be pickled as well. As this is the most storage expensive part, it is often desirable to not store the model.

classmethod url_for_id(id_: int) str

Return the OpenML URL for the object of the class entity with the given id.