Name | just-d4rl JSON |
Version |
0.2407.5
JSON |
| download |
home_page | None |
Summary | Easy-to-use D4RL offline dataset loader |
upload_time | 2024-07-15 04:49:03 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
d4rl
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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](https://pypi.org/project/just-d4rl/):
```sh
pip install just-d4rl
```
## Usage
```python
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)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "just-d4rl",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "D4RL",
"author": null,
"author_email": "fuyutarow <fuyutarow@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/72/e8/ae4981d2856ad051dd684acf1583efc71ec5041c4e1cd901bcd7a7a59945/just_d4rl-0.2407.5.tar.gz",
"platform": null,
"description": "# just-d4rl\n\nEasy-to-use D4RL offline dataset loader, focused solely on downloading and providing D4RL datasets without dependencies on gym or gymnasium.\n\n\n## Key Features\n\n- Downloads and provides D4RL offline datasets\n- No dependencies on gym or gymnasium\n- Lightweight and focused functionality\n- Easy integration with PyTorch\n\n\n## Installation\n\nInstall from [PyPI](https://pypi.org/project/just-d4rl/):\n\n```sh\npip install just-d4rl\n```\n\n\n## Usage\n\n```python\nfrom just_d4rl import D4RLDataset, d4rl_offline_dataset, D4RLScoreNormalizer\n\n# Download and load a D4RL dataset\nd4rl_dataset = d4rl_offline_dataset(\"hopper-medium-v2\")\n\n# Example datasets\nd4rl_dataset = d4rl_offline_dataset(\"walker2d-random-v2\")\nd4rl_dataset = d4rl_offline_dataset(\"halfcheetah-medium-expert-v2\")\nd4rl_dataset = d4rl_offline_dataset(\"antmaze-umaze-v2\")\n\ndataset = d4rl_dataset\ndataset['observations'].shape, dataset['actions'].shape, dataset['rewards'].shape, dataset['next_observations'].shape, dataset['terminals'].shape\n# ((1000000, 11), (1000000, 3), (1000000,), (1000000, 11), (1000000,))\n\n# Create a PyTorch Dataset\nd4rl_dataset = d4rl_offline_dataset(\"hopper-medium-v2\")\ndataset = D4RLDataset(d4rl_dataset)\n\n# Get a batch of data\nbatch = dataset[-16:]\nbatch[\"observation\"].shape, batch[\"action\"].shape, batch[\"reward\"].shape, batch[\"next_observation\"].shape, batch[\"terminal\"].shape\n# (torch.Size([16, 11]), torch.Size([16, 3]), torch.Size([16]), torch.Size([16, 11]), torch.Size([16]))\n\n\nreturns = np.random.rand(16, 1)\nget_normalized_score = D4RLScoreNormalizer(\"hopper-medium-v2\")\nget_normalized_score(returns)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Easy-to-use D4RL offline dataset loader",
"version": "0.2407.5",
"project_urls": {
"Homepage": "https://github.com/fuyutarow/just-d4rl",
"Repository": "https://github.com/fuyutarow/just-d4rl"
},
"split_keywords": [
"d4rl"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "da17fcfe66984ee20e7de9c61507a30f69762c2a71eca70801450add0c7612ec",
"md5": "6c479e2ebbae438879c001faa2989654",
"sha256": "bf861ae9475c677cd251264beb27149a08f82171a8164a463b07c1c2a2b382ab"
},
"downloads": -1,
"filename": "just_d4rl-0.2407.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6c479e2ebbae438879c001faa2989654",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8182,
"upload_time": "2024-07-15T04:48:59",
"upload_time_iso_8601": "2024-07-15T04:48:59.099868Z",
"url": "https://files.pythonhosted.org/packages/da/17/fcfe66984ee20e7de9c61507a30f69762c2a71eca70801450add0c7612ec/just_d4rl-0.2407.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "72e8ae4981d2856ad051dd684acf1583efc71ec5041c4e1cd901bcd7a7a59945",
"md5": "46400ffacfbb43aafc5c679c53a77d0d",
"sha256": "2836fa9239abbce0d636f452853fa823623b3708e03cec845b9e7d0e222ce915"
},
"downloads": -1,
"filename": "just_d4rl-0.2407.5.tar.gz",
"has_sig": false,
"md5_digest": "46400ffacfbb43aafc5c679c53a77d0d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 10394,
"upload_time": "2024-07-15T04:49:03",
"upload_time_iso_8601": "2024-07-15T04:49:03.914294Z",
"url": "https://files.pythonhosted.org/packages/72/e8/ae4981d2856ad051dd684acf1583efc71ec5041c4e1cd901bcd7a7a59945/just_d4rl-0.2407.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-15 04:49:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "fuyutarow",
"github_project": "just-d4rl",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "just-d4rl"
}