mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE]: Enable Ruff + Flake8 G201,G202 logging format rule. (#114474)
Standardizes logging calls to always use logging.exception instead of logging.error where appropriate and enforces it with a lint. Pull Request resolved: https://github.com/pytorch/pytorch/pull/114474 Approved by: https://github.com/jansel, https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
3a4dea99df
commit
4bb3a02d02
@ -477,14 +477,13 @@ class MultiprocessContext(PContext):
|
||||
failed_proc = self._pc.processes[failed_local_rank]
|
||||
error_filepath = self.error_files[failed_local_rank]
|
||||
|
||||
log.error(
|
||||
log.exception(
|
||||
"failed (exitcode: %s)"
|
||||
" local_rank: %s (pid: %s)"
|
||||
" of fn: %s (start_method: %s)",
|
||||
failed_proc.exitcode,
|
||||
failed_local_rank, e.pid,
|
||||
fn_name, self.start_method,
|
||||
exc_info=True,
|
||||
)
|
||||
|
||||
self.close()
|
||||
|
Reference in New Issue
Block a user