Fix/warnings stacklevel mvapich runner
MVAPICHRunner.backend_exists calls warnings.warn without stacklevel,
so Python reports the warning as coming from inside DeepSpeed rather than
the user's code. Adding stacklevel=2 fixes the reported call site.
No functional change.
Hi @nathon-lee,
Thank you for the PR~ I wonder if stacklevel=2 still doesn't point the user code. Before this PR, it isdeepspeed/launcher/multinode_runner.py but it will be deepspeed/launcher/runner.py.
Hi @nathon-lee, Thank you for the PR~ I wonder if
stacklevel=2still doesn't point the user code. Before this PR, it isdeepspeed/launcher/multinode_runner.pybut it will bedeepspeed/launcher/runner.py.
Hi @tohtana, you're right — stacklevel=2 still points inside DeepSpeed, and since a RuntimeError is raised right after, users won't even see the warning. This change has no real effect. Converting to draft while I reconsider. Thanks!