Skip to main content

A standard format for offline reinforcement learning datasets, with popular reference datasets and related utilities.

Project description

pre-commit Code style: black

Minari is a Python library for conducting research in offline reinforcement learning, akin to an offline version of Gymnasium or an offline RL version of HuggingFace's datasets library. This library is currently in beta.

The documentation website is at minari.farama.org. We also have a public discord server (which we use for Q&A and to coordinate development work) that you can join here: https://discord.gg/bnJ6kubTg6.

Note: Minari was previously developed under the name Kabuki.

Installation

To install Minari from PyPI:

pip install minari

Note that currently Minari is under a beta release. If you'd like to start testing or contribute to Minari please install this project from source with:

git clone https://github.com/Farama-Foundation/Minari.git
cd Minari
pip install -e .

Command Line API

To check available remote datasets:

minari list remote

To download a dataset:

minari download door-human-v1

To check available local datasets:

minari list local

To show the details of a dataset:

minari show door-human-v1

For the list of commands:

minari --help

Basic Usage

Reading a dataset

import minari

dataset = minari.load_dataset("door-human-v1")

for episode_data in dataset.iterate_episodes():
    ...

Writing a dataset

import minari
import gymnasium as gym
from minari import DataCollector


env = gym.make('LunarLander-v2')
env = DataCollector(env)

for _ in range(100):
    env.reset()
    done = False
    while not done:
        action = ...
        obs, rew, terminated, truncated, info = env.step(action)
        done = terminated or truncated

dataset = env.create_dataset("LunarLander-v2-test-v0")

For other examples, see Basic Usage. For a complete tutorial on how to create new datasets using Minari, see our Pointmaze D4RL Dataset tutorial, which re-creates the Maze2D datasets from D4RL.

Project Maintainers

Main Contributors: Rodrigo Perez-Vicente, Omar Younis, John Balis

Maintenance for this project is also contributed by the broader Farama team: farama.org/team.


Minari is a shortening of Minarai, the Japanese word for "learning by observation".

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minari-0.4.3.tar.gz (40.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

minari-0.4.3-py3-none-any.whl (42.8 kB view details)

Uploaded Python 3

File details

Details for the file minari-0.4.3.tar.gz.

File metadata

  • Download URL: minari-0.4.3.tar.gz
  • Upload date:
  • Size: 40.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for minari-0.4.3.tar.gz
Algorithm Hash digest
SHA256 973d29fd35c7fa39de3da0631abe23586634a630e609ff33f6d0c76668a1d213
MD5 b48c4421d296337b974ac1a848e155af
BLAKE2b-256 3cbb9dafd891d509d43774f5648dd20db8a9bca05ccec9310acf80790ac2cb8e

See more details on using hashes here.

File details

Details for the file minari-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: minari-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 42.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for minari-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 306aa166e5cee6bca5e7ebbf494b6b3e833af14cc9d6b3653357d035cb278cb6
MD5 89c47f54e93b20ffb93c1f0f7bc4c5e3
BLAKE2b-256 068b0d5cb18cdaf87b124f789415af1dfda6736625d92cfe6aa98ad2a610fe2e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page