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… #6682

Merged

Conversation

github-actions[bot]
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.

@MaximumEntropy MaximumEntropy merged commit dc9dda0 into main May 20, 2023
8 checks passed
@MaximumEntropy MaximumEntropy deleted the cherry-pick-main-1dc8b37bba47f0534400414f1d3f972778b9c7a5 branch May 20, 2023 07:36
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants