Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Nov 3, 2023
1 parent 1929178 commit 9c0de3f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/neural_compressor/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import unittest

import torch
from packaging.version import Version, parse
from parameterized import parameterized
from transformers import AutoTokenizer, pipeline, set_seed

Expand All @@ -39,6 +40,7 @@
INCTrainer,
)
from optimum.intel.neural_compressor.utils import _HEAD_TO_AUTOMODELS, WEIGHTS_NAME
from optimum.version import __version__ as _optimum_version


os.environ["CUDA_VISIBLE_DEVICES"] = ""
Expand Down Expand Up @@ -133,6 +135,7 @@ def test_pipeline(self, model_id, task):

pipe(*inputs)

@unittest.skipIf(parse(_optimum_version) < Version("1.14.0"), "not supported, needs optimum>=v1.14.0")
def test_compare_with_and_without_past_key_values(self):
model_id = "echarlaix/tiny-random-gpt2-torchscript"
tokenizer = AutoTokenizer.from_pretrained(model_id)
Expand Down

0 comments on commit 9c0de3f

Please sign in to comment.