Skip to content

Commit 7818f5a

Browse files
committed
fix
1 parent 917ab81 commit 7818f5a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/ipex/test_modeling.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
from optimum.exporters.onnx import MODEL_TYPES_REQUIRING_POSITION_IDS
3131
from optimum.intel import (
3232
IPEXModel,
33-
IPEXModelForAudioClassification,
3433
IPEXModelForCausalLM,
35-
IPEXModelForImageClassification,
3634
IPEXModelForMaskedLM,
3735
IPEXModelForQuestionAnswering,
3836
IPEXModelForSequenceClassification,
@@ -87,7 +85,6 @@ class IPEXModelTest(unittest.TestCase):
8785
SUPPORTED_ARCHITECTURES = (
8886
"albert",
8987
"bert",
90-
"convbert",
9188
"distilbert",
9289
"electra",
9390
"flaubert",
@@ -124,8 +121,10 @@ def test_pipeline(self, model_arch):
124121
tokenizer = AutoTokenizer.from_pretrained(model_id)
125122
pipe = pipeline(self.IPEX_MODEL_CLASS.export_feature, model=model, tokenizer=tokenizer)
126123
text = "This restaurant is awesome"
127-
_ = pipe(text)
124+
if self.IPEX_MODEL_CLASS.export_feature == "fill-mask":
125+
text += tokenizer.mask_token
128126

127+
_ = pipe(text)
129128
self.assertEqual(pipe.device, model.device)
130129

131130

0 commit comments

Comments
 (0)