Skip to content
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

Add root parameter to training script. Use --dataset.root_dir to set root dir #690

Conversation

rkeshwani
Copy link

Resolves issue #689.

What this does

Adds a root_dir parameter to the datasetConfig class which determines which parameters are accepted in the train.py script.

The make_dataset factory configuration was modified as well to actually use the parameter.

How it was tested

Data was recorded with a different root path.
Then the training was run with the new root dir specified and the training succesfully started. Before this implementation an error was thrown showing the user's home directory being used to search for the dataset.

Examples:

python train.py --dataset.repo_id=lerobot/test --policy.type=act --output_dir=./training_data --job_name=act_so100_test --device=cuda --dataset.local_files_only=true --dataset.root_dir=./recorded_datasets

Notes

-I'm unsure if the changes I made will impact the library in other areas like recording and evaluation because I changed the dataclass of the datasetconfig. If I find any issues I will submit as part of a separate pull request with the assumption this one is accepted.

@aliberts
Copy link
Collaborator

Thanks! I will close this as we just merged a duplicate of this: #765 (sorry I didn't see yours before).
You should now be able to do this with --dataset.root

@aliberts aliberts closed this Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants