Uh oh!
There was an error while loading. Please reload this page.
Add module level filter for deprecation warning in common - #813
Merged
Conversation
Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>
timmoon10
requested changes
Apr 26, 2024
| from enum import Enum | ||
| warnings.simplefilter('default') | ||
| warnings.filterwarnings("module", category=DeprecationWarning, module="utils") |
Member
There was a problem hiding this comment.
We're not matching the right module:
Suggested change
| warnings.filterwarnings("module", category=DeprecationWarning, module="utils") | |
| warnings.filterwarnings( | |
| "default", | |
| category=DeprecationWarning, | |
| module="transformer_engine.common.utils", | |
| ) |
With this fix, I see the expected behavior with the following test case:
importwarningswarnings.simplefilter("error")
importtransformer_engine.jaxasteprint(te.MajorShardingType.SINGLE) # Print warningprint(te.MajorShardingType.DP) # No warningx=te.ShardingResource() # Print warningwarnings.warn("hi", DeprecationWarning) # ErrorOne thing I don't understand about warnings.filterwarnings is the difference between action="default" and action="module" since I see the same behavior with both. The docs say that action="module" only prints the first warning in a module, but that doesn't seem to be happening.
Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>
ksivaman
commented
Apr 29, 2024
MemberAuthor
/te-ci pytorch |
phu0ngng pushed a commit
to phu0ngng/TransformerEngine
that referenced
this pull request
May 3, 2024
* Add module level filter for deprecation warning in common Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> * Fix module Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> --------- Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>
pggPL pushed a commit
to pggPL/TransformerEngine
that referenced
this pull request
May 23, 2024
* Add module level filter for deprecation warning in common Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> * Fix module Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> --------- Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#812