This reverts commit 35bd089a24.
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
import unittest
|
||||
|
||||
import numpy as np
|
||||
import tensorflow as tf
|
||||
import torch
|
||||
|
||||
from transformers import (
|
||||
FEATURE_EXTRACTOR_MAPPING,
|
||||
@@ -135,22 +133,6 @@ class FeatureExtractionPipelineTests(unittest.TestCase, metaclass=PipelineTestCa
|
||||
tokenize_kwargs=tokenize_kwargs,
|
||||
)
|
||||
|
||||
@require_torch
|
||||
def test_return_tensors_pt(self):
|
||||
feature_extractor = pipeline(
|
||||
task="feature-extraction", model="hf-internal-testing/tiny-random-distilbert", framework="pt"
|
||||
)
|
||||
outputs = feature_extractor("This is a test" * 100, return_tensors=True)
|
||||
self.assertTrue(torch.is_tensor(outputs))
|
||||
|
||||
@require_tf
|
||||
def test_return_tensors_tf(self):
|
||||
feature_extractor = pipeline(
|
||||
task="feature-extraction", model="hf-internal-testing/tiny-random-distilbert", framework="tf"
|
||||
)
|
||||
outputs = feature_extractor("This is a test" * 100, return_tensors=True)
|
||||
self.assertTrue(tf.is_tensor(outputs))
|
||||
|
||||
def get_shape(self, input_, shape=None):
|
||||
if shape is None:
|
||||
shape = []
|
||||
|
||||
Reference in New Issue
Block a user