


'''simple docstring'''






import operator as op


__A :  Any    							=				"scaler.pt"
__A :  Optional[Any]    							=				"pytorch_model"
__A :  Dict    							=				"random_states"
__A :  Optional[int]    							=				"optimizer"
__A :  List[str]    							=				"scheduler"
__A :  str    							=				"pytorch_model.bin"
__A :  List[Any]    							=				"pytorch_model.bin.index.json"
__A :  Any    							=				"model.safetensors"
__A :  Dict    							=				"model.safetensors.index.json"
__A :  Optional[Any]    							=				"1.10.2"
__A :  Union[str, Any]    							=				"py38"
__A :  str    							=				"4.17.0"
__A :  List[str]    							=				["ml.p3.16xlarge", "ml.p3dn.24xlarge", "ml.p4dn.24xlarge"]
__A :  Optional[int]    							=				["FULL_SHARD", "SHARD_GRAD_OP", "NO_SHARD", "HYBRID_SHARD", "HYBRID_SHARD_ZERO2"]
__A :  List[str]    							=				["TRANSFORMER_BASED_WRAP", "SIZE_BASED_WRAP", "NO_WRAP"]
__A :  Optional[Any]    							=				["BACKWARD_PRE", "BACKWARD_POST", "NO_PREFETCH"]
__A :  List[Any]    							=				["FULL_STATE_DICT", "LOCAL_STATE_DICT", "SHARDED_STATE_DICT"]
__A :  Tuple    							=				"2.0.1"
__A :  Tuple    							=				["pdsh", "standard", "openmpi", "mvapich"]
__A :  Tuple    							=				["default", "reduce-overhead", "max-autotune"]

__A :  Union[str, Any]    							=				{">": op.gt, ">=": op.ge, "==": op.eq, "!=": op.ne, "<=": op.le, "<": op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
__A :  Union[str, Any]    							=				[
    "nnodes",
    "nproc_per_node",
    "rdzv_backend",
    "rdzv_endpoint",
    "rdzv_id",
    "rdzv_conf",
    "standalone",
    "max_restarts",
    "monitor_interval",
    "start_method",
    "role",
    "module",
    "m",
    "no_python",
    "run_path",
    "log_dir",
    "r",
    "redirects",
    "t",
    "tee",
    "node_rank",
    "master_addr",
    "master_port",
]

__A :  List[Any]    							=				["DEEPSPEED", "MULTI_GPU", "FSDP", "MEGATRON_LM"]
__A :  str    							=				["DEEPSPEED", "MULTI_XPU", "FSDP"]







'''simple docstring'''






from typing import TYPE_CHECKING

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


__A :  List[str]    							=				{
    "configuration_owlvit": [
        "OWLVIT_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "OwlViTConfig",
        "OwlViTOnnxConfig",
        "OwlViTTextConfig",
        "OwlViTVisionConfig",
    ],
    "processing_owlvit": ["OwlViTProcessor"],
}


try:
  if not is_vision_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __A :  Optional[int]    							=				["OwlViTFeatureExtractor"]
  __A :  str    							=				["OwlViTImageProcessor"]

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __A :  Tuple    							=				[
      "OWLVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
      "OwlViTModel",
      "OwlViTPreTrainedModel",
      "OwlViTTextModel",
      "OwlViTVisionModel",
      "OwlViTForObjectDetection",
  ]

if TYPE_CHECKING:
  from .configuration_owlvit import (
      OWLVIT_PRETRAINED_CONFIG_ARCHIVE_MAP,
      OwlViTConfig,
      OwlViTOnnxConfig,
      OwlViTTextConfig,
      OwlViTVisionConfig,
  )
  from .processing_owlvit import OwlViTProcessor

  try:
    if not is_vision_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .feature_extraction_owlvit import OwlViTFeatureExtractor
    from .image_processing_owlvit import OwlViTImageProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_owlvit import (
        OWLVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
        OwlViTForObjectDetection,
        OwlViTModel,
        OwlViTPreTrainedModel,
        OwlViTTextModel,
        OwlViTVisionModel,
    )

else:
  import sys

  __A :  List[Any]    							=				_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



