flow
openml._api.resources.flow
#
FlowV1API
#
FlowV1API(http: HTTPClient, minio: MinIOClient)
Bases: ResourceV1API, FlowAPI
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
#
Check if a flow exists on the OpenML server.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
The name of the flow.
TYPE:
|
external_version
|
The external version of the flow.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
int | bool
|
The flow ID if the flow exists, False otherwise. |
Source code in openml/_api/resources/flow.py
get
#
get(flow_id: int, *, reset_cache: bool = False) -> OpenMLFlow
Get a flow from the OpenML server.
| PARAMETER | DESCRIPTION |
|---|---|
flow_id
|
The ID of the flow to retrieve.
TYPE:
|
reset_cache
|
Whether to reset the cache for this request.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
OpenMLFlow
|
The retrieved flow object. |
Source code in openml/_api/resources/flow.py
list
#
list(limit: int | None = None, offset: int | None = None, tag: str | None = None, uploader: str | None = None) -> DataFrame
List flows on the OpenML server.
| PARAMETER | DESCRIPTION |
|---|---|
limit
|
The maximum number of flows to return. By default, all flows are returned.
TYPE:
|
offset
|
The number of flows to skip before starting to collect the result set. By default, no flows are skipped.
TYPE:
|
tag
|
The tag to filter flows by. By default, no tag filtering is applied.
TYPE:
|
uploader
|
The user to filter flows by. By default, no user filtering is applied.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
DataFrame
|
A DataFrame containing the list of flows. |
Source code in openml/_api/resources/flow.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
FlowV2API
#
FlowV2API(http: HTTPClient, minio: MinIOClient)
Bases: ResourceV2API, FlowAPI
Source code in openml/_api/resources/base/base.py
exists
#
Check if a flow exists on the OpenML v2 server.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
The name of the flow.
TYPE:
|
external_version
|
The external version of the flow.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
int | bool
|
The flow ID if the flow exists, False otherwise. |
Source code in openml/_api/resources/flow.py
get
#
get(flow_id: int, *, reset_cache: bool = False) -> OpenMLFlow
Get a flow from the OpenML v2 server.
| PARAMETER | DESCRIPTION |
|---|---|
flow_id
|
The ID of the flow to retrieve.
TYPE:
|
reset_cache
|
Whether to reset the cache for this request.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
OpenMLFlow
|
The retrieved flow object. |