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

Fixed Apex guard when imported classes are used for default values #3700

Merged
merged 7 commits into from
Feb 17, 2022

Conversation

michalivne
Copy link
Collaborator

  1. Added ApexGuardDefaults class that provides None attributes when an Apex class is missing.
  2. Fixed Apex guard.

Signed-off-by: Micha Livne [email protected]

What does this PR do ?

This PR fixes an Apex guard that leaves constructors with undefined constructor values.

Collection: [Note which collection this PR will affect]

Changelog

  • Added ApexGuardDefaults class to nemo/collections/nlp/modules/common/megatron/utils.py
  • Used ApexGuardDefaults to replace missing classes in nemo/collections/nlp/modules/common/megatron/transformer.py

…n Apex class is missing.

2. Fixed Apex guard.

Signed-off-by: Micha Livne <[email protected]>
Signed-off-by: Micha Livne <[email protected]>
Signed-off-by: Micha Livne <[email protected]>
Signed-off-by: Micha Livne <[email protected]>
Copy link
Collaborator

@ericharper ericharper left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

ericharper
ericharper previously approved these changes Feb 17, 2022
Signed-off-by: Micha Livne <[email protected]>
Copy link
Collaborator

@ericharper ericharper left a comment

Choose a reason for hiding this comment

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

LGTM.

@michalivne michalivne merged commit 1b89a70 into NVIDIA:main Feb 17, 2022
@michalivne michalivne deleted the bug-fix-apex-guard-transformer branch February 17, 2022 19:48
fayejf pushed a commit that referenced this pull request Mar 2, 2022
…3700)

* 1. Added ApexGuardDefaults class that provides None attributes when an Apex class is missing.
2. Fixed Apex guard.

Signed-off-by: Micha Livne <[email protected]>

* 1. Fixed style.

Signed-off-by: Micha Livne <[email protected]>

* 1.Added more guard.

Signed-off-by: Micha Livne <[email protected]>

* 1. Fixed style.

Signed-off-by: Micha Livne <[email protected]>

* 1. Added another guard.

Signed-off-by: Micha Livne <[email protected]>

Co-authored-by: Micha Livne <[email protected]>
Co-authored-by: Eric Harper <[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.

2 participants