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
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
POETRY_VERSION: 1.8.1
|
POETRY_VERSION: 1.8.1
|
||||||
|
DATA_DIR: tests/data
|
||||||
steps:
|
steps:
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
# check-out repo and set-up python
|
# 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
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
# Unit test / coverage reports
|
# Unit test / coverage reports
|
||||||
|
!tests/data
|
||||||
htmlcov/
|
htmlcov/
|
||||||
.tox/
|
.tox/
|
||||||
.nox/
|
.nox/
|
||||||
|
|||||||
@@ -125,6 +125,9 @@ class PushtExperienceReplay(AbstractExperienceReplay):
|
|||||||
episode_ids = torch.from_numpy(dataset_dict.get_episode_idxs())
|
episode_ids = torch.from_numpy(dataset_dict.get_episode_idxs())
|
||||||
num_episodes = dataset_dict.meta["episode_ends"].shape[0]
|
num_episodes = dataset_dict.meta["episode_ends"].shape[0]
|
||||||
total_frames = dataset_dict["action"].shape[0]
|
total_frames = dataset_dict["action"].shape[0]
|
||||||
|
# to create test artifact
|
||||||
|
# num_episodes = 1
|
||||||
|
# total_frames = 50
|
||||||
assert len(
|
assert len(
|
||||||
{dataset_dict[key].shape[0] for key in dataset_dict.keys()} # noqa: SIM118
|
{dataset_dict[key].shape[0] for key in dataset_dict.keys()} # noqa: SIM118
|
||||||
), "Some data type dont have the same number of total frames."
|
), "Some data type dont have the same number of total frames."
|
||||||
@@ -142,6 +145,8 @@ class PushtExperienceReplay(AbstractExperienceReplay):
|
|||||||
idxtd = 0
|
idxtd = 0
|
||||||
for episode_id in tqdm.tqdm(range(num_episodes)):
|
for episode_id in tqdm.tqdm(range(num_episodes)):
|
||||||
idx1 = dataset_dict.meta["episode_ends"][episode_id]
|
idx1 = dataset_dict.meta["episode_ends"][episode_id]
|
||||||
|
# to create test artifact
|
||||||
|
# idx1 = 51
|
||||||
|
|
||||||
num_frames = idx1 - idx0
|
num_frames = idx1 - idx0
|
||||||
|
|
||||||
|
|||||||
3
tests/data/action.memmap
Normal file
3
tests/data/action.memmap
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ba17d8e5c30151ea5f7f6fc31f19e12a68ce2113774b74c8aca0c7ef962a75f4
|
||||||
|
size 400
|
||||||
3
tests/data/episode.memmap
Normal file
3
tests/data/episode.memmap
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:7a12e561363385e9dfeeab326368731c030ed4b374e7f5897ac819159d2884c5
|
||||||
|
size 400
|
||||||
3
tests/data/frame_id.memmap
Normal file
3
tests/data/frame_id.memmap
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:c202d9cfc7858fd49d522047e16948359bbbb2eda2d3825d552e45a78d5f8585
|
||||||
|
size 400
|
||||||
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'>"}
|
||||||
3
tests/data/next/done.memmap
Normal file
3
tests/data/next/done.memmap
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d1a8f20ab8c1dead0f61b7b38de300b0ebd0df1d870babfbbe03ce9d2b81e36a
|
||||||
|
size 50
|
||||||
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'>"}
|
||||||
3
tests/data/next/observation/image.memmap
Normal file
3
tests/data/next/observation/image.memmap
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ff6a3748c8223a82e54c61442df7b8baf478a20497ee2353645a1e9ccd765162
|
||||||
|
size 5529600
|
||||||
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'>"}
|
||||||
3
tests/data/next/observation/state.memmap
Normal file
3
tests/data/next/observation/state.memmap
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:fad4ece6d5fd66bbafa34f6ff383c483410082b8d7d4f4616808c3c458ce1d43
|
||||||
|
size 400
|
||||||
3
tests/data/next/reward.memmap
Normal file
3
tests/data/next/reward.memmap
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6d9c54dee5660c46886f32d80e57e9dd0ffa57ee0cd2a762b036d9c8e0c3a33a
|
||||||
|
size 200
|
||||||
3
tests/data/next/success.memmap
Normal file
3
tests/data/next/success.memmap
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cc2786e1f9910a9d811400edcddaf7075195f7a16b216dcbefba3bc7c4f2ae51
|
||||||
|
size 50
|
||||||
3
tests/data/observation/image.memmap
Normal file
3
tests/data/observation/image.memmap
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4bbde5cfd8cff9fd9fc6c9a57177f6fd31c8a03cf853b7d2234312f38380b0ba
|
||||||
|
size 5529600
|
||||||
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'>"}
|
||||||
3
tests/data/observation/state.memmap
Normal file
3
tests/data/observation/state.memmap
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:67c7e39090a16546fb1eade833d704f26464d574d7e431415f828159a154d2bf
|
||||||
|
size 400
|
||||||
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