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

Fix online training #94

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Conversation

Cadene
Copy link
Collaborator

@Cadene Cadene commented Apr 23, 2024

What does this PR do?

  • Use online_steps=2 in end-to-end test, since 1 wasn't enough to capture the concatenation logic between first episode and second episode
  • Use env.episode_length=2 in end-to-end test to make it faster
  • Match the features type between the output of eval_policy and the offline/online datasets

Minimal code example to checkout and try

python lerobot/scripts/train.py \
policy=tdmpc \
env=xarm \
wandb.enable=False \
offline_steps=1 \
online_steps=2 \
env.episode_length=2 \
eval_episodes=1 \
device=cpu \
save_model=true \
save_freq=2 \
policy.batch_size=2 \
hydra.run.dir=tests/outputs/tdmpc

How did you tested the changes?

CI + breakpoint

@Cadene Cadene added the 🐛 Bug Something isn't working label Apr 23, 2024
@Cadene Cadene self-assigned this Apr 23, 2024
@Cadene Cadene added the 🗃️ Dataset Something dataset-related label Apr 23, 2024
@Cadene Cadene marked this pull request as ready for review April 23, 2024 15:14
Copy link
Contributor

@alexander-soare alexander-soare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, otherwise LGTM. Note: for this review I am happy with a brief skim and knowing that it's tested and works for me. I know we are refactoring eval.py soon.

lerobot/scripts/train.py Outdated Show resolved Hide resolved
@Cadene Cadene merged commit c1bcf85 into main Apr 23, 2024
1 check passed
@Cadene Cadene deleted the user/rcadene/2024_04_23_fix_online_training branch April 23, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working 🗃️ Dataset Something dataset-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants