Registry / data / openml

openml

JSON →
library0.15.1pypypi✓ verified 83d ago

OpenML Python API for downloading, uploading, and managing datasets, tasks, runs, and flows on OpenML.org. Current version 0.15.1, requires Python >=3.8. Released under BSD license. Active development with periodic releases.

pip install openml
INSTALL
IMPORT
SIG · OPENML
O
openml
datapythonv0.15.1
Install
18.8s avg
Import
5602ms
Disk
523MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.15.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 18.8s · import 5.602s · 511MB
523MB installed
● package 523MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

openml
import openml
from openml import *
Wildcard imports discouraged; use explicit submodules like openml.datasets.
openml.datasets
from openml.datasets import get_dataset
from openml.datasets import list_datasets
list_datasets is deprecated, use openml.datasets.list_datasets() or openml.datasets.get_dataset_list().
openml.tasks
from openml.tasks import get_task
import openml.tasks as tasks
That works, but ensure using correct function names.

Setup OpenML, list datasets, download and inspect the Iris dataset.

import openml openml.config.apikey = openml.config.get_api_key() # uses ~/.openml/config or environment # List datasets datasets = openml.datasets.list_datasets() print(f"Number of datasets: {len(datasets)}") # Download a dataset (iris) dataset = openml.datasets.get_dataset(61) X, y, categorical_names, attribute_names = dataset.get_data(target=dataset.default_target_attribute) print(X.head())
Debug
Known issues
breakingIn version 0.14, the `get_dataset` method changed from returning a tuple to returning a `OpenMLDataset` object. Calling `get_data()` now returns four values (X, y, categorical_indicator, attribute_names) instead of previously different structure.
fix
Update code to use `X, y, categorical, names = dataset.get_data(target=...)`.
affects: >=0.14
deprecated`openml.datasets.list_datasets()` is deprecated; use `openml.datasets.get_dataset_list()` or pass parameters to `list_datasets()`.
fix
Replace `list_datasets()` with `get_dataset_list()` or use `list_datasets(size=...)` etc.
affects: >=0.14
gotchaAPI key configuration requires either setting OPENML_API_KEY env var or creating a ~/.openml/config file. Without it, many functions raise OpenMLServerError (401).
fix
Set env var or file: `openml.config.apikey = 'your_apikey'`. Get key from openml.org.
affects: all
Errors
Common errors & fixes
openml.exceptions.OpenMLServerError: The request has not been authorized (401)
Missing or invalid OpenML API key.
fix
Set API key via environment variable OPENML_API_KEY or openml.config.apikey = '...'
AttributeError: 'int' object has no attribute 'get' (when calling get_dataset with wrong ID)
Dataset ID does not exist or is not an integer. Function expects integer ID but may receive something else.
fix
Ensure dataset ID is valid integer. Use list_datasets() to check existing IDs.
ModuleNotFoundError: No module named 'openml'
OpenML not installed or installed in different environment.
fix
Run `pip install openml` and ensure correct Python environment is active.
Upgrade
Version history
0.15.1latest on PyPI · released Jan 25, 2025
Audit
Dependencies
pandasrequiredData handling for datasets and runs
requestsrequiredHTTP communication with OpenML server
scikit-learnrequiredMachine learning utilities (e.g., check_consistent_length)
xmltodictrequiredParsing XML responses from OpenML
liac-arffrequiredARFF file format support
Agent activity
2 hits · last 30 days
node
2
Resources
openml — pip install openml · libregistry