torch.distrubuted: lazy import pdb only when calling breakpoint()#163000
torch.distrubuted: lazy import pdb only when calling breakpoint()#163000kelu-wandb wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/163000
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 Cancelled JobAs of commit cbd3bab with merge base 1247dde ( NEW FAILURES - The following jobs have failed:
CANCELLED JOB - The following job was cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This PR needs a
|
ezyang
left a comment
There was a problem hiding this comment.
Does the deadlock occur easily (eg testable)?
|
@pytorchbot merge |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
|
need cla |
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
|
Re-created this PR as PR #171818 |
DRAFT NOT YET READY
Fixes #159645
It makes sense to import debugging libraries when actually using debugging tools.
This also avoids the following chain of imports in Python 3.13:
torch->torch.distributed->rlcompleter->readlineImporting
readline, in turn, attempts to accessstdin, which deadlocks if run from asubprocesslaunched withprocess_group=0orpreexec_fn=setpgrpbecause it doesn't have access to stdin.Testing
On Mac:
cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @ezyang @msaroufim @dcci