fix: correct CriticWorker tqdm total to match epochs=1 dataloader#377
Open
dubin555 wants to merge 1 commit intoalibaba:mainfrom
Open
fix: correct CriticWorker tqdm total to match epochs=1 dataloader#377dubin555 wants to merge 1 commit intoalibaba:mainfrom
dubin555 wants to merge 1 commit intoalibaba:mainfrom
Conversation
CriticWorker.train_step creates the dataloader with epochs=1, but the tqdm progress bar total was calculated using ppo_epochs. This caused the progress bar to never reach 100% when ppo_epochs > 1 (e.g. showing 50% completion with ppo_epochs=2 when training was actually done). Remove the ppo_epochs multiplier from the tqdm total so it matches the actual number of iterations produced by the dataloader.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In
CriticWorker.train_step(roll/pipeline/base_worker.py), the dataloader is created withepochs=1, but the tqdm progress bar total is calculated usingppo_epochs:When
ppo_epochs > 1, the progress bar total is inflated. For example withppo_epochs=2, the progress bar shows 50% when training is actually complete.Fix
Remove
ppo_epochsfrom the tqdm total calculation to match theepochs=1dataloader:Files Changed
roll/pipeline/base_worker.py— tqdm total calculationtests/pipeline/test_critic_tqdm_total.py— regression test