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

Add fix to resume pre-training when val outputs is empty #6281

Closed
wants to merge 4 commits into from

Conversation

athitten
Copy link
Collaborator

What does this PR do ?

Resuming pre-training sometimes fails immediately complaining of empty validation outputs tensor. This PR provides a fix for this issue.

Collection: [Note which collection this PR will affect]

Changelog

  • Add specific line by line info of high level changes in this PR.

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.

Who can review?

Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.

Additional Information

  • Related to # (issue)

Signed-off-by: Abhishree <abhishreetm@gmail.com>
@@ -681,6 +681,9 @@ def validation_step(self, dataloader_iter, batch_idx):
return []

def validation_epoch_end(self, outputs):
if len(outputs) == 0:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we change the config to have strict false and add it to the PR.

@@ -738,6 +738,9 @@ def validation_step(self, batch, batch_idx, dataloader_idx=0):
return loss_mean

def validation_epoch_end(self, outputs):
if len(outputs) == 0:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as other comment.

@@ -453,6 +453,9 @@ def validation_step(self, dataloader_iter, batch_idx):
return loss_mean[0]

def validation_epoch_end(self, outputs):
if len(outputs) == 0:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as other comment.

Signed-off-by: Abhishree <abhishreetm@gmail.com>
@athitten athitten force-pushed the athitten/resume_pretraining_fix branch from c460b57 to 8b52ea2 Compare March 23, 2023 19:50
arendu
arendu previously approved these changes Mar 23, 2023
Copy link
Collaborator

@arendu arendu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@athitten athitten changed the base branch from main to r1.17.0 March 23, 2023 20:33
@athitten athitten dismissed arendu’s stale review March 23, 2023 20:33

The base branch was changed.

@athitten athitten changed the base branch from r1.17.0 to main March 23, 2023 20:36
Copy link
Member

@okuchaiev okuchaiev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this go to r1.17.0 instead of main?

@athitten
Copy link
Collaborator Author

Shouldn't this go to r1.17.0 instead of main?

@okuchaiev yes I missed to base it off of r1.17 instead of main. Let me do that.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2023

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Apr 7, 2023
@github-actions
Copy link
Contributor

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Apr 14, 2023
@yzhang123 yzhang123 reopened this Apr 18, 2023
@yzhang123
Copy link
Contributor

Shouldn't this go to r1.17.0 instead of main?

@okuchaiev yes I missed to base it off of r1.17 instead of main. Let me do that.
could this be merged please?

@ekmb ekmb removed the stale label Apr 18, 2023
@okuchaiev
Copy link
Member

lets merge this 1.18.0 ? @ericharper what do you think?

@github-actions
Copy link
Contributor

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.

@github-actions github-actions bot added the stale label May 16, 2023
@github-actions
Copy link
Contributor

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this May 24, 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.

5 participants