mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Enable trace through the collections module (#159365)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/159365 Approved by: https://github.com/zou3519
This commit is contained in:
committed by
PyTorch MergeBot
parent
17de899709
commit
0242d40fa5
@ -1596,8 +1596,13 @@ class CatchErrorsWrapper:
|
||||
)
|
||||
return ConvertFrameReturn()
|
||||
|
||||
if frame.f_code.co_filename == "<string>" and frame.f_code.co_name == "__new__":
|
||||
# nametuple constructor
|
||||
if (
|
||||
frame.f_code.co_filename == "<string>" and frame.f_code.co_name == "__new__"
|
||||
) or (
|
||||
frame.f_code.co_filename.endswith("collections/__init__.py")
|
||||
and frame.f_code.co_name == "_make"
|
||||
):
|
||||
# nametuple constructor/_make
|
||||
return ConvertFrameReturn()
|
||||
if torch._dynamo.utils.get_optimize_ddp_mode() == "ddp_optimizer":
|
||||
ddp_module = DistributedDataParallel._get_active_ddp_module()
|
||||
|
Reference in New Issue
Block a user