





import importlib.metadata
import sys

from transformers.testing_utils import TestCasePlus
from transformers.utils.versions import require_version, require_version_core


_lowerCamelCase				 =     importlib.metadata.version('numpy')
_lowerCamelCase				 =     '.'.join([str(x) for x in sys.version_info[:3]])




class 					UpperCamelCase_    (       UpperCamelCase__      ):


							def        _snake_case					(							self      :int						)				->				int:



									"""simple docstring"""



									require_version_core("""numpy<1000.4.5"""						)
									require_version_core("""numpy<1000.4"""						)
									require_version_core("""numpy<1000"""						)

									# le
									require_version_core("""numpy<=1000.4.5"""						)
									require_version_core(f'''numpy<={numpy_ver}'''						)

									# eq
									require_version_core(f'''numpy=={numpy_ver}'''						)

									# ne
									require_version_core("""numpy!=1000.4.5"""						)

									# ge
									require_version_core("""numpy>=1.0"""						)
									require_version_core("""numpy>=1.0.0"""						)
									require_version_core(f'''numpy>={numpy_ver}'''						)

									# gt
									require_version_core("""numpy>1.0.0"""						)

									# mix
									require_version_core("""numpy>1.0.0,<1000"""						)

									# requirement w/o version
									require_version_core("""numpy"""						)

									# unmet requirements due to version conflict
									for req in ["numpy==1.0.0", "numpy>=1000.0.0", f'''numpy<{numpy_ver}''']:
											try:
													require_version_core(__A						)
											except ImportError as e:
													self.assertIn(f'''{req} is required'''							,			str(__A						)						)
													self.assertIn("""but found"""							,			str(__A						)						)

        # unmet requirements due to missing module
									for req in ["numpipypie>1", "numpipypie2"]:
											try:
													require_version_core(__A						)
											except importlib.metadata.PackageNotFoundError as e:
													self.assertIn(f'''The \'{req}\' distribution was not found and is required by this application'''							,			str(__A						)						)
													self.assertIn("""Try: pip install transformers -U"""							,			str(__A						)						)

        # bogus requirements formats:
        # 1. whole thing
									for req in ["numpy??1.0.0", "numpy1.0.0"]:
											try:
													require_version_core(__A						)
											except ValueError as e:
													self.assertIn("""requirement needs to be in the pip package format"""							,			str(__A						)						)
        # 2. only operators
									for req in ["numpy=1.0.0", "numpy == 1.00", "numpy<>1.0.0", "numpy><1.00", "numpy>>1.0.0"]:
											try:
													require_version_core(__A						)
											except ValueError as e:
													self.assertIn("""need one of """							,			str(__A						)						)


							def        _snake_case					(							self      :Optional[Any]						)				->				Tuple:



									"""simple docstring"""



									require_version("""python>=3.6.0"""						)

									# not matching requirements
									for req in ["python>9.9.9", "python<3.0.0"]:
											try:
													require_version_core(__A						)
											except ImportError as e:
													self.assertIn(f'''{req} is required'''							,			str(__A						)						)
													self.assertIn(f'''but found python=={python_ver}'''							,			str(__A						)						)






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


_lowerCamelCase							=     logging.get_logger(__name__)

_lowerCamelCase							=     {
    'MCG-NJU/videomae-base': 'https://huggingface.co/MCG-NJU/videomae-base/resolve/main/config.json',
}




class 					UpperCamelCase_    (       UpperCamelCase__      ):
							lowerCamelCase_          =   "videomae"


							def __init__(							self      :Dict							,			__A      :List[str]=224							,			__A      :List[Any]=16							,			__A      :int=3							,			__A      :Optional[Any]=16							,			__A      :Optional[int]=2							,			__A      :Optional[Any]=768							,			__A      :List[str]=12							,			__A      :Optional[Any]=12							,			__A      :List[str]=3072							,			__A      :Tuple="gelu"							,			__A      :Optional[int]=0.0							,			__A      :Union[str, Any]=0.0							,			__A      :int=0.0_2							,			__A      :Union[str, Any]=1E-12							,			__A      :Optional[Any]=True							,			__A      :Union[str, Any]=True							,			__A      :Optional[int]=6							,			__A      :Tuple=384							,			__A      :str=4							,			__A      :List[str]=1536							,			__A      :Dict=True							,			**__A      :int							,			)				->				Optional[int]:



									"""simple docstring"""



									super().__init__(**__A						)

									SCREAMING_SNAKE_CASE__								= image_size
									SCREAMING_SNAKE_CASE__								= patch_size
									SCREAMING_SNAKE_CASE__								= num_channels
									SCREAMING_SNAKE_CASE__								= num_frames
									SCREAMING_SNAKE_CASE__								= tubelet_size

									SCREAMING_SNAKE_CASE__								= hidden_size
									SCREAMING_SNAKE_CASE__								= num_hidden_layers
									SCREAMING_SNAKE_CASE__								= num_attention_heads
									SCREAMING_SNAKE_CASE__								= intermediate_size
									SCREAMING_SNAKE_CASE__								= hidden_act
									SCREAMING_SNAKE_CASE__								= hidden_dropout_prob
									SCREAMING_SNAKE_CASE__								= attention_probs_dropout_prob
									SCREAMING_SNAKE_CASE__								= initializer_range
									SCREAMING_SNAKE_CASE__								= layer_norm_eps
									SCREAMING_SNAKE_CASE__								= qkv_bias
									SCREAMING_SNAKE_CASE__								= use_mean_pooling

									SCREAMING_SNAKE_CASE__								= decoder_num_attention_heads
									SCREAMING_SNAKE_CASE__								= decoder_hidden_size
									SCREAMING_SNAKE_CASE__								= decoder_num_hidden_layers
									SCREAMING_SNAKE_CASE__								= decoder_intermediate_size
									SCREAMING_SNAKE_CASE__								= norm_pix_loss