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 a bug, use _ceil_to_nearest instead as _round_to_nearest is not d… #6681

Merged
merged 1 commit into from
May 19, 2023

Conversation

BestJuly
Copy link
Contributor

What does this PR do ?

Fix a bug when training SFT model with dialog dataset when setting self.pad_to_max_length=False

Collection: [Note which collection this PR will affect]

Changelog

#gpt_sft_chat_dataset.py

## original code
## max_length = min(self.max_seq_length, self._round_to_nearest(max_length, 8))

## Changed to
max_length = min(self.max_seq_length, self._ceil_to_nearest(max_length, 8))

In gpt_sft_chat_dataset.py, we use _ceil_to_nearest which is also defined in this file. However, _round_to_nearest is not defined in NeMo.

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this 

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

@github-actions github-actions bot added the NLP label May 19, 2023
@MaximumEntropy MaximumEntropy self-requested a review May 19, 2023 05:32
@yidong72 yidong72 merged commit 1dc8b37 into NVIDIA:r1.19.0 May 19, 2023
4 checks passed
MaximumEntropy pushed a commit that referenced this pull request May 20, 2023
hsiehjackson pushed a commit to hsiehjackson/NeMo that referenced this pull request Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants