diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f5cf7090..6e71849f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,7 +95,7 @@ jobs: - name: Test with pytest run: | - pytest 'tests/test_control_robot.py::test_record_and_replay_and_policy[koch-True]' -v --cov=./lerobot --durations=0 \ + pytest -sx 'tests/test_control_robot.py::test_record_and_replay_and_policy[koch-True]' -v --cov=./lerobot --durations=0 \ -W ignore::DeprecationWarning:imageio_ffmpeg._utils:7 \ -W ignore::UserWarning:torch.utils.data.dataloader:558 \ -W ignore::UserWarning:gymnasium.utils.env_checker:247 \ diff --git a/lerobot/common/datasets/push_dataset_to_hub/aloha_hdf5_format.py b/lerobot/common/datasets/push_dataset_to_hub/aloha_hdf5_format.py index de19c696..b5efc953 100644 --- a/lerobot/common/datasets/push_dataset_to_hub/aloha_hdf5_format.py +++ b/lerobot/common/datasets/push_dataset_to_hub/aloha_hdf5_format.py @@ -200,13 +200,13 @@ def to_hf_dataset(data_dict, video) -> Dataset: features["next.done"] = Value(dtype="bool", id=None) features["index"] = Value(dtype="int64", id=None) - # for key in data_dict: - # if isinstance(data_dict[key], list): - # print(key, len(data_dict[key])) - # elif isinstance(data_dict[key], torch.Tensor): - # print(key, data_dict[key].shape) - # else: - # print(key, data_dict[key]) + for key in data_dict: + if isinstance(data_dict[key], list): + print(key, len(data_dict[key])) + elif isinstance(data_dict[key], torch.Tensor): + print(key, data_dict[key].shape) + else: + print(key, data_dict[key]) data_dict["episode_index"] = data_dict["episode_index"].tolist() data_dict["frame_index"] = data_dict["frame_index"].tolist() @@ -214,6 +214,14 @@ def to_hf_dataset(data_dict, video) -> Dataset: data_dict["next.done"] = data_dict["next.done"].tolist() data_dict["index"] = data_dict["index"].tolist() + for key in data_dict: + if isinstance(data_dict[key], list): + print(key, len(data_dict[key])) + elif isinstance(data_dict[key], torch.Tensor): + print(key, data_dict[key].shape) + else: + print(key, data_dict[key]) + hf_dataset = Dataset.from_dict(data_dict, features=Features(features)) hf_dataset.set_transform(hf_transform_to_torch) return hf_dataset