forked from NVIDIA/NeMo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace prefetch with val iterator check in megatron models (NVIDIA#7318
) * Add counter for num_microbatches Signed-off-by: Abhishree <[email protected]> * Reset self.total_val_micro_batches Signed-off-by: Abhishree <[email protected]> * Replace _prefetch() with _val_iterator_done() Signed-off-by: Abhishree <[email protected]> * Override limit_val_batches for pretraining models Signed-off-by: Abhishree <[email protected]> * Return iterator in _val_iterator_done when iterator is not exhuasted Signed-off-by: Abhishree <[email protected]> * Temporarily comment BioMegatron Bert CI test Signed-off-by: Abhishree <[email protected]> * Move _reconfigure_val_batches() to MegatronGPTModel Signed-off-by: Abhishree <[email protected]> * Move self_reconfigure_val_batches to build_train_valid_test_datasets Signed-off-by: Abhishree <[email protected]> * Avoid fetching and reinserting back to the iterator Signed-off-by: Abhishree <[email protected]> * Increase limit_val_batches in CI tests Signed-off-by: Abhishree <[email protected]> * Use _val_iterator_done to check for iterator end in all megatron models 1) Remove if condition, self._val_micro_batches_consumed in def _val_iterator_done and check with just try(and reinsert), except 2) Use _val_iterator_done in all megatron models that use dataloader_iter to maintain uniformity Signed-off-by: Abhishree <[email protected]> * Minor edit to return outside of try block Signed-off-by: Abhishree <[email protected]> * Add _val_iterator_done for megatron_nmt_model Signed-off-by: Abhishree <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Abhishree <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Eric Harper <[email protected]>
- Loading branch information
1 parent
22e61ca
commit 2d830b5
Showing
11 changed files
with
181 additions
and
172 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.