-
Notifications
You must be signed in to change notification settings - Fork 309
Closed
Description
Exception messages appear to be intended to be format strings but are not. This leads to variable specifiers in the raised error message.
File ~/.local/lib/python3.10/site-packages/torchao/quantization/utils.py:126, in guard_dtype_size(tensor_arg, arg_name, dtype, size)
124 def guard_dtype_size(tensor_arg, arg_name, dtype=None, size=None):
125 if dtype is not None and tensor_arg.dtype != dtype:
--> 126 raise ValueError("Expected Tensor argument {arg_name} to have dtype {dtype}, but got {tensor_arg.dtype} instead.")
127 if size is not None and tensor_arg.size() != size:
128 raise ValueError("Expected Tensor argument {arg_name} to have size {size}, but got {tensor_arg.size()} instead.")
ValueError: Expected Tensor argument {arg_name} to have dtype {dtype}, but got {tensor_arg.dtype} instead.
Metadata
Metadata
Assignees
Labels
No labels