Skip to main content
    OpenML Logo

    OpenML-Python

    Python Logo

The Python API for a World of Data and More 💫

Latest Release Python Versions Downloads License

Installation | Documentation | Contribution guidelines

OpenML-Python provides an easy-to-use and straightforward Python interface for OpenML, an online platform for open science collaboration in machine learning. It can download or upload data from OpenML, such as datasets and machine learning experiment results.

🕹️ Minimal Example

Use the following code to get the credit-g dataset:

import openml

dataset = openml.datasets.get_dataset("credit-g") # or by ID get_dataset(31)
X, y, categorical_indicator, attribute_names = dataset.get_data(target="class")

Get a task for supervised classification on credit-g:

import openml

task = openml.tasks.get_task(31)
dataset = task.get_dataset()
X, y, categorical_indicator, attribute_names = dataset.get_data(target=task.target_name)
# get splits for the first fold of 10-fold cross-validation
train_indices, test_indices = task.get_train_test_split_indices(fold=0)

Use an OpenML benchmarking suite to get a curated list of machine-learning tasks:

import openml

suite = openml.study.get_suite("amlb-classification-all")  # Get a curated list of tasks for classification
for task_id in suite.tasks:
    task = openml.tasks.get_task(task_id)

🪄 Installation

OpenML-Python is supported on Python 3.8 - 3.13 and is available on Linux, MacOS, and Windows.

You can install OpenML-Python with:

pip install openml

📄 Citing OpenML-Python

If you use OpenML-Python in a scientific publication, we would appreciate a reference to the following paper:

Matthias Feurer, Jan N. van Rijn, Arlind Kadra, Pieter Gijsbers, Neeratyoy Mallik, Sahithya Ravi, Andreas Müller, Joaquin Vanschoren, Frank Hutter
OpenML-Python: an extensible Python API for OpenML
Journal of Machine Learning Research, 22(100):1−5, 2021

Bibtex entry:

@article{JMLR:v22:19-920,
  author  = {Matthias Feurer and Jan N. van Rijn and Arlind Kadra and Pieter Gijsbers and Neeratyoy Mallik and Sahithya Ravi and Andreas Müller and Joaquin Vanschoren and Frank Hutter},
  title   = {OpenML-Python: an extensible Python API for OpenML},
  journal = {Journal of Machine Learning Research},
  year    = {2021},
  volume  = {22},
  number  = {100},
  pages   = {1--5},
  url     = {http://jmlr.org/papers/v22/19-920.html}
}

Metadata

Release files for openml 0.15.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openml 0.15.1
File Size Uploaded
openml-0.15.1.tar.gz 146.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openml 0.15.1
File Interpreter ABI Platform
openml-0.15.1-py3-none-any.whl Python 3 none any Details

Total release size: 306.5 kB

Release files / openml-0.15.1.tar.gz

Download URL openml-0.15.1.tar.gz
Size 146.1 kB
Tags Source
SHA-256 checksum
How to use checksums
58ae3840b6ea736bb6c69bcbb30d587b817f64db070dc691adb9e09b99018816
BLAKE2b-256 checksum
How to use checksums
889b729dc6377bbfdbf0828d5567a335670d4e7c2866065ca4593ab525a5809c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release files / openml-0.15.1-py3-none-any.whl

Download URL openml-0.15.1-py3-none-any.whl
Size 160.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14d25afb7a3007a70da26b0d1f46cf93df6f5784c31dd76d6a415066c6051961
BLAKE2b-256 checksum
How to use checksums
4af3462c16d9e80177d22a036abd3df0f114bf311e566ff906adbb3d82790c20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.15.1 This release

2 release files

0.14.2

1 release file

0.14.1

1 release file

0.14.0

1 release file

0.13.1

1 release file

0.13.0

2 release files

0.12.2

1 release file

0.12.1

1 release file

0.12.0

1 release file

0.11.0

1 release file

0.10.2

1 release file

0.10.1

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page