Byebye torch 1.10 (#28207)

* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2024-01-11 16:18:27 +01:00
committed by GitHub
parent e768616afa
commit 59cd9de39d
31 changed files with 39 additions and 194 deletions

View File

@@ -40,7 +40,6 @@ if is_torch_available():
LongT5Model,
)
from transformers.models.longt5.modeling_longt5 import LONGT5_PRETRAINED_MODEL_ARCHIVE_LIST
from transformers.pytorch_utils import is_torch_less_than_1_11
class LongT5ModelTester:
@@ -595,10 +594,6 @@ class LongT5ModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMix
model = LongT5Model.from_pretrained(model_name)
self.assertIsNotNone(model)
@unittest.skipIf(
not is_torch_available() or is_torch_less_than_1_11,
"Test failed with torch < 1.11 with an exception in a C++ file.",
)
@slow
def test_export_to_onnx(self):
config_and_inputs = self.model_tester.prepare_config_and_inputs()