evaluation
openml._api.resources.evaluation
#
EvaluationV1API
#
EvaluationV1API(http: HTTPClient, minio: MinIOClient)
Bases: ResourceV1API, EvaluationAPI
V1 API implementation for evaluations. Fetches evaluations from the v1 XML API endpoint.
Source code in openml/_api/resources/base/base.py
delete
#
Delete a resource using the V1 API.
| PARAMETER | DESCRIPTION |
|---|---|
resource_id
|
Identifier of the resource to delete.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the resource type is not supported for deletion. |
OpenMLNotAuthorizedError
|
If the user is not permitted to delete the resource. |
OpenMLServerError
|
If deletion fails for an unknown reason. |
OpenMLServerException
|
For other server-side errors. |
Source code in openml/_api/resources/base/versions.py
list
#
list(limit: int, offset: int, *, function: str, tasks: list | None = None, setups: list | None = None, flows: list | None = None, runs: list | None = None, uploaders: list | None = None, study: int | None = None, sort_order: str | None = None, **kwargs: Any) -> list[OpenMLEvaluation]
Retrieve evaluations from the OpenML v1 XML API.
This method builds an evaluation query URL based on the provided filters, sends a request to the OpenML v1 endpoint, parses the XML response into a dictionary, and enriches the result with uploader usernames.
| PARAMETER | DESCRIPTION |
|---|---|
The
|
|
ones
|
|
limit
|
the number of evaluations to return
TYPE:
|
offset
|
the number of evaluations to skip, starting from the first
TYPE:
|
function
|
the evaluation function. e.g., predictive_accuracy
TYPE:
|
tasks
|
the list of task IDs
TYPE:
|
setups
|
the list of setup IDs
TYPE:
|
flows
|
the list of flow IDs
TYPE:
|
runs
|
the list of run IDs
TYPE:
|
uploaders
|
the list of uploader IDs
TYPE:
|
study
|
TYPE:
|
kwargs
|
Legal filter operators: tag, per_fold
TYPE:
|
sort_order
|
order of sorting evaluations, ascending ("asc") or descending ("desc")
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list of OpenMLEvaluation objects
|
|
Notes
This method performs two API calls: 1. Fetches evaluation data from the specified endpoint 2. Fetches user information for all uploaders in the evaluation data
The user information is used to map uploader IDs to usernames.
Source code in openml/_api/resources/evaluation.py
publish
#
Publish a new resource using the V1 API.
| PARAMETER | DESCRIPTION |
|---|---|
path
|
API endpoint path for the upload.
TYPE:
|
files
|
Files to upload as part of the request payload.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
int
|
Identifier of the newly created resource. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the server response does not contain a valid resource ID. |
OpenMLServerException
|
If the server returns an error during upload. |
Source code in openml/_api/resources/base/versions.py
tag
#
Add a tag to a resource using the V1 API.
| PARAMETER | DESCRIPTION |
|---|---|
resource_id
|
Identifier of the resource to tag.
TYPE:
|
tag
|
Tag to associate with the resource.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list of str
|
Updated list of tags assigned to the resource. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the resource type does not support tagging. |
OpenMLServerException
|
If the server returns an error. |
Source code in openml/_api/resources/base/versions.py
untag
#
Remove a tag from a resource using the V1 API.
| PARAMETER | DESCRIPTION |
|---|---|
resource_id
|
Identifier of the resource to untag.
TYPE:
|
tag
|
Tag to remove from the resource.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list of str
|
Updated list of tags assigned to the resource. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the resource type does not support tagging. |
OpenMLServerException
|
If the server returns an error. |
Source code in openml/_api/resources/base/versions.py
EvaluationV2API
#
EvaluationV2API(http: HTTPClient, minio: MinIOClient)
Bases: ResourceV2API, EvaluationAPI
V2 API implementation for evaluations. Fetches evaluations from the v2 json API endpoint.
Source code in openml/_api/resources/base/base.py
list
#
list(limit: int, offset: int, *, function: str, tasks: list | None = None, setups: list | None = None, flows: list | None = None, runs: list | None = None, uploaders: list | None = None, study: int | None = None, sort_order: str | None = None, **kwargs: Any) -> list[OpenMLEvaluation]
Retrieve evaluation results from the OpenML v2 JSON API.
Notes
This method is not yet implemented.