Skip to content

exceptions

openml.exceptions #

ObjectNotPublishedError #

ObjectNotPublishedError(message: str)

Bases: PyOpenMLError

Indicates an object has not been published yet.

Source code in openml/exceptions.py
def __init__(self, message: str):
    self.message = message
    super().__init__(message)

OpenMLCacheException #

OpenMLCacheException(message: str)

Bases: PyOpenMLError

Dataset / task etc not found in cache

Source code in openml/exceptions.py
def __init__(self, message: str):
    self.message = message
    super().__init__(message)

OpenMLHashException #

OpenMLHashException(message: str)

Bases: PyOpenMLError

Locally computed hash is different than hash announced by the server.

Source code in openml/exceptions.py
def __init__(self, message: str):
    self.message = message
    super().__init__(message)

OpenMLNotAuthorizedError #

OpenMLNotAuthorizedError(message: str)

Bases: OpenMLServerError

Indicates an authenticated user is not authorized to execute the requested action.

Source code in openml/exceptions.py
def __init__(self, message: str):
    self.message = message
    super().__init__(message)

OpenMLPrivateDatasetError #

OpenMLPrivateDatasetError(message: str)

Bases: PyOpenMLError

Exception thrown when the user has no rights to access the dataset.

Source code in openml/exceptions.py
def __init__(self, message: str):
    self.message = message
    super().__init__(message)

OpenMLRunsExistError #

OpenMLRunsExistError(run_ids: set[int], message: str)

Bases: PyOpenMLError

Indicates run(s) already exists on the server when they should not be duplicated.

Source code in openml/exceptions.py
def __init__(self, run_ids: set[int], message: str) -> None:
    if len(run_ids) < 1:
        raise ValueError("Set of run ids must be non-empty.")
    self.run_ids = run_ids
    super().__init__(message)

OpenMLServerError #

OpenMLServerError(message: str)

Bases: PyOpenMLError

class for when something is really wrong on the server (result did not parse to dict), contains unparsed error.

Source code in openml/exceptions.py
def __init__(self, message: str):
    self.message = message
    super().__init__(message)

OpenMLServerException #

OpenMLServerException(message: str, code: int | None = None, url: str | None = None)

Bases: OpenMLServerError

exception for when the result of the server was not 200 (e.g., listing call w/o results).

Source code in openml/exceptions.py
def __init__(self, message: str, code: int | None = None, url: str | None = None):
    self.message = message
    self.code = code
    self.url = url
    super().__init__(message)

OpenMLServerNoResult #

OpenMLServerNoResult(message: str, code: int | None = None, url: str | None = None)

Bases: OpenMLServerException

Exception for when the result of the server is empty.

Source code in openml/exceptions.py
def __init__(self, message: str, code: int | None = None, url: str | None = None):
    self.message = message
    self.code = code
    self.url = url
    super().__init__(message)

PyOpenMLError #

PyOpenMLError(message: str)

Bases: Exception

Base class for all exceptions in OpenML-Python.

Source code in openml/exceptions.py
def __init__(self, message: str):
    self.message = message
    super().__init__(message)