Pipeline testing - using tiny models on Hub (#20426)
* rework pipeline tests * run pipeline tests * fix * fix * fix * revert the changes in get_test_pipeline() parameter list * fix expected error message * skip a test * clean up --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -35,11 +35,11 @@ from .test_pipelines_common import ANY, PipelineTestCaseMeta
|
||||
class VideoClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta):
|
||||
model_mapping = MODEL_FOR_VIDEO_CLASSIFICATION_MAPPING
|
||||
|
||||
def get_test_pipeline(self, model, tokenizer, feature_extractor, image_processor):
|
||||
def get_test_pipeline(self, model, tokenizer, processor):
|
||||
example_video_filepath = hf_hub_download(
|
||||
repo_id="nateraw/video-demo", filename="archery.mp4", repo_type="dataset"
|
||||
)
|
||||
video_classifier = VideoClassificationPipeline(model=model, feature_extractor=feature_extractor, top_k=2)
|
||||
video_classifier = VideoClassificationPipeline(model=model, feature_extractor=processor, top_k=2)
|
||||
examples = [
|
||||
example_video_filepath,
|
||||
"https://huggingface.co/datasets/nateraw/video-demo/resolve/main/archery.mp4",
|
||||
|
||||
Reference in New Issue
Block a user