Fix tests imports dpr (#5576)

* fix test imports

* fix max_length

* style

* fix tests
This commit is contained in:
Quentin Lhoest
2020-07-07 16:35:12 +02:00
committed by GitHub
parent d4886173b2
commit 4fedc1256c
3 changed files with 31 additions and 9 deletions

View File

@@ -17,10 +17,10 @@
import unittest
from transformers import is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device
from .test_configuration_common import ConfigTester
from .test_modeling_common import ModelTesterMixin, ids_tensor
from .utils import require_torch, slow, torch_device
if is_torch_available():

View File

@@ -14,6 +14,7 @@
# limitations under the License.
from transformers.testing_utils import slow
from transformers.tokenization_dpr import (
DPRContextEncoderTokenizer,
DPRContextEncoderTokenizerFast,
@@ -26,7 +27,6 @@ from transformers.tokenization_dpr import (
from transformers.tokenization_utils_base import BatchEncoding
from .test_tokenization_bert import BertTokenizationTest
from .utils import slow
class DPRContextEncoderTokenizationTest(BertTokenizationTest):