Skip to content

backend

openml._api.setup.backend #

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 Config instance is created.

TYPE: Config

ATTRIBUTE DESCRIPTION
dataset

Interface for dataset-related API operations.

TYPE: DatasetAPI

task

Interface for task-related API operations.

TYPE: TaskAPI

evaluation_measure

Interface for evaluation measure-related API operations.

TYPE: EvaluationMeasureAPI

estimation_procedure

Interface for estimation procedure-related API operations.

TYPE: EstimationProcedureAPI

evaluation

Interface for evaluation-related API operations.

TYPE: EvaluationAPI

flow

Interface for flow-related API operations.

TYPE: FlowAPI

study

Interface for study-related API operations.

TYPE: StudyAPI

run

Interface for run-related API operations.

TYPE: RunAPI

setup

Interface for setup-related API operations.

TYPE: SetupAPI

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
@classmethod
def get_instance(cls) -> APIBackend:
    """
    Get the singleton instance of the APIBackend.

    Returns
    -------
    APIBackend
        Singleton instance of the backend.
    """
    if cls._instance is None:
        cls._instance = cls()
    return cls._instance