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 rule for deprecated _register_pytree_node #44

Merged
merged 3 commits into from Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,9 @@
from torch.utils._pytree import _register_pytree_node

_register_pytree_node()

from torch.utils import _pytree as xx
xx._register_pytree_node()

import torch
torch.utils._pytree._register_pytree_node()
@@ -0,0 +1,4 @@
1:1 TOR103 Import of deprecated function torch.utils._pytree._register_pytree_node
3:1 TOR101 Use of deprecated function torch.utils._pytree._register_pytree_node
6:1 TOR101 Use of deprecated function torch.utils._pytree._register_pytree_node
9:1 TOR101 Use of deprecated function torch.utils._pytree._register_pytree_node
@@ -0,0 +1,9 @@
from torch.utils._pytree import _register_pytree_node

_register_pytree_node()

from torch.utils import _pytree as xx
xx._register_pytree_node()

import torch
torch.utils._pytree._register_pytree_node()
@@ -0,0 +1,9 @@
from torch.utils._pytree import register_pytree_node, _register_pytree_node
Copy link
Contributor

Choose a reason for hiding this comment

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

I hoped it would no longer import _register_pytree_node...
(Not for this PR, but an issue for the future).


register_pytree_node()

from torch.utils import _pytree as xx
xx.register_pytree_node()

import torch
torch.utils._pytree.register_pytree_node()
5 changes: 5 additions & 0 deletions torchfix/deprecated_symbols.yaml
Expand Up @@ -65,6 +65,11 @@
remove_pr:
reference: https://github.com/pytorch-labs/torchfix#torchnnutilsweight_norm

- name: torch.utils._pytree._register_pytree_node
deprecate_pr: https://github.com/pytorch/pytorch/pull/112111
remove_pr:
replacement: torch.utils._pytree.register_pytree_node
ZainRizvi marked this conversation as resolved.
Show resolved Hide resolved

- name: torch.backends.cuda.sdp_kernel
deprecate_pr: https://github.com/pytorch/pytorch/pull/114689
remove_pr:
Expand Down