task
openml._api.resources.task
#
TaskV1API
#
TaskV1API(http: HTTPClient, minio: MinIOClient)
Bases: ResourceV1API, TaskAPI
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
download_split
#
Download a task's split file and return its path in the cache.
| PARAMETER | DESCRIPTION |
|---|---|
url
|
URL of the split file.
TYPE:
|
refresh_cache
|
Whether to replace the file if it is already cached.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Path
|
|
Source code in openml/_api/resources/task.py
get
#
get(task_id: int) -> OpenMLTask
Download OpenML task for a given task ID.
Downloads the task representation.
| PARAMETER | DESCRIPTION |
|---|---|
task_id
|
The OpenML task id of the task to download.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
task
|
TYPE:
|
Source code in openml/_api/resources/task.py
list
#
list(limit: int, offset: int, task_type: TaskType | int | None = None, *, estimation_procedures: list[dict[str, Any]], **kwargs: Any) -> DataFrame
Perform the api call to return a number of tasks having the given filters.
| PARAMETER | DESCRIPTION |
|---|---|
Filter
|
|
it
|
|
type
|
|
limit
|
TYPE:
|
offset
|
TYPE:
|
task_type
|
Refers to the type of task.
TYPE:
|
estimation_procedures
|
All estimation procedures on OpenML, used to resolve the procedure ids returned by the listing into names.
TYPE:
|
kwargs
|
Legal filter operators: tag, task_id (list), data_tag, status, limit, offset, data_id, data_name, number_instances, number_features, number_classes, number_missing_values.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dataframe
|
|
Source code in openml/_api/resources/task.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
TaskV2API
#
TaskV2API(http: HTTPClient, minio: MinIOClient)
Bases: ResourceV2API, TaskAPI
Source code in openml/_api/resources/base/base.py
download_split
#
Download a task's split file and return its path in the cache.
| PARAMETER | DESCRIPTION |
|---|---|
url
|
URL of the split file.
TYPE:
|
refresh_cache
|
Whether to replace the file if it is already cached.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Path
|
|
Source code in openml/_api/resources/task.py
get
#
get(task_id: int) -> OpenMLTask
Download OpenML task for a given task ID.
Downloads the task representation.
| PARAMETER | DESCRIPTION |
|---|---|
task_id
|
The OpenML task id of the task to download.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
task
|
TYPE:
|