Add video classification pipeline (#20151)
* 🚧 wip video classification pipeline * 🚧 wip - add is_decord_available check * 🐛 add missing import * ✅ add tests * 🔧 add decord to setup extras * 🚧 add is_decord_available * ✨ add video-classification pipeline * 📝 add video classification pipe to docs * 🐛 add missing VideoClassificationPipeline import * 📌 add decord install in test runner * ✅ fix url inputs to video-classification pipeline * ✨ updates from review * 📝 add video cls pipeline to docs * 📝 add docstring * 🔥 remove unused import * 🔥 remove some code * 📝 docfix
This commit is contained in:
@@ -51,6 +51,7 @@ from .utils import (
|
||||
is_apex_available,
|
||||
is_bitsandbytes_available,
|
||||
is_bs4_available,
|
||||
is_decord_available,
|
||||
is_detectron2_available,
|
||||
is_faiss_available,
|
||||
is_flax_available,
|
||||
@@ -446,6 +447,13 @@ def require_spacy(test_case):
|
||||
return unittest.skipUnless(is_spacy_available(), "test requires spacy")(test_case)
|
||||
|
||||
|
||||
def require_decord(test_case):
|
||||
"""
|
||||
Decorator marking a test that requires decord. These tests are skipped when decord isn't installed.
|
||||
"""
|
||||
return unittest.skipUnless(is_decord_available(), "test requires decord")(test_case)
|
||||
|
||||
|
||||
def require_torch_multi_gpu(test_case):
|
||||
"""
|
||||
Decorator marking a test that requires a multi-GPU setup (in PyTorch). These tests are skipped on a machine without
|
||||
|
||||
Reference in New Issue
Block a user