Skip to content

Commit

Permalink
Fix for T206766523 ("Your diff, D65462767, broke some tests") (pytorc…
Browse files Browse the repository at this point in the history
…h#139804)

Summary:
This is trying to fix a regression caused by pytorch#139757. We now don't want to log args and kwargs directly because if they contain tensor or tensor subclass it would take lots of time in conversion to string or even not supported.

Reviewed By: fduwjj

Differential Revision: D65490202

Pull Request resolved: pytorch#139804
Approved by: https://github.com/XilunWu
  • Loading branch information
fduwjj authored and pytorchmergebot committed Nov 8, 2024
1 parent d72a308 commit ba9645f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions torch/distributed/c10d_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def _get_msg_dict(func_name, *args, **kwargs) -> Dict[str, Any]:
group = kwargs.get("group") or kwargs.get("process_group")
msg_dict = {
"func_name": f"{func_name}",
"args": f"{args}, {kwargs}",
"pg_name": f"{dist._get_process_group_name(kwargs.get('pg'))}", # type: ignore[arg-type]
"backend": f"{dist.get_backend(group)}",
"world_size": f"{dist.get_world_size()}",
Expand All @@ -67,7 +66,6 @@ def _get_msg_dict(func_name, *args, **kwargs) -> Dict[str, Any]:
else:
msg_dict = {
"func_name": f"{func_name}",
"args": f"{args}, {kwargs}",
}
return msg_dict

Expand Down

0 comments on commit ba9645f

Please sign in to comment.