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

clean warnings from tests and CI runs, and prepare for upgrade to PTL 1.8 #4830

Merged
merged 15 commits into from
Sep 26, 2022

Conversation

nithinraok
Copy link
Collaborator

@nithinraok nithinraok commented Aug 29, 2022

Signed-off-by: nithinraok [email protected]

What does this PR do ?

Remove warnings from core and ASR code. NLP part needs more rework than expected.

Collection: Core, ASR

Changelog

  • weights_save_path has been removed
  • Some changes on ptl self.log sync_dist = True
  • torch.qr -> torch.linalg.qr
  • on_pretrain_routine_start -> on_fit_start
  • Update most metrics to have full_state_update = True variable
  • Pytest remove with_downloads marker warning
  • regex escape sequence and np float deprecation

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

@nithinraok nithinraok force-pushed the clean_warnings_and_upgrade_ptl branch from 36a6827 to f23e11e Compare August 31, 2022 04:01
@lgtm-com
Copy link

lgtm-com bot commented Aug 31, 2022

This pull request introduces 2 alerts when merging f23e11e into dd6e95e - view on LGTM.com

new alerts:

  • 2 for Unused local variable

@lgtm-com
Copy link

lgtm-com bot commented Aug 31, 2022

This pull request introduces 2 alerts when merging 8c69a46 into dd6e95e - view on LGTM.com

new alerts:

  • 2 for Unused local variable

@lgtm-com
Copy link

lgtm-com bot commented Sep 1, 2022

This pull request introduces 1 alert when merging 239b8e1 into 2ef4f35 - view on LGTM.com

new alerts:

  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Sep 2, 2022

This pull request introduces 1 alert when merging c0482e5 into ea3c1b5 - view on LGTM.com

new alerts:

  • 1 for Unused import

@nithinraok nithinraok marked this pull request as ready for review September 6, 2022 17:57
@lgtm-com
Copy link

lgtm-com bot commented Sep 6, 2022

This pull request introduces 1 alert when merging 36fbb43 into 1c16b96 - view on LGTM.com

new alerts:

  • 1 for Unused import

@nithinraok nithinraok changed the title remove with_downloads marker warning from pytest clean warnings from tests and CI runs, and prepare for upgrade to PTL 1.8 Sep 7, 2022
SeanNaren
SeanNaren previously approved these changes Sep 12, 2022
Copy link
Collaborator

@SeanNaren SeanNaren left a comment

Choose a reason for hiding this comment

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

LGTM

@SeanNaren
Copy link
Collaborator

(just in case, others don't merge @nithinraok just deciding if we wait for a branch cutoff)

@SeanNaren SeanNaren self-requested a review September 12, 2022 21:02
titu1994
titu1994 previously approved these changes Sep 21, 2022
Copy link
Collaborator

@titu1994 titu1994 left a comment

Choose a reason for hiding this comment

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

Overall looks good, just one question about why torch.long is removed ? It's necessary normally.

@@ -31,7 +31,7 @@ def pack_hypotheses(hypotheses: List[rnnt_utils.Hypothesis], logitlen: torch.Ten
logitlen_cpu = logitlen

for idx, hyp in enumerate(hypotheses): # type: rnnt_utils.Hypothesis
hyp.y_sequence = torch.tensor(hyp.y_sequence, dtype=torch.long)
hyp.y_sequence = torch.tensor(hyp.y_sequence,)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be long


def val_dataloader(self):
dataset = OnesDataset(10)
return torch.utils.data.DataLoader(dataset, batch_size=2)
return torch.utils.data.DataLoader(dataset, batch_size=2, num_workers=8)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are workers necessary for the test ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not mandatory, but lots of unnecessary warnings with workers=0.

@nithinraok nithinraok requested review from titu1994 and removed request for ericharper September 26, 2022 01:33
Copy link
Collaborator

@titu1994 titu1994 left a comment

Choose a reason for hiding this comment

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

Looks great !

@titu1994 titu1994 merged commit e3ac280 into main Sep 26, 2022
@nithinraok nithinraok deleted the clean_warnings_and_upgrade_ptl branch September 26, 2022 01:40
SeanNaren added a commit that referenced this pull request Sep 26, 2022
… 1.8 (#4830)

* remove with_downloads marker warning from pytest

Signed-off-by: nithinraok <[email protected]>

* regex escape sequence and np float deprecation

Signed-off-by: nithinraok <[email protected]>

* improve speed of torchmetrics

Signed-off-by: nithinraok <[email protected]>

* fix python __int__ deprecation

Signed-off-by: nithinraok <[email protected]>

* multi binary accuracy

Signed-off-by: nithinraok <[email protected]>

* update topkaccuracy metric

Signed-off-by: nithinraok <[email protected]>

* trainer, text norm, qr -> linalg.qr

Signed-off-by: nithinraok <[email protected]>

* remove weights save path arg to trainer

Signed-off-by: nithinraok <[email protected]>

* ptl core warnings fix

Signed-off-by: nithinraok <[email protected]>

* on_pretrain_routine_start -> on_fit_start

Signed-off-by: nithinraok <[email protected]>

* add weights_save_path to deprecated args

Signed-off-by: nithinraok <[email protected]>

* style fix

Signed-off-by: nithinraok <[email protected]>

* Remove reference

Signed-off-by: SeanNaren <[email protected]>

* revert torch.long change

Signed-off-by: nithinraok <[email protected]>

Signed-off-by: nithinraok <[email protected]>
Signed-off-by: SeanNaren <[email protected]>
Co-authored-by: SeanNaren <[email protected]>
SeanNaren added a commit that referenced this pull request Sep 26, 2022
… 1.8 (#4830)

* remove with_downloads marker warning from pytest

Signed-off-by: nithinraok <[email protected]>

* regex escape sequence and np float deprecation

Signed-off-by: nithinraok <[email protected]>

* improve speed of torchmetrics

Signed-off-by: nithinraok <[email protected]>

* fix python __int__ deprecation

Signed-off-by: nithinraok <[email protected]>

* multi binary accuracy

Signed-off-by: nithinraok <[email protected]>

* update topkaccuracy metric

Signed-off-by: nithinraok <[email protected]>

* trainer, text norm, qr -> linalg.qr

Signed-off-by: nithinraok <[email protected]>

* remove weights save path arg to trainer

Signed-off-by: nithinraok <[email protected]>

* ptl core warnings fix

Signed-off-by: nithinraok <[email protected]>

* on_pretrain_routine_start -> on_fit_start

Signed-off-by: nithinraok <[email protected]>

* add weights_save_path to deprecated args

Signed-off-by: nithinraok <[email protected]>

* style fix

Signed-off-by: nithinraok <[email protected]>

* Remove reference

Signed-off-by: SeanNaren <[email protected]>

* revert torch.long change

Signed-off-by: nithinraok <[email protected]>

Signed-off-by: nithinraok <[email protected]>
Signed-off-by: SeanNaren <[email protected]>
Co-authored-by: SeanNaren <[email protected]>
Jorjeous pushed a commit that referenced this pull request Sep 27, 2022
… 1.8 (#4830)

* remove with_downloads marker warning from pytest

Signed-off-by: nithinraok <[email protected]>

* regex escape sequence and np float deprecation

Signed-off-by: nithinraok <[email protected]>

* improve speed of torchmetrics

Signed-off-by: nithinraok <[email protected]>

* fix python __int__ deprecation

Signed-off-by: nithinraok <[email protected]>

* multi binary accuracy

Signed-off-by: nithinraok <[email protected]>

* update topkaccuracy metric

Signed-off-by: nithinraok <[email protected]>

* trainer, text norm, qr -> linalg.qr

Signed-off-by: nithinraok <[email protected]>

* remove weights save path arg to trainer

Signed-off-by: nithinraok <[email protected]>

* ptl core warnings fix

Signed-off-by: nithinraok <[email protected]>

* on_pretrain_routine_start -> on_fit_start

Signed-off-by: nithinraok <[email protected]>

* add weights_save_path to deprecated args

Signed-off-by: nithinraok <[email protected]>

* style fix

Signed-off-by: nithinraok <[email protected]>

* Remove reference

Signed-off-by: SeanNaren <[email protected]>

* revert torch.long change

Signed-off-by: nithinraok <[email protected]>

Signed-off-by: nithinraok <[email protected]>
Signed-off-by: SeanNaren <[email protected]>
Co-authored-by: SeanNaren <[email protected]>
Signed-off-by: George Zelenfroynd <[email protected]>
jubick1337 pushed a commit to jubick1337/NeMo that referenced this pull request Sep 28, 2022
… 1.8 (NVIDIA#4830)

* remove with_downloads marker warning from pytest

Signed-off-by: nithinraok <[email protected]>

* regex escape sequence and np float deprecation

Signed-off-by: nithinraok <[email protected]>

* improve speed of torchmetrics

Signed-off-by: nithinraok <[email protected]>

* fix python __int__ deprecation

Signed-off-by: nithinraok <[email protected]>

* multi binary accuracy

Signed-off-by: nithinraok <[email protected]>

* update topkaccuracy metric

Signed-off-by: nithinraok <[email protected]>

* trainer, text norm, qr -> linalg.qr

Signed-off-by: nithinraok <[email protected]>

* remove weights save path arg to trainer

Signed-off-by: nithinraok <[email protected]>

* ptl core warnings fix

Signed-off-by: nithinraok <[email protected]>

* on_pretrain_routine_start -> on_fit_start

Signed-off-by: nithinraok <[email protected]>

* add weights_save_path to deprecated args

Signed-off-by: nithinraok <[email protected]>

* style fix

Signed-off-by: nithinraok <[email protected]>

* Remove reference

Signed-off-by: SeanNaren <[email protected]>

* revert torch.long change

Signed-off-by: nithinraok <[email protected]>

Signed-off-by: nithinraok <[email protected]>
Signed-off-by: SeanNaren <[email protected]>
Co-authored-by: SeanNaren <[email protected]>
Signed-off-by: Matvei Novikov <[email protected]>
jubick1337 pushed a commit to jubick1337/NeMo that referenced this pull request Oct 3, 2022
… 1.8 (NVIDIA#4830)

* remove with_downloads marker warning from pytest

Signed-off-by: nithinraok <[email protected]>

* regex escape sequence and np float deprecation

Signed-off-by: nithinraok <[email protected]>

* improve speed of torchmetrics

Signed-off-by: nithinraok <[email protected]>

* fix python __int__ deprecation

Signed-off-by: nithinraok <[email protected]>

* multi binary accuracy

Signed-off-by: nithinraok <[email protected]>

* update topkaccuracy metric

Signed-off-by: nithinraok <[email protected]>

* trainer, text norm, qr -> linalg.qr

Signed-off-by: nithinraok <[email protected]>

* remove weights save path arg to trainer

Signed-off-by: nithinraok <[email protected]>

* ptl core warnings fix

Signed-off-by: nithinraok <[email protected]>

* on_pretrain_routine_start -> on_fit_start

Signed-off-by: nithinraok <[email protected]>

* add weights_save_path to deprecated args

Signed-off-by: nithinraok <[email protected]>

* style fix

Signed-off-by: nithinraok <[email protected]>

* Remove reference

Signed-off-by: SeanNaren <[email protected]>

* revert torch.long change

Signed-off-by: nithinraok <[email protected]>

Signed-off-by: nithinraok <[email protected]>
Signed-off-by: SeanNaren <[email protected]>
Co-authored-by: SeanNaren <[email protected]>
Signed-off-by: Matvei Novikov <[email protected]>
XuesongYang pushed a commit to XuesongYang/NeMo that referenced this pull request Oct 3, 2022
… 1.8 (NVIDIA#4830)

* remove with_downloads marker warning from pytest

Signed-off-by: nithinraok <[email protected]>

* regex escape sequence and np float deprecation

Signed-off-by: nithinraok <[email protected]>

* improve speed of torchmetrics

Signed-off-by: nithinraok <[email protected]>

* fix python __int__ deprecation

Signed-off-by: nithinraok <[email protected]>

* multi binary accuracy

Signed-off-by: nithinraok <[email protected]>

* update topkaccuracy metric

Signed-off-by: nithinraok <[email protected]>

* trainer, text norm, qr -> linalg.qr

Signed-off-by: nithinraok <[email protected]>

* remove weights save path arg to trainer

Signed-off-by: nithinraok <[email protected]>

* ptl core warnings fix

Signed-off-by: nithinraok <[email protected]>

* on_pretrain_routine_start -> on_fit_start

Signed-off-by: nithinraok <[email protected]>

* add weights_save_path to deprecated args

Signed-off-by: nithinraok <[email protected]>

* style fix

Signed-off-by: nithinraok <[email protected]>

* Remove reference

Signed-off-by: SeanNaren <[email protected]>

* revert torch.long change

Signed-off-by: nithinraok <[email protected]>

Signed-off-by: nithinraok <[email protected]>
Signed-off-by: SeanNaren <[email protected]>
Co-authored-by: SeanNaren <[email protected]>
XuesongYang pushed a commit to XuesongYang/NeMo that referenced this pull request Oct 4, 2022
… 1.8 (NVIDIA#4830)

* remove with_downloads marker warning from pytest

Signed-off-by: nithinraok <[email protected]>

* regex escape sequence and np float deprecation

Signed-off-by: nithinraok <[email protected]>

* improve speed of torchmetrics

Signed-off-by: nithinraok <[email protected]>

* fix python __int__ deprecation

Signed-off-by: nithinraok <[email protected]>

* multi binary accuracy

Signed-off-by: nithinraok <[email protected]>

* update topkaccuracy metric

Signed-off-by: nithinraok <[email protected]>

* trainer, text norm, qr -> linalg.qr

Signed-off-by: nithinraok <[email protected]>

* remove weights save path arg to trainer

Signed-off-by: nithinraok <[email protected]>

* ptl core warnings fix

Signed-off-by: nithinraok <[email protected]>

* on_pretrain_routine_start -> on_fit_start

Signed-off-by: nithinraok <[email protected]>

* add weights_save_path to deprecated args

Signed-off-by: nithinraok <[email protected]>

* style fix

Signed-off-by: nithinraok <[email protected]>

* Remove reference

Signed-off-by: SeanNaren <[email protected]>

* revert torch.long change

Signed-off-by: nithinraok <[email protected]>

Signed-off-by: nithinraok <[email protected]>
Signed-off-by: SeanNaren <[email protected]>
Co-authored-by: SeanNaren <[email protected]>
jubick1337 pushed a commit to jubick1337/NeMo that referenced this pull request Oct 4, 2022
… 1.8 (NVIDIA#4830)

* remove with_downloads marker warning from pytest

Signed-off-by: nithinraok <[email protected]>

* regex escape sequence and np float deprecation

Signed-off-by: nithinraok <[email protected]>

* improve speed of torchmetrics

Signed-off-by: nithinraok <[email protected]>

* fix python __int__ deprecation

Signed-off-by: nithinraok <[email protected]>

* multi binary accuracy

Signed-off-by: nithinraok <[email protected]>

* update topkaccuracy metric

Signed-off-by: nithinraok <[email protected]>

* trainer, text norm, qr -> linalg.qr

Signed-off-by: nithinraok <[email protected]>

* remove weights save path arg to trainer

Signed-off-by: nithinraok <[email protected]>

* ptl core warnings fix

Signed-off-by: nithinraok <[email protected]>

* on_pretrain_routine_start -> on_fit_start

Signed-off-by: nithinraok <[email protected]>

* add weights_save_path to deprecated args

Signed-off-by: nithinraok <[email protected]>

* style fix

Signed-off-by: nithinraok <[email protected]>

* Remove reference

Signed-off-by: SeanNaren <[email protected]>

* revert torch.long change

Signed-off-by: nithinraok <[email protected]>

Signed-off-by: nithinraok <[email protected]>
Signed-off-by: SeanNaren <[email protected]>
Co-authored-by: SeanNaren <[email protected]>
Signed-off-by: Matvei Novikov <[email protected]>
titu1994 pushed a commit to titu1994/NeMo that referenced this pull request Oct 6, 2022
… 1.8 (NVIDIA#4830)

* remove with_downloads marker warning from pytest

Signed-off-by: nithinraok <[email protected]>

* regex escape sequence and np float deprecation

Signed-off-by: nithinraok <[email protected]>

* improve speed of torchmetrics

Signed-off-by: nithinraok <[email protected]>

* fix python __int__ deprecation

Signed-off-by: nithinraok <[email protected]>

* multi binary accuracy

Signed-off-by: nithinraok <[email protected]>

* update topkaccuracy metric

Signed-off-by: nithinraok <[email protected]>

* trainer, text norm, qr -> linalg.qr

Signed-off-by: nithinraok <[email protected]>

* remove weights save path arg to trainer

Signed-off-by: nithinraok <[email protected]>

* ptl core warnings fix

Signed-off-by: nithinraok <[email protected]>

* on_pretrain_routine_start -> on_fit_start

Signed-off-by: nithinraok <[email protected]>

* add weights_save_path to deprecated args

Signed-off-by: nithinraok <[email protected]>

* style fix

Signed-off-by: nithinraok <[email protected]>

* Remove reference

Signed-off-by: SeanNaren <[email protected]>

* revert torch.long change

Signed-off-by: nithinraok <[email protected]>

Signed-off-by: nithinraok <[email protected]>
Signed-off-by: SeanNaren <[email protected]>
Co-authored-by: SeanNaren <[email protected]>
XuesongYang pushed a commit to XuesongYang/NeMo that referenced this pull request Oct 10, 2022
… 1.8 (NVIDIA#4830)

* remove with_downloads marker warning from pytest

Signed-off-by: nithinraok <[email protected]>

* regex escape sequence and np float deprecation

Signed-off-by: nithinraok <[email protected]>

* improve speed of torchmetrics

Signed-off-by: nithinraok <[email protected]>

* fix python __int__ deprecation

Signed-off-by: nithinraok <[email protected]>

* multi binary accuracy

Signed-off-by: nithinraok <[email protected]>

* update topkaccuracy metric

Signed-off-by: nithinraok <[email protected]>

* trainer, text norm, qr -> linalg.qr

Signed-off-by: nithinraok <[email protected]>

* remove weights save path arg to trainer

Signed-off-by: nithinraok <[email protected]>

* ptl core warnings fix

Signed-off-by: nithinraok <[email protected]>

* on_pretrain_routine_start -> on_fit_start

Signed-off-by: nithinraok <[email protected]>

* add weights_save_path to deprecated args

Signed-off-by: nithinraok <[email protected]>

* style fix

Signed-off-by: nithinraok <[email protected]>

* Remove reference

Signed-off-by: SeanNaren <[email protected]>

* revert torch.long change

Signed-off-by: nithinraok <[email protected]>

Signed-off-by: nithinraok <[email protected]>
Signed-off-by: SeanNaren <[email protected]>
Co-authored-by: SeanNaren <[email protected]>
hainan-xv pushed a commit to hainan-xv/NeMo that referenced this pull request Nov 29, 2022
… 1.8 (NVIDIA#4830)

* remove with_downloads marker warning from pytest

Signed-off-by: nithinraok <[email protected]>

* regex escape sequence and np float deprecation

Signed-off-by: nithinraok <[email protected]>

* improve speed of torchmetrics

Signed-off-by: nithinraok <[email protected]>

* fix python __int__ deprecation

Signed-off-by: nithinraok <[email protected]>

* multi binary accuracy

Signed-off-by: nithinraok <[email protected]>

* update topkaccuracy metric

Signed-off-by: nithinraok <[email protected]>

* trainer, text norm, qr -> linalg.qr

Signed-off-by: nithinraok <[email protected]>

* remove weights save path arg to trainer

Signed-off-by: nithinraok <[email protected]>

* ptl core warnings fix

Signed-off-by: nithinraok <[email protected]>

* on_pretrain_routine_start -> on_fit_start

Signed-off-by: nithinraok <[email protected]>

* add weights_save_path to deprecated args

Signed-off-by: nithinraok <[email protected]>

* style fix

Signed-off-by: nithinraok <[email protected]>

* Remove reference

Signed-off-by: SeanNaren <[email protected]>

* revert torch.long change

Signed-off-by: nithinraok <[email protected]>

Signed-off-by: nithinraok <[email protected]>
Signed-off-by: SeanNaren <[email protected]>
Co-authored-by: SeanNaren <[email protected]>
Signed-off-by: Hainan Xu <[email protected]>
hainan-xv pushed a commit to hainan-xv/NeMo that referenced this pull request Nov 29, 2022
… 1.8 (NVIDIA#4830)

* remove with_downloads marker warning from pytest

Signed-off-by: nithinraok <[email protected]>

* regex escape sequence and np float deprecation

Signed-off-by: nithinraok <[email protected]>

* improve speed of torchmetrics

Signed-off-by: nithinraok <[email protected]>

* fix python __int__ deprecation

Signed-off-by: nithinraok <[email protected]>

* multi binary accuracy

Signed-off-by: nithinraok <[email protected]>

* update topkaccuracy metric

Signed-off-by: nithinraok <[email protected]>

* trainer, text norm, qr -> linalg.qr

Signed-off-by: nithinraok <[email protected]>

* remove weights save path arg to trainer

Signed-off-by: nithinraok <[email protected]>

* ptl core warnings fix

Signed-off-by: nithinraok <[email protected]>

* on_pretrain_routine_start -> on_fit_start

Signed-off-by: nithinraok <[email protected]>

* add weights_save_path to deprecated args

Signed-off-by: nithinraok <[email protected]>

* style fix

Signed-off-by: nithinraok <[email protected]>

* Remove reference

Signed-off-by: SeanNaren <[email protected]>

* revert torch.long change

Signed-off-by: nithinraok <[email protected]>

Signed-off-by: nithinraok <[email protected]>
Signed-off-by: SeanNaren <[email protected]>
Co-authored-by: SeanNaren <[email protected]>
Signed-off-by: Hainan Xu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants