Update lerobot/common/datasets/push_dataset_to_hub/aloha_dora_format.py

Co-authored-by: Thomas Wolf <thomwolf@users.noreply.github.com>
This commit is contained in:
Remi 2024-05-30 11:01:07 +02:00 committed by GitHub
parent 8484c057f5
commit 3d911acb34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -101,7 +101,8 @@ def load_from_raw(raw_dir: Path, out_dir: Path, fps: int):
# sanity check
has_nan = df.isna().any().any()
assert not has_nan
if has_nan:
raise ValueError("Dataset contains Nan values.")
# sanity check episode indices go from 0 to n-1
ep_ids = [ep_idx for ep_idx, _ in df.groupby("episode_index")]