'''simple docstring'''
import logging
from dataclasses import dataclass, field
from typing import Optional

from seqaseq_trainer import arg_to_scheduler

from transformers import TrainingArguments


lowercase__  :      Optional[Any] =					logging.getLogger(__name__)







@dataclass
class lowerCamelCase							(	_UpperCamelCase					):




  '''simple docstring'''



  lowerCAmelCase__										=	field(
      default=0.0     ,		metadata={'''help''': '''The label smoothing epsilon to apply (if not zero).'''}					)
  lowerCAmelCase__										=	field(default=_UpperCamelCase     ,		metadata={'''help''': '''Whether to SortishSamler or not.'''}					)
  lowerCAmelCase__										=	field(
      default=_UpperCamelCase     ,		metadata={'''help''': '''Whether to use generate to calculate generative metrics (ROUGE, BLEU).'''}					)
  lowerCAmelCase__										=	field(default=_UpperCamelCase     ,		metadata={'''help''': '''whether to use adafactor'''}					)
  lowerCAmelCase__										=	field(
      default=_UpperCamelCase     ,		metadata={'''help''': '''Encoder layer dropout probability. Goes into model.config.'''}					)
  lowerCAmelCase__										=	field(
      default=_UpperCamelCase     ,		metadata={'''help''': '''Decoder layer dropout probability. Goes into model.config.'''}					)
  lowerCAmelCase__										=	field(default=_UpperCamelCase     ,		metadata={'''help''': '''Dropout probability. Goes into model.config.'''}					)
  lowerCAmelCase__										=	field(
      default=_UpperCamelCase     ,		metadata={'''help''': '''Attention dropout probability. Goes into model.config.'''}					)
  lowerCAmelCase__										=	field(
      default='''linear'''     ,		metadata={'''help''': F'''Which lr scheduler to use. Selected in {sorted(arg_to_scheduler.keys()					)}'''}     ,		)






'''simple docstring'''
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_torch_available,
    is_vision_available,
)


lowercase__  :      Union[str, Any]        =					{
    "configuration_mobilevit": ["MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP", "MobileViTConfig", "MobileViTOnnxConfig"],
}

try:
      if not is_vision_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      lowercase__  :      Union[str, Any]        =					["MobileViTFeatureExtractor"]
      lowercase__  :      List[Any]        =					["MobileViTImageProcessor"]

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      lowercase__  :      Dict        =					[
          "MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
          "MobileViTForImageClassification",
          "MobileViTForSemanticSegmentation",
          "MobileViTModel",
          "MobileViTPreTrainedModel",
      ]

try:
      if not is_tf_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      lowercase__  :      Optional[int]        =					[
          "TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
          "TFMobileViTForImageClassification",
          "TFMobileViTForSemanticSegmentation",
          "TFMobileViTModel",
          "TFMobileViTPreTrainedModel",
      ]

if TYPE_CHECKING:
      from .configuration_mobilevit import MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, MobileViTConfig, MobileViTOnnxConfig

      try:
            if not is_vision_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .feature_extraction_mobilevit import MobileViTFeatureExtractor
            from .image_processing_mobilevit import MobileViTImageProcessor

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_mobilevit import (
                MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                MobileViTForImageClassification,
                MobileViTForSemanticSegmentation,
                MobileViTModel,
                MobileViTPreTrainedModel,
            )

      try:
            if not is_tf_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_tf_mobilevit import (
                TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                TFMobileViTForImageClassification,
                TFMobileViTForSemanticSegmentation,
                TFMobileViTModel,
                TFMobileViTPreTrainedModel,
            )


else:
      import sys

      lowercase__  :      int        =					_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





