Remove deprecated (#8604)
* Remove old deprecated arguments Co-authored-by: LysandreJik <lysandre.debut@reseau.eseo.fr> * Remove needless imports * Fix tests Co-authored-by: LysandreJik <lysandre.debut@reseau.eseo.fr>
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import unittest
|
||||
|
||||
import pytest
|
||||
|
||||
from transformers import pipeline
|
||||
from transformers.testing_utils import require_tf, require_torch, slow
|
||||
|
||||
@@ -53,13 +51,6 @@ class FillMaskPipelineTests(MonoInputPipelineCommonMixin, unittest.TestCase):
|
||||
]
|
||||
expected_check_keys = ["sequence"]
|
||||
|
||||
@require_torch
|
||||
def test_torch_topk_deprecation(self):
|
||||
# At pipeline initialization only it was not enabled at pipeline
|
||||
# call site before
|
||||
with pytest.warns(FutureWarning, match=r".*use `top_k`.*"):
|
||||
pipeline(task="fill-mask", model=self.small_models[0], topk=1)
|
||||
|
||||
@require_torch
|
||||
def test_torch_fill_mask(self):
|
||||
valid_inputs = "My name is <mask>"
|
||||
|
||||
Reference in New Issue
Block a user