Skip to content

Commit

Permalink
"AttributeError: 'torch._C.Value' object has no attribute 'float'" sp…
Browse files Browse the repository at this point in the history
…arseml.transformers.export_onnx for zoo:bert-base_cased-squad_wikipedia_bookcorpus-pruned80.4block_quantized (#1847)
  • Loading branch information
dbogunowicz committed Nov 22, 2023
1 parent 2bd5eb1 commit 2737ec4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sparseml/pytorch/utils/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def export_onnx(
https://pytorch.org/docs/stable/onnx.html
"""
if _PARSED_TORCH_VERSION >= version.parse("1.10.0") and opset < 13 and convert_qat:
warnings.warn(
raise ValueError(
"Exporting onnx with QAT and opset < 13 may result in errors. "
"Please use opset>=13 with QAT. "
"See https://github.com/pytorch/pytorch/issues/77455 for more info. "
Expand Down

0 comments on commit 2737ec4

Please sign in to comment.