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

PPOTrainer: fix progress bar for num_mini_batches > 1 #2531

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dawidm
Copy link

@dawidm dawidm commented Dec 29, 2024

What does this PR do?

Simplest approach to fix #2530

It changes convention of:

  • batch size, which is now number of samples in main PPO loop (previously in mini-batch PPO loop). This changes behavior only when args.num_mini_batches > 1 (configurations that had bugged progress bar before this fix).
  • step, which is now equivalent of episodes, which is consistent with documentation (https://huggingface.co/docs/trl/main/en/ppo_trainer#explanation-of-the-logged-metrics): ''episode: episode: The current global step or episode count in the training process.''.

If this gets accepted I will modify my PR for RLOO #2516 to follow the same convention.

Before submitting

  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a GitHub issue? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines. (the change is consistent with current documentation)
  • Did you write any new necessary tests? (I ran existing tests)

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

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.

PPOTrainer: num_mini_batches setting affects training progress bar in an unexpected way
1 participant