setup
openml._api.setup
#
APIBackend
#
Central backend for accessing all OpenML API resource interfaces.
This class provides a singleton interface to dataset, task, flow,
evaluation, run, setup, study, and other resource APIs. It also
manages configuration through a nested Config object and
allows dynamic retrieval and updating of configuration values.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
Optional configuration object. If not provided, a default
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
dataset |
Interface for dataset-related API operations.
TYPE:
|
task |
Interface for task-related API operations.
TYPE:
|
evaluation_measure |
Interface for evaluation measure-related API operations.
TYPE:
|
estimation_procedure |
Interface for estimation procedure-related API operations.
TYPE:
|
evaluation |
Interface for evaluation-related API operations.
TYPE:
|
flow |
Interface for flow-related API operations.
TYPE:
|
study |
Interface for study-related API operations.
TYPE:
|
run |
Interface for run-related API operations.
TYPE:
|
setup |
Interface for setup-related API operations.
TYPE:
|
get_instance
classmethod
#
get_instance() -> APIBackend
Get the singleton instance of the APIBackend.
| RETURNS | DESCRIPTION |
|---|---|
APIBackend
|
Singleton instance of the backend. |
Source code in openml/_api/setup/backend.py
APIBackendBuilder
#
APIBackendBuilder(api_version: APIVersion, fallback_api_version: APIVersion | None = None)
Builder for constructing API backend instances with all resource-specific APIs.
This class organizes resource-specific API objects (datasets, tasks, flows, evaluations, runs, setups, studies, etc.) and provides a centralized access point for both the primary API version and an optional fallback API version.
The constructor automatically initializes:
- HTTPClient for the primary API version
- Optional HTTPClient for a fallback API version
- MinIOClient for file storage operations
- Resource-specific API instances, optionally wrapped with fallback proxies
| PARAMETER | DESCRIPTION |
|---|---|
api_version
|
The primary API version to use for all resource APIs and HTTP communication.
TYPE:
|
fallback_api_version
|
Optional fallback API version to wrap resource APIs with a FallbackProxy.
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
dataset |
API interface for dataset resources.
TYPE:
|
task |
API interface for task resources.
TYPE:
|
evaluation_measure |
API interface for evaluation measure resources.
TYPE:
|
estimation_procedure |
API interface for estimation procedure resources.
TYPE:
|
evaluation |
API interface for evaluation resources.
TYPE:
|
flow |
API interface for flow resources.
TYPE:
|
study |
API interface for study resources.
TYPE:
|
run |
API interface for run resources.
TYPE:
|
setup |
API interface for setup resources.
TYPE:
|
http_client |
Client for HTTP communication using the primary API version.
TYPE:
|
fallback_http_client |
Client for HTTP communication using the fallback API version, if provided.
TYPE:
|
minio_client |
Client for file storage operations (MinIO/S3).
TYPE:
|