mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Improved message to suppress errors in _dynamo/exc.py (#97345)
If user adds simply to their code: ```python import torch torch._dynamo.config.suppress_errors = True ``` they will get: ``` AttributeError: module 'torch' has no attribute '_dynamo' ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/97345 Approved by: https://github.com/zou3519, https://github.com/kit1980
This commit is contained in:
parent
b51f92ebda
commit
0692bdd95f
|
|
@ -187,6 +187,7 @@ def augment_exc_message(exc, msg="\n"):
|
|||
msg += (
|
||||
"\n\n"
|
||||
"You can suppress this exception and fall back to eager by setting:\n"
|
||||
" import torch._dynamo\n"
|
||||
" torch._dynamo.config.suppress_errors = True\n"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user