-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to make a custom LeRobotDataset with v2? #547
Comments
okay so I've found a work around for now. I initialize an empty dataset and add the frames to it, and then I can load it after calling dataset.consolidate(). If this is a proper way to do it, pls lmk and I'll make a PR with updates to the docs. Otherwise please let me know what the right way to do this is. Thank you! I'll update this issue with my code once I've cleaned it up. |
I encountered the same issue. |
@aliberts i also got the same issue, the documentation on how to generate custom dataset is not up to date now (the code doesn't run anymore). could you please up the instruction and relevant scripts for custom dataset generation? thanks |
Hey there, Basically, you need to create a new empty dataset using You can find more info about the changes of this new api in the PR (#461) We will remove |
Will update the Readme soon! |
The following script is generated by AI Agent to help reproduce the issue: # lerobot/reproduce.py
import os
import pytest
from lerobot.common.datasets.lerobot_dataset import LeRobotDataset
def test_custom_lerobot_dataset():
try:
repo_id = "custom_repo"
hf_dataset = None # This should be replaced with actual dataset object
episode_data_index = None # This should be replaced with actual episode data index
info = None # This should be replaced with actual info
videos_dir = "/path/to/videos" # This should be replaced with actual videos directory
# Attempt to create a LeRobotDataset using the from_preloaded method
lerobot_dataset = LeRobotDataset.from_preloaded(
repo_id=repo_id,
hf_dataset=hf_dataset,
episode_data_index=episode_data_index,
info=info,
videos_dir=videos_dir,
)
raise AssertionError("Test failed: from_preloaded method did not throw an error as expected.")
except AttributeError as e:
raise AssertionError(e)
except Exception as e:
raise AssertionError(e)
if __name__ == "__main__":
test_custom_lerobot_dataset() How to run: python3 lerobot/reproduce.py Expected Result:
Thank you for your valuable contribution to this project and we appreciate your feedback! Please respond with an emoji if you find this script helpful. Feel free to comment below if any improvements are needed. Best regards from an AI Agent! |
Hi folks, thanks for the amazing open source work!
I am trying to make a custom dataset to use with the LeRobotDataset format.
The readme says to copy the example scripts here which I've done, and I have a working format script of my own.
lerobot/README.md
Line 323 in 8e7d697
but when it comes time to create the dataset, the
push_dataset_to_hub.py
usesLeRobotDataset.from_preloaded
which is no longer supported in dataset V2lerobot/lerobot/scripts/push_dataset_to_hub.py
Line 216 in 8e7d697
So I'm just wondering what the proper way of loading your own custom local dataset is?
Thank you in advance for your help!
The text was updated successfully, but these errors were encountered: