






'''simple docstring'''





from ...configuration_utils import PretrainedConfig
from ...utils import logging


a__       =     logging.get_logger(__name__)

a__       =     {
    """google/vivit-b-16x2-kinetics400""": (
        """https://huggingface.co/google/vivit-b-16x2-kinetics400/resolve/main/config.json"""
    ),
    # See all Vivit models at https://huggingface.co/models?filter=vivit
}


class    _lowerCAmelCase			(		lowercase_      ):



				"""simple docstring"""



				_lowercase				:   Any      =  '''vivit'''



				def __init__(      self    :    Optional[Any]			,		UpperCamelCase__    :    Union[str, Any]=2_2_4			,		UpperCamelCase__    :    List[str]=3_2			,		UpperCamelCase__    :    Dict=[2, 1_6, 1_6]			,		UpperCamelCase__    :    List[str]=3			,		UpperCamelCase__    :    Optional[Any]=7_6_8			,		UpperCamelCase__    :    Dict=1_2			,		UpperCamelCase__    :    Union[str, Any]=1_2			,		UpperCamelCase__    :    Dict=3_0_7_2			,		UpperCamelCase__    :    Any="gelu_fast"			,		UpperCamelCase__    :    Tuple=0.0			,		UpperCamelCase__    :    List[Any]=0.0			,		UpperCamelCase__    :    Optional[int]=0.02			,		UpperCamelCase__    :    Optional[int]=1E-06			,		UpperCamelCase__    :    str=True			,		**UpperCamelCase__    :    Any			,		):






											'''simple docstring'''







											snake_case__	  =       hidden_size
											snake_case__	  =       num_hidden_layers
											snake_case__	  =       num_attention_heads
											snake_case__	  =       intermediate_size
											snake_case__	  =       hidden_act
											snake_case__	  =       hidden_dropout_prob
											snake_case__	  =       attention_probs_dropout_prob
											snake_case__	  =       initializer_range
											snake_case__	  =       layer_norm_eps

											snake_case__	  =       image_size
											snake_case__	  =       num_frames
											snake_case__	  =       tubelet_size
											snake_case__	  =       num_channels
											snake_case__	  =       qkv_bias

											super().__init__(**UpperCamelCase__)








import os
import time

import pytest

from datasets.utils.filelock import FileLock, Timeout

def _UpperCAmelCase   (	a						:	List[Any] ):
							snake_case__	  =       FileLock(str(tmpdir / """foo.lock""" ) )
							snake_case__	  =       FileLock(str(tmpdir / """foo.lock""" ) )
							snake_case__	  =       0.01
							with locka.acquire():
														with pytest.raises(a ):
																					snake_case__	  =       time.time()
																					locka.acquire(a )
																					assert time.time() - _start > timeout



def _UpperCAmelCase   (	a						:	str ):
							snake_case__	  =       """a""" * 1000 + """.lock"""
							snake_case__	  =       FileLock(str(tmpdir / filename ) )
							assert locka._lock_file.endswith(""".lock""" )
							assert not locka._lock_file.endswith(a )
							assert len(os.path.basename(locka._lock_file ) ) <= 255
							snake_case__	  =       FileLock(tmpdir / filename )
							with locka.acquire():
														with pytest.raises(a ):
																					locka.acquire(0 )
