mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE]: Improve exception typing. Remove NOQAs (#125535)
Improve some exception typing Pull Request resolved: https://github.com/pytorch/pytorch/pull/125535 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
82b7b59d2a
commit
8cad88e1f3
@ -986,7 +986,7 @@ class SummaryWriter:
|
||||
"warning: Embedding dir exists, did you set global_step for add_embedding()?"
|
||||
)
|
||||
else:
|
||||
raise Exception( # noqa: TRY002
|
||||
raise FileExistsError(
|
||||
f"Path: `{save_path}` exists, but is a file. Cannot proceed."
|
||||
)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user