Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"AttributeError: 'torch._C.Value' object has no attribute 'float'" sparseml.transformers.export_onnx for zoo:bert-base_cased-squad_wikipedia_bookcorpus-pruned80.4block_quantized #1847

Merged
merged 3 commits into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading