






"""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    __lowerCamelCase    (  unittest.TestCase  ):

   @cached_property
   def 						SCREAMING_SNAKE_CASE__ (					self      )		->       List[Any]:
       UpperCamelCase__         =    tempfile.mkdtemp()
       return TatoebaConverter(save_dir=snake_case_      )

   @slow
   def 						SCREAMING_SNAKE_CASE__ (					self      )		->       Tuple:
       self.resolver.convert_models(['heb-eng']      )







   @slow
   def 						SCREAMING_SNAKE_CASE__ (					self      )		->       Union[str, Any]:
       UpperCamelCase__       ,						UpperCamelCase__         =    self.resolver.write_model_card('opus-mt-he-en' ,				dry_run=snake_case_      )
       assert mmeta["long_pair"] == "heb-eng"












"""simple docstring"""





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


A__					: List[str]=	logging.get_logger(__name__)
class    __lowerCamelCase    (  _a  ):
   a      :				Optional[int] 						="""timm_backbone"""

   def __init__(					self ,				snake_case_=None ,				snake_case_=3 ,				snake_case_=True ,				snake_case_=True ,				snake_case_=None ,				**snake_case_ ,				)		->       Dict:
       super().__init__(**snake_case_      )
       UpperCamelCase__         =    backbone
       UpperCamelCase__         =    num_channels
       UpperCamelCase__         =    features_only
       UpperCamelCase__         =    use_pretrained_backbone
       UpperCamelCase__         =    True
       UpperCamelCase__         =    out_indices if out_indices is not None else (-1,)




