Revert "[BE]: Enable RUFF TRY400 rule - log.exception (#153473)"

This reverts commit 4f4ecc583e0f48ad2d062a53bf91c61ab40b4948.

Reverted https://github.com/pytorch/pytorch/pull/153473 on behalf of https://github.com/jeanschmidt due to seems to have broken internal signals, @albanD may I count on you to help the author merge his PR? D74837988 ([comment](https://github.com/pytorch/pytorch/pull/153473#issuecomment-2886017075))
This commit is contained in:
PyTorch MergeBot
2025-05-16 08:29:26 +00:00
parent 86c6f71ddb
commit 3443627e07
23 changed files with 46 additions and 51 deletions

View File

@ -297,7 +297,7 @@ def _barrier(worker_names):
try:
_all_gather(None, set(worker_names))
except RuntimeError as ex:
logger.error("Failed to complete barrier, got error %s", ex) # noqa: TRY400
logger.error("Failed to complete barrier, got error %s", ex)
@_require_initialized
@ -312,7 +312,7 @@ def _wait_all_workers(timeout=DEFAULT_SHUTDOWN_TIMEOUT):
try:
_all_gather(None, timeout=timeout)
except RuntimeError as ex:
logger.error( # noqa: TRY400
logger.error(
"Failed to respond to 'Shutdown Proceed' in time, got error %s", ex
)
raise ex