just-d4rl
Easy-to-use D4RL offline dataset loader, focused solely on downloading and providing D4RL datasets without dependencies on gym or gymnasium.
Key Features
- Downloads and provides D4RL offline datasets
- No dependencies on gym or gymnasium
- Lightweight and focused functionality
- Easy integration with PyTorch
Installation
Install from PyPI:
pip install just-d4rl
Usage
from just_d4rl import D4RLDataset, d4rl_offline_dataset, D4RLScoreNormalizer
# Download and load a D4RL dataset
d4rl_dataset = d4rl_offline_dataset("hopper-medium-v2")
# Example datasets
d4rl_dataset = d4rl_offline_dataset("walker2d-random-v2")
d4rl_dataset = d4rl_offline_dataset("halfcheetah-medium-expert-v2")
d4rl_dataset = d4rl_offline_dataset("antmaze-umaze-v2")
dataset = d4rl_dataset
dataset['observations'].shape, dataset['actions'].shape, dataset['rewards'].shape, dataset['next_observations'].shape, dataset['terminals'].shape
# ((1000000, 11), (1000000, 3), (1000000,), (1000000, 11), (1000000,))
# Create a PyTorch Dataset
d4rl_dataset = d4rl_offline_dataset("hopper-medium-v2")
dataset = D4RLDataset(d4rl_dataset)
# Get a batch of data
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]))
returns = np.random.rand(16, 1)
get_normalized_score = D4RLScoreNormalizer("hopper-medium-v2")
get_normalized_score(returns)
Metadata
Release files for just-d4rl 0.2407.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| just_d4rl-0.2407.5.tar.gz | 10.4 kB | Without provenance | Details for just_d4rl-0.2407.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| just_d4rl-0.2407.5-py3-none-any.whl | Python 3 | none | any | Details for just_d4rl-0.2407.5-py3-none-any.whl |
Total release size: 18.6 kB
Release files / just_d4rl-0.2407.5.tar.gz
| Download URL | just_d4rl-0.2407.5.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2836fa9239abbce0d636f452853fa823623b3708e03cec845b9e7d0e222ce915
|
|
BLAKE2b-256 checksum How to use checksums |
72e8ae4981d2856ad051dd684acf1583efc71ec5041c4e1cd901bcd7a7a59945
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.2
|
Release files / just_d4rl-0.2407.5-py3-none-any.whl
| Download URL | just_d4rl-0.2407.5-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf861ae9475c677cd251264beb27149a08f82171a8164a463b07c1c2a2b382ab
|
|
BLAKE2b-256 checksum How to use checksums |
da17fcfe66984ee20e7de9c61507a30f69762c2a71eca70801450add0c7612ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.2
|
Security for just-d4rl 0.2407.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.