run
openml.runs.run
#
OpenMLRun
#
OpenMLRun(task_id: int, flow_id: int | None, dataset_id: int | None, setup_string: str | None = None, output_files: dict[str, int] | None = None, setup_id: int | None = None, tags: list[str] | None = None, uploader: int | None = None, uploader_name: str | None = None, evaluations: dict | None = None, fold_evaluations: dict | None = None, sample_evaluations: dict | None = None, data_content: list[list] | None = None, trace: OpenMLRunTrace | None = None, model: object | None = None, task_type: str | None = None, task_evaluation_measure: str | None = None, flow_name: str | None = None, parameter_settings: list[dict[str, Any]] | None = None, predictions_url: str | None = None, task: OpenMLTask | None = None, flow: OpenMLFlow | None = None, run_id: int | None = None, description_text: str | None = None, run_details: str | None = None)
Bases: OpenMLBase
OpenML Run: result of running a model on an OpenML dataset.
| PARAMETER | DESCRIPTION |
|---|---|
task_id
|
The ID of the OpenML task associated with the run.
TYPE:
|
flow_id
|
The ID of the OpenML flow associated with the run.
TYPE:
|
dataset_id
|
The ID of the OpenML dataset used for the run.
TYPE:
|
setup_string
|
The setup string of the run.
TYPE:
|
output_files
|
Specifies where each related file can be found.
TYPE:
|
setup_id
|
An integer representing the ID of the setup used for the run.
TYPE:
|
tags
|
Representing the tags associated with the run.
TYPE:
|
uploader
|
User ID of the uploader.
TYPE:
|
uploader_name
|
The name of the person who uploaded the run.
TYPE:
|
evaluations
|
Representing the evaluations of the run.
TYPE:
|
fold_evaluations
|
The evaluations of the run for each fold.
TYPE:
|
sample_evaluations
|
The evaluations of the run for each sample.
TYPE:
|
data_content
|
The predictions generated from executing this run.
TYPE:
|
trace
|
The trace containing information on internal model evaluations of this run.
TYPE:
|
model
|
The untrained model that was evaluated in the run.
TYPE:
|
task_type
|
The type of the OpenML task associated with the run.
TYPE:
|
task_evaluation_measure
|
The evaluation measure used for the task.
TYPE:
|
flow_name
|
The name of the OpenML flow associated with the run.
TYPE:
|
parameter_settings
|
Representing the parameter settings used for the run.
TYPE:
|
predictions_url
|
The URL of the predictions file.
TYPE:
|
task
|
An instance of the OpenMLTask class, representing the OpenML task associated with the run.
TYPE:
|
flow
|
An instance of the OpenMLFlow class, representing the OpenML flow associated with the run.
TYPE:
|
run_id
|
The ID of the run.
TYPE:
|
description_text
|
Description text to add to the predictions file. If left None, is set to the time the arff file is generated.
TYPE:
|
run_details
|
Description of the run stored in the run meta-data.
TYPE:
|
Source code in openml/runs/run.py
openml_url
property
#
The URL of the object on the server, if it was uploaded, else None.
from_filesystem
classmethod
#
from_filesystem(directory: str | Path, expect_model: bool = True) -> OpenMLRun
The inverse of the to_filesystem method. Instantiates an OpenMLRun object based on files stored on the file system.
| PARAMETER | DESCRIPTION |
|---|---|
directory
|
a path leading to the folder where the results are stored
TYPE:
|
expect_model
|
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.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
run
|
the re-instantiated run object
TYPE:
|
Source code in openml/runs/run.py
get_metric_fn
#
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)
| PARAMETER | DESCRIPTION |
|---|---|
sklearn_fn
|
a function pointer to a sklearn function that
accepts
TYPE:
|
kwargs
|
kwargs for the function
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
scores
|
metric results
TYPE:
|
Source code in openml/runs/run.py
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 | |
open_in_browser
#
Opens the OpenML web page corresponding to this object in your default browser.
Source code in openml/base.py
publish
#
publish() -> OpenMLBase
Publish the object on the OpenML server.
Source code in openml/base.py
push_tag
#
Annotates this entity with a tag on the server.
| PARAMETER | DESCRIPTION |
|---|---|
tag
|
Tag to attach to the flow.
TYPE:
|
remove_tag
#
Removes a tag from this entity on the server.
| PARAMETER | DESCRIPTION |
|---|---|
tag
|
Tag to attach to the flow.
TYPE:
|
to_filesystem
#
The inverse of the from_filesystem method. Serializes a run on the filesystem, to be uploaded later.
| PARAMETER | DESCRIPTION |
|---|---|
directory
|
a path leading to the folder where the results will be stored. Should be empty
TYPE:
|
store_model
|
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.
TYPE:
|
Source code in openml/runs/run.py
url_for_id
classmethod
#
Return the OpenML URL for the object of the class entity with the given id.