Replace 'decord' with 'av' in VideoClassificationPipeline (#29747)
* replace the 'decord' with 'av' in VideoClassificationPipeline * fix the check of backend in VideoClassificationPipeline * adjust the order of imports * format 'video_classification.py' * format 'video_classification.py' with ruff --------- Co-authored-by: wanqiancheng <13541261013@163.com>
This commit is contained in:
@@ -57,6 +57,7 @@ from .utils import (
|
||||
is_aqlm_available,
|
||||
is_auto_awq_available,
|
||||
is_auto_gptq_available,
|
||||
is_av_available,
|
||||
is_bitsandbytes_available,
|
||||
is_bs4_available,
|
||||
is_cv2_available,
|
||||
@@ -1010,6 +1011,13 @@ def require_aqlm(test_case):
|
||||
return unittest.skipUnless(is_aqlm_available(), "test requires aqlm")(test_case)
|
||||
|
||||
|
||||
def require_av(test_case):
|
||||
"""
|
||||
Decorator marking a test that requires av
|
||||
"""
|
||||
return unittest.skipUnless(is_av_available(), "test requires av")(test_case)
|
||||
|
||||
|
||||
def require_bitsandbytes(test_case):
|
||||
"""
|
||||
Decorator marking a test that requires the bitsandbytes library. Will be skipped when the library or its hard dependency torch is not installed.
|
||||
|
||||
Reference in New Issue
Block a user