I am a little confused about how to load the dataset

#19
by quanvuong - opened

I tried

from lerobot.common.datasets.lerobot_dataset import LeRobotDataset

repo_id = "agibot-world/AgiBotWorld-Alpha"

dataset = LeRobotDataset(repo_id)

but got this error

  2 repo_id = "agibot-world/AgiBotWorld-Alpha"
  4 # You can easily load a dataset from a Hugging Face repository

----> 5 dataset = LeRobotDataset(repo_id)

File ~/lerobot/lerobot/common/datasets/lerobot_dataset.py:446, in LeRobotDataset.init(self, repo_id, root, episodes, image_transforms, delta_timestamps, tolerance_s, download_videos, local_files_only, video_backend)
443 self.root.mkdir(exist_ok=True, parents=True)
445 # Load metadata
--> 446 self.meta = LeRobotDatasetMetadata(self.repo_id, self.root, self.local_files_only)
448 # Check version
449 check_version_compatibility(self.repo_id, self.meta._version, CODEBASE_VERSION)

File ~/lerobot/lerobot/common/datasets/lerobot_dataset.py:87, in LeRobotDatasetMetadata.init(self, repo_id, root, local_files_only)
85 # Load metadata
86 (self.root / "meta").mkdir(exist_ok=True, parents=True)
---> 87 self.pull_from_repo(allow_patterns="meta/")
88 self.info = load_info(self.root)
89 self.stats = load_stats(self.root)

File ~/lerobot/lerobot/common/datasets/lerobot_dataset.py:101, in LeRobotDatasetMetadata.pull_from_repo(self, allow_patterns, ignore_patterns)
93 def pull_from_repo(
94 self,
95 allow_patterns: list[str] | str | None = None,
96 ignore_patterns: list[str] | str | None = None,
97 ) -> None:
98 snapshot_download(
99 self.repo_id,
100 repo_type="dataset",
--> 101 revision=self._hub_version,
102 local_dir=self.root,
103 allow_patterns=allow_patterns,
104 ignore_patterns=ignore_patterns,
105 local_files_only=self.local_files_only,
106 )

File ~/.local/share/uv/python/cpython-3.11.9-linux-x86_64-gnu/lib/python3.11/functools.py:1001, in cached_property.get(self, instance, owner)
999 val = cache.get(self.attrname, _NOT_FOUND)
1000 if val is _NOT_FOUND:
-> 1001 val = self.func(instance)
1002 try:
1003 cache[self.attrname] = val

File ~/lerobot/lerobot/common/datasets/lerobot_dataset.py:110, in LeRobotDatasetMetadata._hub_version(self)
108 @cached_property
109 def _hub_version(self) -> str | None:
--> 110 return None if self.local_files_only else get_hub_safe_version(self.repo_id, CODEBASE_VERSION)

File ~/lerobot/lerobot/common/datasets/utils.py:248, in get_hub_safe_version(repo_id, version)
246 hub_num_versions = [float(v.strip("v")) for v in branches if v.startswith("v")]
247 if num_version >= 2.0 and all(v < 2.0 for v in hub_num_versions):
--> 248 raise BackwardCompatibilityError(repo_id, version)
250 logging.warning(
251 f"""You are trying to load a dataset from {repo_id} created with a previous version of the
252 codebase. The following versions are available: {branches}.
(...)
255 Discord ('https://discord.com/invite/s3KuuzsPFb') or open an issue on github.""",
256 )
257 if "main" not in branches:

BackwardCompatibilityError:
BackwardCompatibilityError: The dataset you requested (agibot-world/AgiBotWorld-Alpha) is in v2.0 format.

We introduced a new format since v2.0 which is not backward compatible with v1.x.
Please, use our conversion script. Modify the following command with your own task description:

python lerobot/common/datasets/v2/convert_dataset_v1_to_v2.py \
    --repo-id agibot-world/AgiBotWorld-Alpha \
    --single-task "TASK DESCRIPTION."  # <---- /!\ Replace TASK DESCRIPTION /!\

A few examples to replace TASK DESCRIPTION: "Pick up the blue cube and place it into the bin.",
"Insert the peg into the socket.", "Slide open the ziploc bag.", "Take the elevator to the 1st floor.",
"Open the top cabinet, store the pot inside it then close the cabinet.", "Push the T-shaped block onto the T-shaped target.",
"Grab the spray paint on the shelf and place it in the bin on top of the robot dog.", "Fold the sweatshirt.", ...

AgiBot World org

Hi Quan! Did the conversion script worked out for you?

AgiBot World org

Hi, thanks for your question!
We currently provide the dataset in a format that cannot be used directly in this way. You will need to download it and manually convert it to the lerobot format.
But, we have decided to upload datasets in the lerobot format for easier use in the future. Stay tuned!

we have decided to upload datasets in the lerobot format for easier use in the future => awesome! Do you have an ETA?

@Eralien I didn't actually realize that this is the case from the instruction "We currently provide the dataset in a format that cannot be used directly in this way. You will need to download it and manually convert it to the lerobot format."

AgiBot World org

we have decided to upload datasets in the lerobot format for easier use in the future => awesome! Do you have an ETA?

We are already processing it, and it will be done by the latest before the end of January (before the Chinese New Year hhhhh).

Sign up or log in to comment