mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Realize LazyVariableTracker before raising exception (#163350)
Improves error message reported on #163321 Pull Request resolved: https://github.com/pytorch/pytorch/pull/163350 Approved by: https://github.com/Skylion007, https://github.com/xmfan
This commit is contained in:
committed by
PyTorch MergeBot
parent
03f34fd307
commit
bc7b17a36d
@ -68,7 +68,9 @@ def raise_unhashable(arg, tx=None):
|
||||
|
||||
tx = InstructionTranslator.current_tx()
|
||||
raise_observed_exception(
|
||||
TypeError, tx, args=[ConstantVariable(f"unhashable type: {type(arg)}")]
|
||||
TypeError,
|
||||
tx,
|
||||
args=[ConstantVariable(f"unhashable type: {type(arg.realize())}")],
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user