mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[pytree] Register normal class to register_dataclass (#147752)
Fixes https://github.com/pytorch/pytorch/pull/147532#discussion_r1964365330 Pull Request resolved: https://github.com/pytorch/pytorch/pull/147752 Approved by: https://github.com/zou3519
This commit is contained in:
committed by
PyTorch MergeBot
parent
203a27e0ce
commit
60fe0922f6
@ -523,9 +523,4 @@ def register_dataclass(
|
||||
print(ep)
|
||||
|
||||
"""
|
||||
|
||||
from torch._export.utils import register_dataclass_as_pytree_node
|
||||
|
||||
return register_dataclass_as_pytree_node(
|
||||
cls, serialized_type_name=serialized_type_name
|
||||
)
|
||||
pytree.register_dataclass(cls, serialized_type_name=serialized_type_name)
|
||||
|
Reference in New Issue
Block a user