Skip to content

关于转换数据 #9

Open
Open

Description

@zranguai

你好 modelscope和huggingface上面的OpenDriveLab/Kai0/Task_A/base/videos/下面的
chunk-000/observation.images.top_head/episode_000176.mp4
chunk-002/observation.images.top_head/episode_002548.mp4
chunk-002/observation.images.hand_left/episode_002953.mp4
视频好像是错误的,导致转换到v3.0错误,删除的话meta里面的时间戳似乎又对不上,请问有啥好的解决方式吗?

Activity

  1. self-assigned this
    on Mar 3, 2026
  2. added theissue type on Mar 3, 2026
  3. Tradewindycc commented on Mar 3, 2026

    @Tradewindycc
    Contributor

    Hi — thanks for reporting this. We are working to fix the datasets right now.
    你好,感谢指出这个问题。我们目前正在修复这个数据集。

  4. LeiH5180 commented on Mar 5, 2026

    @LeiH5180

    我临时修改data_loader.py中的 class TransformedDataset(Dataset[T_co]): 类,直接跳过错误的数据,可以往后推流程

    class TransformedDataset(Dataset[T_co]):
        _MAX_RETRIES = 50
    
        def __init__(self, dataset: Dataset, transforms: Sequence[_transforms.DataTransformFn]):
            self._dataset = dataset
            self._transform = _transforms.compose(transforms)
    
        def __getitem__(self, index: SupportsIndex) -> T_co:
            for attempt in range(self._MAX_RETRIES):
                try:
                    return self._transform(self._dataset[index])
                except Exception as e:
                    logger.warning(
                        f"[DataLoader] 跳过损坏的数据样本 index={index}: {e}"
                    )
                    # Pick a different random index and retry
                    index = random.randint(0, len(self._dataset) - 1)
            raise RuntimeError(
                f"连续 {self._MAX_RETRIES} 次尝试均失败,无法获取有效数据样本。"
            )
    
        def __len__(self) -> int:
            return len(self._dataset)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions