mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-30 10:21:24 +00:00
Add pusht test artifact
This commit is contained in:
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.memmap filter=lfs diff=lfs merge=lfs -text
|
||||
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@@ -17,6 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
POETRY_VERSION: 1.8.1
|
||||
DATA_DIR: tests/data
|
||||
steps:
|
||||
#----------------------------------------------
|
||||
# check-out repo and set-up python
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -54,6 +54,7 @@ pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
!tests/data
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
|
||||
@@ -125,6 +125,9 @@ class PushtExperienceReplay(AbstractExperienceReplay):
|
||||
episode_ids = torch.from_numpy(dataset_dict.get_episode_idxs())
|
||||
num_episodes = dataset_dict.meta["episode_ends"].shape[0]
|
||||
total_frames = dataset_dict["action"].shape[0]
|
||||
# to create test artifact
|
||||
# num_episodes = 1
|
||||
# total_frames = 50
|
||||
assert len(
|
||||
{dataset_dict[key].shape[0] for key in dataset_dict.keys()} # noqa: SIM118
|
||||
), "Some data type dont have the same number of total frames."
|
||||
@@ -142,6 +145,8 @@ class PushtExperienceReplay(AbstractExperienceReplay):
|
||||
idxtd = 0
|
||||
for episode_id in tqdm.tqdm(range(num_episodes)):
|
||||
idx1 = dataset_dict.meta["episode_ends"][episode_id]
|
||||
# to create test artifact
|
||||
# idx1 = 51
|
||||
|
||||
num_frames = idx1 - idx0
|
||||
|
||||
|
||||
BIN
tests/data/action.memmap
LFS
Normal file
BIN
tests/data/action.memmap
LFS
Normal file
Binary file not shown.
BIN
tests/data/episode.memmap
LFS
Normal file
BIN
tests/data/episode.memmap
LFS
Normal file
Binary file not shown.
BIN
tests/data/frame_id.memmap
LFS
Normal file
BIN
tests/data/frame_id.memmap
LFS
Normal file
Binary file not shown.
1
tests/data/meta.json
Normal file
1
tests/data/meta.json
Normal file
@@ -0,0 +1 @@
|
||||
{"action": {"device": "cpu", "shape": [50, 2], "dtype": "torch.float32"}, "episode": {"device": "cpu", "shape": [50], "dtype": "torch.int64"}, "frame_id": {"device": "cpu", "shape": [50], "dtype": "torch.int64"}, "shape": [50], "device": "cpu", "_type": "<class 'tensordict._td.TensorDict'>"}
|
||||
BIN
tests/data/next/done.memmap
LFS
Normal file
BIN
tests/data/next/done.memmap
LFS
Normal file
Binary file not shown.
1
tests/data/next/meta.json
Normal file
1
tests/data/next/meta.json
Normal file
@@ -0,0 +1 @@
|
||||
{"reward": {"device": "cpu", "shape": [50, 1], "dtype": "torch.float32"}, "done": {"device": "cpu", "shape": [50, 1], "dtype": "torch.bool"}, "success": {"device": "cpu", "shape": [50, 1], "dtype": "torch.bool"}, "shape": [50], "device": "cpu", "_type": "<class 'tensordict._td.TensorDict'>"}
|
||||
BIN
tests/data/next/observation/image.memmap
LFS
Normal file
BIN
tests/data/next/observation/image.memmap
LFS
Normal file
Binary file not shown.
1
tests/data/next/observation/meta.json
Normal file
1
tests/data/next/observation/meta.json
Normal file
@@ -0,0 +1 @@
|
||||
{"image": {"device": "cpu", "shape": [50, 3, 96, 96], "dtype": "torch.float32"}, "state": {"device": "cpu", "shape": [50, 2], "dtype": "torch.float32"}, "shape": [50], "device": "cpu", "_type": "<class 'tensordict._td.TensorDict'>"}
|
||||
BIN
tests/data/next/observation/state.memmap
LFS
Normal file
BIN
tests/data/next/observation/state.memmap
LFS
Normal file
Binary file not shown.
BIN
tests/data/next/reward.memmap
LFS
Normal file
BIN
tests/data/next/reward.memmap
LFS
Normal file
Binary file not shown.
BIN
tests/data/next/success.memmap
LFS
Normal file
BIN
tests/data/next/success.memmap
LFS
Normal file
Binary file not shown.
BIN
tests/data/observation/image.memmap
LFS
Normal file
BIN
tests/data/observation/image.memmap
LFS
Normal file
Binary file not shown.
1
tests/data/observation/meta.json
Normal file
1
tests/data/observation/meta.json
Normal file
@@ -0,0 +1 @@
|
||||
{"image": {"device": "cpu", "shape": [50, 3, 96, 96], "dtype": "torch.float32"}, "state": {"device": "cpu", "shape": [50, 2], "dtype": "torch.float32"}, "shape": [50], "device": "cpu", "_type": "<class 'tensordict._td.TensorDict'>"}
|
||||
BIN
tests/data/observation/state.memmap
LFS
Normal file
BIN
tests/data/observation/state.memmap
LFS
Normal file
Binary file not shown.
BIN
tests/data/stats.pth
Normal file
BIN
tests/data/stats.pth
Normal file
Binary file not shown.
Reference in New Issue
Block a user