






"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


snake_case : Optional[int]     		=		logging.get_logger(__name__)

snake_case : int     		=		{
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}



class        UpperCamelCase__ (				a_):







    """simple docstring"""
    __UpperCAmelCase           = """megatron-bert"""







    def __init__(		self :	Tuple				,    UpperCamelCase_ :	List[str]=2_9_0_5_6				,    UpperCamelCase_ :	Optional[Any]=1_0_2_4				,    UpperCamelCase_ :	Dict=2_4				,    UpperCamelCase_ :	Optional[int]=1_6				,    UpperCamelCase_ :	str=4_0_9_6				,    UpperCamelCase_ :	List[str]="gelu"				,    UpperCamelCase_ :	Union[str, Any]=0.1				,    UpperCamelCase_ :	str=0.1				,    UpperCamelCase_ :	int=5_1_2				,    UpperCamelCase_ :	int=2				,    UpperCamelCase_ :	Optional[Any]=0.02				,    UpperCamelCase_ :	str=1e-1_2				,    UpperCamelCase_ :	Union[str, Any]=0				,    UpperCamelCase_ :	str="absolute"				,    UpperCamelCase_ :	int=True				,    **UpperCamelCase_ :	Union[str, Any]				,    ):





           '''simple docstring'''

           super().__init__(pad_token_id=UpperCamelCase_				,    **UpperCamelCase_ )

           __magic_name__      				=    vocab_size
           __magic_name__      				=    hidden_size
           __magic_name__      				=    num_hidden_layers
           __magic_name__      				=    num_attention_heads
           __magic_name__      				=    hidden_act
           __magic_name__      				=    intermediate_size
           __magic_name__      				=    hidden_dropout_prob
           __magic_name__      				=    attention_probs_dropout_prob
           __magic_name__      				=    max_position_embeddings
           __magic_name__      				=    type_vocab_size
           __magic_name__      				=    initializer_range
           __magic_name__      				=    layer_norm_eps
           __magic_name__      				=    position_embedding_type
           __magic_name__      				=    use_cache







"""simple docstring"""
import os
import tempfile
import unittest

from transformers.models.marian.convert_marian_tatoeba_to_pytorch import DEFAULT_REPO, TatoebaConverter
from transformers.testing_utils import slow
from transformers.utils import cached_property



@unittest.skipUnless(os.path.exists(a_)							,	"""Tatoeba directory does not exist.""")
class        UpperCamelCase__ (				unittest.TestCase):







    """simple docstring"""







    @cached_property
    def 				a__			(		self :	int ):





           '''simple docstring'''

           __magic_name__      				=    tempfile.mkdtemp()
           return TatoebaConverter(save_dir=UpperCamelCase_ )







    @slow
    def 				a__			(		self :	List[str] ):





           '''simple docstring'''

           self.resolver.convert_models(['heb-eng'] )







    @slow
    def 				a__			(		self :	Tuple ):





           '''simple docstring'''

           __magic_name__				,  __magic_name__      				=    self.resolver.write_model_card('opus-mt-he-en'				,    dry_run=UpperCamelCase_ )
           assert mmeta["long_pair"] == "heb-eng"