Skip to main content

Easy-to-use D4RL offline dataset loader

Project description

just-d4rl

Easy-to-use D4RL offline dataset loader

Installation

pip install just-d4rl

Usage

from just_d4rl import D4RLDataset, d4rl_offline_dataset

dataset = d4rl_offline_dataset("hopper-medium-v2")
dataset = d4rl_offline_dataset("walker2d-random-v2")
dataset = d4rl_offline_dataset("halfcheetah-medium-expert-v2")
dataset = d4rl_offline_dataset("antmaze-umaze-v2")

dataset = d4rl_offline_dataset("hopper-medium-v2")
dataset['observations'].shape, dataset['actions'].shape, dataset['rewards'].shape, dataset['next_observations'].shape, dataset['terminals'].shape
# ((1000000, 11),
#  (1000000, 11),
#  (1000000, 3),
#  (1000000,),
#  (1000000,))


dataset = d4rl_offline_dataset("hopper-medium-v2")
dataset = D4RLDataset(d4rl_dataset)

batch = dataset[-16:]
batch["observation"].shape, batch["action"].shape, batch["reward"].shape, batch["next_observation"].shape, batch["terminal"].shape
# (torch.Size([16, 11]),
#  torch.Size([16, 3]),
#  torch.Size([16]),
#  torch.Size([16, 11]),
#  torch.Size([16]),
#  torch.Size([16]))

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

just_d4rl-0.2407.2.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

just_d4rl-0.2407.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file just_d4rl-0.2407.2.tar.gz.

File metadata

  • Download URL: just_d4rl-0.2407.2.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for just_d4rl-0.2407.2.tar.gz
Algorithm Hash digest
SHA256 81c3a5917ad115ff121bf3ed7ab62bea856c3448af45855f4892d83bc45ec90c
MD5 5e7d5bf6e1e09df40a6bdd4916bf7059
BLAKE2b-256 5af20f93ed1ebd37d74be16180b0bf91caeec4f9b6adb25488172c1458a90608

See more details on using hashes here.

File details

Details for the file just_d4rl-0.2407.2-py3-none-any.whl.

File metadata

File hashes

Hashes for just_d4rl-0.2407.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f3928fcb1a6c6a2bad5c176504b10bd2f5ec35f4e36d43e57a89fc47ececf926
MD5 61f21b8db0b5ecfbce5c0c3584fd1252
BLAKE2b-256 dde243a369d1bc93e46b62fb4dec78d54d5fd51ab44ad4cf0c78d53ad3e5099e

See more details on using hashes here.

Supported by

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