Skip to content

Commit

Permalink
Add assert for max_steps to be positive in MegatronGPTSFTModel (NVIDI…
Browse files Browse the repository at this point in the history
…A#9110)

Signed-off-by: Abhishree <abhishreetm@gmail.com>
  • Loading branch information
athitten authored May 6, 2024
1 parent 1f4936e commit b92e24c
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def __init__(self, cfg: DictConfig, trainer: Trainer):
raise ImportError(
"Apex was not found. Please see the NeMo README for installation instructions: https://github.com/NVIDIA/NeMo#megatron-gpt."
)
assert trainer.max_steps > 0, "max_steps for SFT can't be negative as its required to build the dataset"
super().__init__(cfg, trainer=trainer)
self.sep_id = cfg.get('sep_id', 49704)
if hasattr(self.cfg.data, "validation_ds"):
Expand Down

0 comments on commit b92e24c

Please sign in to comment.