





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


__UpperCAmelCase : Optional[Any] 			=				logging.get_logger(__name__)

__UpperCAmelCase : Dict 			=				{
    "facebook/timesformer": "https://huggingface.co/facebook/timesformer/resolve/main/config.json",
}



class    UpperCAmelCase_	(							_a):
       '''simple docstring'''
       __UpperCamelCase      :     Union[str, Any]							=					"timesformer"






       def __init__(     self ,					__SCREAMING_SNAKE_CASE=224 ,					__SCREAMING_SNAKE_CASE=16 ,					__SCREAMING_SNAKE_CASE=3 ,					__SCREAMING_SNAKE_CASE=8 ,					__SCREAMING_SNAKE_CASE=768 ,					__SCREAMING_SNAKE_CASE=12 ,					__SCREAMING_SNAKE_CASE=12 ,					__SCREAMING_SNAKE_CASE=3_072 ,					__SCREAMING_SNAKE_CASE="gelu" ,					__SCREAMING_SNAKE_CASE=0.0 ,					__SCREAMING_SNAKE_CASE=0.0 ,					__SCREAMING_SNAKE_CASE=0.02 ,					__SCREAMING_SNAKE_CASE=1e-6 ,					__SCREAMING_SNAKE_CASE=True ,					__SCREAMING_SNAKE_CASE="divided_space_time" ,					__SCREAMING_SNAKE_CASE=0 ,					**__SCREAMING_SNAKE_CASE ,					):




              """simple docstring"""




              super().__init__(**__SCREAMING_SNAKE_CASE						)

              UpperCamelCase    :	Tuple   	=		image_size
              UpperCamelCase    :	str   	=		patch_size
              UpperCamelCase    :	Optional[int]   	=		num_channels
              UpperCamelCase    :	str   	=		num_frames

              UpperCamelCase    :	Tuple   	=		hidden_size
              UpperCamelCase    :	List[str]   	=		num_hidden_layers
              UpperCamelCase    :	Union[str, Any]   	=		num_attention_heads
              UpperCamelCase    :	List[Any]   	=		intermediate_size
              UpperCamelCase    :	int   	=		hidden_act
              UpperCamelCase    :	Optional[Any]   	=		hidden_dropout_prob
              UpperCamelCase    :	Tuple   	=		attention_probs_dropout_prob
              UpperCamelCase    :	int   	=		initializer_range
              UpperCamelCase    :	Any   	=		layer_norm_eps
              UpperCamelCase    :	Union[str, Any]   	=		qkv_bias

              UpperCamelCase    :	Tuple   	=		attention_type
              UpperCamelCase    :	int   	=		drop_path_rate





import re
from pathlib import Path
from unittest import TestCase

import pytest



@pytest.mark.integration
class    UpperCAmelCase_	(							_a):
       '''simple docstring'''






       def  _lowercase   (     self ,					__SCREAMING_SNAKE_CASE						):




              """simple docstring"""




              with open(__SCREAMING_SNAKE_CASE ,					encoding='''utf-8'''						) as input_file:
                     UpperCamelCase    :	str   	=		re.compile(R'''(?!.*\b(?:encoding|rb|w|wb|w+|wb+|ab|ab+)\b)(?<=\s)(open)\((.*)\)'''						)
                     UpperCamelCase    :	Optional[int]   	=		input_file.read()
                     UpperCamelCase    :	Union[str, Any]   	=		regexp.search(__SCREAMING_SNAKE_CASE						)

              return match






       def  _lowercase   (     self ,					__SCREAMING_SNAKE_CASE						):




              """simple docstring"""




              with open(__SCREAMING_SNAKE_CASE ,					encoding='''utf-8'''						) as input_file:
                     UpperCamelCase    :	Optional[int]   	=		re.compile(R'''#[^\r\n]*print\(|\"[^\r\n]*print\(|\"\"\".*?print\(.*?\"\"\"|(print\()''' ,					re.DOTALL						)
                     UpperCamelCase    :	Tuple   	=		input_file.read()
                     # use `re.finditer` to handle the case where the ignored groups would be matched first by `re.search`
                     UpperCamelCase    :	Dict   	=		regexp.finditer(__SCREAMING_SNAKE_CASE						)

              UpperCamelCase    :	int   	=		[match for match in matches if match is not None and match.group(1						) is not None]
              return matches[0] if matches else None






       def  _lowercase   (     self						):




              """simple docstring"""




              UpperCamelCase    :	int   	=		Path('''./datasets'''						)
              UpperCamelCase    :	Tuple   	=		list(dataset_paths.absolute().glob('''**/*.py'''						)						)

              for dataset in dataset_files:
                     if self._no_encoding_on_file_open(str(__SCREAMING_SNAKE_CASE						)						):
                            raise AssertionError(f"""open(...) must use utf-8 encoding in {dataset}"""						)






       def  _lowercase   (     self						):




              """simple docstring"""




              UpperCamelCase    :	Optional[int]   	=		Path('''./datasets'''						)
              UpperCamelCase    :	Tuple   	=		list(dataset_paths.absolute().glob('''**/*.py'''						)						)

              for dataset in dataset_files:
                     if self._no_print_statements(str(__SCREAMING_SNAKE_CASE						)						):
                            raise AssertionError(f"""print statement found in {dataset}. Use datasets.logger/logging instead."""						)

