setup
openml._api.resources.setup
#
SetupV1API
#
SetupV1API(http: HTTPClient, minio: MinIOClient)
Bases: ResourceV1API, SetupAPI
V1 XML API implementation for setups.
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
exists
#
exists(flow: OpenMLFlow, param_settings: list[dict[str, Any]]) -> int | bool
Checks whether a hyperparameter configuration already exists on the server.
| PARAMETER | DESCRIPTION |
|---|---|
flow
|
The openml flow object. Should have flow id present for the main flow and all subflows (i.e., it should be downloaded from the server by means of flow.get, and not instantiated locally)
TYPE:
|
list
|
A list of dicts, where each dict has the following entries: oml:name : str: The OpenML parameter name oml:value : mixed: A representation of the parameter value oml:component : int: flow id to which the parameter belongs
|
| RETURNS | DESCRIPTION |
|---|---|
setup_id
|
setup id iff exists, False otherwise
TYPE:
|
Source code in openml/_api/resources/setup.py
get
#
get(setup_id: int) -> OpenMLSetup
Downloads the setup (configuration) description from OpenML and returns a structured object
| PARAMETER | DESCRIPTION |
|---|---|
setup_id
|
The Openml setup_id
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
OpenMLSetup
|
An initialized OpenMLSetup object parsed from the XML |
Source code in openml/_api/resources/setup.py
list
#
list(limit: int, offset: int, *, setup: Iterable[int] | None = None, flow: int | None = None, tag: str | None = None) -> list[OpenMLSetup]
Perform API call /setup/list/{filters}
| PARAMETER | DESCRIPTION |
|---|---|
The
|
|
filters
|
|
limit
|
TYPE:
|
offset
|
TYPE:
|
setup
|
TYPE:
|
flow
|
TYPE:
|
tag
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list
|
setups that match the filters, going from id to the OpenMLSetup object. |
Source code in openml/_api/resources/setup.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
SetupV2API
#
SetupV2API(http: HTTPClient, minio: MinIOClient)
Bases: ResourceV2API, SetupAPI
V2 JSoN API implementation for setups.