Skip to content

Commit 329ef26

Browse files
committed
deprecate torch nn modules for ov quantizer
1 parent 87f9aa3 commit 329ef26

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

optimum/intel/openvino/quantization.py

+4
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ def quantize(
240240
)
241241

242242
elif isinstance(self.model, torch.nn.Module):
243+
logger.warning(
244+
"The support of `torch.nn.Module` will be deprecated in a future release of optimum-intel, please use the corresponding `OVModelForXxx` class to load you model."
245+
"To convert a PyTorch model to OpenVINO, you can set `export=True` when loading your model as `OVModelForXxx.from_pretrained(..., export=True)`"
246+
)
243247
self._quantize_torchmodel(
244248
calibration_dataset,
245249
save_directory,

0 commit comments

Comments
 (0)