Skip to content

Commit 2eba14e

Browse files
committed
disable export=False in IPEXModel
1 parent 9af1b7c commit 2eba14e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

optimum/intel/ipex/modeling_base.py

+3
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ def _from_pretrained(
203203
subfolder: str = "",
204204
**kwargs,
205205
):
206+
if not getattr(config, "torchscript", False):
207+
raise ValueError("`torchscript` should be set to True to load TorchScript model")
208+
206209
# Load the model from local directory
207210
if os.path.isdir(model_id):
208211
model_cache_path = os.path.join(model_id, file_name)

0 commit comments

Comments
 (0)