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

MultiLeRobotDataset' object has no attribute 'meta #553

Open
astroyat opened this issue Dec 6, 2024 · 2 comments
Open

MultiLeRobotDataset' object has no attribute 'meta #553

astroyat opened this issue Dec 6, 2024 · 2 comments

Comments

@astroyat
Copy link

astroyat commented Dec 6, 2024

Encounter the following issue when training with multiple dataset repo, modify the code to remove meta to workaround but then not compatible with single dataset.

DATA_DIR=data python lerobot/scripts/train.py
dataset_repo_id=[astroyat/cube,astroyat/eval_cube]
policy=act_csv_real
env=so100_real
hydra.run.dir=outputs/train/act_eval_cube
hydra.job.name=act_eval_cube
device=cuda

Error executing job with overrides: ['dataset_repo_id=[astroyat/cube,astroyat/eval_cube]', 'policy=act_csv_real', 'env=so100_real', 'device=cuda']
Traceback (most recent call last):
File "/home/target/lerobot/lerobot/scripts/train.py", line 652, in train_cli
train(
File "/home/target/lerobot/lerobot/scripts/train.py", line 313, in train
offline_dataset = make_dataset(cfg)
File "/home/target/lerobot/lerobot/common/datasets/factory.py", line 114, in make_dataset
dataset.meta.stats[key][stats_type] = torch.tensor(stats, dtype=torch.float32)
AttributeError: 'MultiLeRobotDataset' object has no attribute 'meta'

Traceback (most recent call last):
File "/home/target/lerobot/lerobot/scripts/train.py", line 652, in train_cli
train(
File "/home/target/lerobot/lerobot/scripts/train.py", line 331, in train
dataset_stats=offline_dataset.meta.stats if not cfg.resume else None,
AttributeError: 'MultiLeRobotDataset' object has no attribute 'meta'

@andlyu
Copy link

andlyu commented Jan 18, 2025

Had a similar error when trying to run training with 2 datasets. Any luck with this?

Small update: Just replaced dataset.meta.stats with dataset.stats where it was giving errors. Messy but worked for the time being.

@astroyat
Copy link
Author

Had a similar error when trying to run training with 2 datasets. Any luck with this?

Small update: Just replaced dataset.meta.stats with dataset.stats where it was giving errors. Messy but worked for the time being.

I use this

if isinstance(dataset, MultiLeRobotDataset):
dataset.stats[key][stats_type] = torch.tensor(stats, dtype=torch.float32)
else:
dataset.meta.stats[key][stats_type] = torch.tensor(stats, dtype=torch.float32)

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

No branches or pull requests

2 participants