


'''simple docstring'''

import inspect
import unittest

from transformers import DPTConfig
from transformers.file_utils import is_torch_available, is_vision_available
from transformers.models.auto import get_values
from transformers.testing_utils import require_torch, require_vision, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, _config_zero_init, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
     import torch
     from torch import nn

     from transformers import MODEL_MAPPING, DPTForDepthEstimation, DPTForSemanticSegmentation, DPTModel
     from transformers.models.dpt.modeling_dpt import DPT_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
     from PIL import Image

     from transformers import DPTImageProcessor





class 					snake_case   :





  """simple docstring"""




  def __init__(   self      ,  UpperCamelCase      ,  UpperCamelCase=2      ,  UpperCamelCase=32      ,  UpperCamelCase=16      ,  UpperCamelCase=3      ,  UpperCamelCase=True      ,  UpperCamelCase=True      ,  UpperCamelCase=32      ,  UpperCamelCase=4      ,  UpperCamelCase=[0, 1, 2, 3]      ,  UpperCamelCase=4      ,  UpperCamelCase=37      ,  UpperCamelCase="gelu"      ,  UpperCamelCase=0.1      ,  UpperCamelCase=0.1      ,  UpperCamelCase=0.02      ,  UpperCamelCase=3      ,  UpperCamelCase=False      ,  UpperCamelCase=None      ,  ):







   """simple docstring"""
   lowerCamelCase_								=  parent
   lowerCamelCase_								=  batch_size
   lowerCamelCase_								=  image_size
   lowerCamelCase_								=  patch_size
   lowerCamelCase_								=  num_channels
   lowerCamelCase_								=  is_training
   lowerCamelCase_								=  use_labels
   lowerCamelCase_								=  hidden_size
   lowerCamelCase_								=  num_hidden_layers
   lowerCamelCase_								=  backbone_out_indices
   lowerCamelCase_								=  num_attention_heads
   lowerCamelCase_								=  intermediate_size
   lowerCamelCase_								=  hidden_act
   lowerCamelCase_								=  hidden_dropout_prob
   lowerCamelCase_								=  attention_probs_dropout_prob
   lowerCamelCase_								=  initializer_range
   lowerCamelCase_								=  num_labels
   lowerCamelCase_								=  scope
   lowerCamelCase_								=  is_hybrid
   # sequence length of DPT = num_patches + 1 (we add 1 for the [CLS] token)
   lowerCamelCase_								=  (image_size // patch_size) ** 2
   lowerCamelCase_								=  num_patches + 1






  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_								=  floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]					)

   lowerCamelCase_								=  None
   if self.use_labels:
    lowerCamelCase_								=  ids_tensor([self.batch_size, self.image_size, self.image_size]      ,  self.num_labels					)

   lowerCamelCase_								=  self.get_config()

   return config, pixel_values, labels






  def   snake_case		(   self					):







   """simple docstring"""
   return DPTConfig(
       image_size=self.image_size      ,  patch_size=self.patch_size      ,  num_channels=self.num_channels      ,  hidden_size=self.hidden_size      ,  num_hidden_layers=self.num_hidden_layers      ,  backbone_out_indices=self.backbone_out_indices      ,  num_attention_heads=self.num_attention_heads      ,  intermediate_size=self.intermediate_size      ,  hidden_act=self.hidden_act      ,  hidden_dropout_prob=self.hidden_dropout_prob      ,  attention_probs_dropout_prob=self.attention_probs_dropout_prob      ,  is_decoder=UpperCamelCase      ,  initializer_range=self.initializer_range      ,  is_hybrid=self.is_hybrid      ,  )






  def   snake_case		(   self      ,  UpperCamelCase      ,  UpperCamelCase      ,  UpperCamelCase					):







   """simple docstring"""
   lowerCamelCase_								=  DPTModel(config=UpperCamelCase					)
   model.to(UpperCamelCase					)
   model.eval()
   lowerCamelCase_								=  model(UpperCamelCase					)
   self.parent.assertEqual(result.last_hidden_state.shape      ,  (self.batch_size, self.seq_length, self.hidden_size)					)






  def   snake_case		(   self      ,  UpperCamelCase      ,  UpperCamelCase      ,  UpperCamelCase					):







   """simple docstring"""
   lowerCamelCase_								=  self.num_labels
   lowerCamelCase_								=  DPTForDepthEstimation(UpperCamelCase					)
   model.to(UpperCamelCase					)
   model.eval()
   lowerCamelCase_								=  model(UpperCamelCase					)
   self.parent.assertEqual(result.predicted_depth.shape      ,  (self.batch_size, self.image_size, self.image_size)					)






  def   snake_case		(   self      ,  UpperCamelCase      ,  UpperCamelCase      ,  UpperCamelCase					):







   """simple docstring"""
   lowerCamelCase_								=  self.num_labels
   lowerCamelCase_								=  DPTForSemanticSegmentation(UpperCamelCase					)
   model.to(UpperCamelCase					)
   model.eval()
   lowerCamelCase_								=  model(UpperCamelCase      ,  labels=UpperCamelCase					)
   self.parent.assertEqual(
       result.logits.shape      ,  (self.batch_size, self.num_labels, self.image_size, self.image_size)					)







  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_								=  self.prepare_config_and_inputs()
   lowerCamelCase_			,lowerCamelCase_			,lowerCamelCase_								=  config_and_inputs
   lowerCamelCase_								=  {"pixel_values": pixel_values}
   return config, inputs_dict





@require_torch
class 					snake_case   (   lowercase      ,						lowercase      ,						unittest.TestCase      ):





  """simple docstring"""




  _lowerCamelCase		   =  (DPTModel, DPTForDepthEstimation, DPTForSemanticSegmentation) if is_torch_available() else ()
  _lowerCamelCase		   =  (
      {
          "depth-estimation": DPTForDepthEstimation,
          "feature-extraction": DPTModel,
          "image-segmentation": DPTForSemanticSegmentation,
      }
      if is_torch_available()
      else {}
  )

  _lowerCamelCase		   =  False
  _lowerCamelCase		   =  False
  _lowerCamelCase		   =  False






  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_								=  DPTModelTester(self					)
   lowerCamelCase_								=  ConfigTester(self      ,  config_class=UpperCamelCase      ,  has_text_modality=UpperCamelCase      ,  hidden_size=37					)






  def   snake_case		(   self					):







   """simple docstring"""
   self.config_tester.run_common_tests()






  @unittest.skip(reason="DPT does not use inputs_embeds"					)
  def   snake_case		(   self					):







   """simple docstring"""
   pass






  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_			,lowerCamelCase_								=  self.model_tester.prepare_config_and_inputs_for_common()

   for model_class in self.all_model_classes:
    lowerCamelCase_								=  model_class(UpperCamelCase					)
    self.assertIsInstance(model.get_input_embeddings()      ,  (nn.Module)					)
    lowerCamelCase_								=  model.get_output_embeddings()
    self.assertTrue(x is None or isinstance(UpperCamelCase      ,  nn.Linear					)					)






  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_			,lowerCamelCase_								=  self.model_tester.prepare_config_and_inputs_for_common()

   for model_class in self.all_model_classes:
    lowerCamelCase_								=  model_class(UpperCamelCase					)
    lowerCamelCase_								=  inspect.signature(model.forward					)
    # signature.parameters is an OrderedDict => so arg_names order is deterministic
    lowerCamelCase_								=  [*signature.parameters.keys()]

    lowerCamelCase_								=  ["pixel_values"]
    self.assertListEqual(arg_names[:1]      ,  UpperCamelCase					)






  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_								=  self.model_tester.prepare_config_and_inputs()
   self.model_tester.create_and_check_model(*UpperCamelCase					)






  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_								=  self.model_tester.prepare_config_and_inputs()
   self.model_tester.create_and_check_for_depth_estimation(*UpperCamelCase					)






  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_								=  self.model_tester.prepare_config_and_inputs()
   self.model_tester.create_and_check_for_semantic_segmentation(*UpperCamelCase					)






  def   snake_case		(   self					):







   """simple docstring"""
   for model_class in self.all_model_classes:
    if model_class.__name__ == "DPTForDepthEstimation":
     continue

    lowerCamelCase_			,lowerCamelCase_								=  self.model_tester.prepare_config_and_inputs_for_common()
    lowerCamelCase_								=  True

    if model_class in get_values(UpperCamelCase					):
     continue

    lowerCamelCase_								=  model_class(UpperCamelCase					)
    model.to(UpperCamelCase					)
    model.train()
    lowerCamelCase_								=  self._prepare_for_class(UpperCamelCase      ,  UpperCamelCase      ,  return_labels=UpperCamelCase					)
    lowerCamelCase_								=  model(**UpperCamelCase					).loss
    loss.backward()






  def   snake_case		(   self					):







   """simple docstring"""
   for model_class in self.all_model_classes:
    if model_class.__name__ == "DPTForDepthEstimation":
     continue

    lowerCamelCase_			,lowerCamelCase_								=  self.model_tester.prepare_config_and_inputs_for_common()
    lowerCamelCase_								=  False
    lowerCamelCase_								=  True

    if model_class in get_values(UpperCamelCase					) or not model_class.supports_gradient_checkpointing:
     continue
    lowerCamelCase_								=  model_class(UpperCamelCase					)
    model.to(UpperCamelCase					)
    model.gradient_checkpointing_enable()
    model.train()
    lowerCamelCase_								=  self._prepare_for_class(UpperCamelCase      ,  UpperCamelCase      ,  return_labels=UpperCamelCase					)
    lowerCamelCase_								=  model(**UpperCamelCase					).loss
    loss.backward()






  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_			,lowerCamelCase_								=  self.model_tester.prepare_config_and_inputs_for_common()

   lowerCamelCase_								=  _config_zero_init(UpperCamelCase					)
   for model_class in self.all_model_classes:
    lowerCamelCase_								=  model_class(config=UpperCamelCase					)
    # Skip the check for the backbone
    lowerCamelCase_								=  []
    for name, module in model.named_modules():
     if module.__class__.__name__ == "DPTViTHybridEmbeddings":
      lowerCamelCase_								=  [f'''{name}.{key}''' for key in module.state_dict().keys()]
      break

    for name, param in model.named_parameters():
     if param.requires_grad:
      if name in backbone_params:
       continue
      self.assertIn(
          ((param.data.mean() * 1e9).round() / 1e9).item()      ,  [0.0, 1.0]      ,  msg=f'''Parameter {name} of model {model_class} seems not properly initialized'''      ,  )






  @unittest.skip("Will be fixed soon by reducing the size of the model used for common tests."					)
  def   snake_case		(   self					):







   """simple docstring"""
   pass







  @slow
  def   snake_case		(   self					):







   """simple docstring"""
   for model_name in DPT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
    lowerCamelCase_								=  DPTModel.from_pretrained(UpperCamelCase					)
    self.assertIsNotNone(UpperCamelCase					)





def __snake_case (				):
 lowerCamelCase_								=  Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"		)
 return image







@require_torch
@require_vision
@slow
class 					snake_case   (   unittest.TestCase      ):





  """simple docstring"""




  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_								=  DPTImageProcessor.from_pretrained("Intel/dpt-large"					)
   lowerCamelCase_								=  DPTForDepthEstimation.from_pretrained("Intel/dpt-large"					).to(UpperCamelCase					)

   lowerCamelCase_								=  prepare_img()
   lowerCamelCase_								=  image_processor(images=UpperCamelCase      ,  return_tensors="pt"					).to(UpperCamelCase					)

   # forward pass
   with torch.no_grad():
    lowerCamelCase_								=  model(**UpperCamelCase					)
    lowerCamelCase_								=  outputs.predicted_depth

   # verify the predicted depth
   lowerCamelCase_								=  torch.Size((1, 384, 384)					)
   self.assertEqual(predicted_depth.shape      ,  UpperCamelCase					)

   lowerCamelCase_								=  torch.tensor(
       [[6.3_199, 6.3_629, 6.4_148], [6.3_850, 6.3_615, 6.4_166], [6.3_519, 6.3_176, 6.3_575]]					).to(UpperCamelCase					)

   self.assertTrue(torch.allclose(outputs.predicted_depth[0, :3, :3]      ,  UpperCamelCase      ,  atol=1e-4					)					)






  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_								=  DPTImageProcessor.from_pretrained("Intel/dpt-large-ade"					)
   lowerCamelCase_								=  DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade"					).to(UpperCamelCase					)

   lowerCamelCase_								=  prepare_img()
   lowerCamelCase_								=  image_processor(images=UpperCamelCase      ,  return_tensors="pt"					).to(UpperCamelCase					)

   # forward pass
   with torch.no_grad():
    lowerCamelCase_								=  model(**UpperCamelCase					)

   # verify the logits
   lowerCamelCase_								=  torch.Size((1, 150, 480, 480)					)
   self.assertEqual(outputs.logits.shape      ,  UpperCamelCase					)

   lowerCamelCase_								=  torch.tensor(
       [[4.0_480, 4.2_420, 4.4_360], [4.3_124, 4.5_693, 4.8_261], [4.5_768, 4.8_965, 5.2_163]]					).to(UpperCamelCase					)

   self.assertTrue(torch.allclose(outputs.logits[0, 0, :3, :3]      ,  UpperCamelCase      ,  atol=1e-4					)					)







  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_								=  DPTImageProcessor.from_pretrained("Intel/dpt-large-ade"					)
   lowerCamelCase_								=  DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade"					).to(UpperCamelCase					)

   lowerCamelCase_								=  prepare_img()
   lowerCamelCase_								=  image_processor(images=UpperCamelCase      ,  return_tensors="pt"					).to(UpperCamelCase					)

   # forward pass
   with torch.no_grad():
    lowerCamelCase_								=  model(**UpperCamelCase					)

   lowerCamelCase_								=  outputs.logits.detach().cpu()

   lowerCamelCase_								=  image_processor.post_process_semantic_segmentation(outputs=UpperCamelCase      ,  target_sizes=[(500, 300)]					)
   lowerCamelCase_								=  torch.Size((500, 300)					)
   self.assertEqual(segmentation[0].shape      ,  UpperCamelCase					)

   lowerCamelCase_								=  image_processor.post_process_semantic_segmentation(outputs=UpperCamelCase					)
   lowerCamelCase_								=  torch.Size((480, 480)					)
   self.assertEqual(segmentation[0].shape      ,  UpperCamelCase					)







'''simple docstring'''

# Copyright 2021 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import json
import os
from dataclasses import dataclass
from enum import Enum
from typing import List, Optional, Union

import yaml

from ...utils import ComputeEnvironment, DistributedType, SageMakerDistributedType
from ...utils.constants import SAGEMAKER_PYTHON_VERSION, SAGEMAKER_PYTORCH_VERSION, SAGEMAKER_TRANSFORMERS_VERSION


a_  :    Dict      =			os.path.expanduser(
    os.getenv("""HF_HOME""", os.path.join(os.getenv("""XDG_CACHE_HOME""", """~/.cache"""), """huggingface"""))
)
a_  :    Dict      =			os.path.join(hf_cache_home, """accelerate""")
a_  :    Optional[int]      =			os.path.join(cache_dir, """default_config.yaml""")
a_  :    int      =			os.path.join(cache_dir, """default_config.yaml""")

# For backward compatibility: the default config is the json one if it's the only existing file.
if os.path.isfile(default_yaml_config_file) or not os.path.isfile(default_json_config_file):
     a_  :    str      =			default_yaml_config_file
else:
     a_  :    str      =			default_json_config_file





def __snake_case (				UpperCAmelCase_						:						Optional[Any]		):
 if config_file is not None:
  if not os.path.isfile(UpperCAmelCase_		):
   raise FileNotFoundError(
       F'''The passed configuration file `{config_file}` does not exist. '''
       "Please pass an existing file to `accelerate launch`, or use the the default one "
       "created through `accelerate config` and run `accelerate launch` "
       "without the `--config_file` argument."		)
 else:
  lowerCamelCase_								=  default_config_file
 with open(UpperCAmelCase_ ,    "r" ,    encoding="utf-8"		) as f:
  if config_file.endswith(".json"		):
   if (
       json.load(UpperCAmelCase_		).get("compute_environment" ,    ComputeEnvironment.LOCAL_MACHINE		)
       == ComputeEnvironment.LOCAL_MACHINE
   ):
    lowerCamelCase_								=  ClusterConfig
   else:
    lowerCamelCase_								=  SageMakerConfig
   return config_class.from_json_file(json_file=UpperCAmelCase_		)
  else:
   if (
       yaml.safe_load(UpperCAmelCase_		).get("compute_environment" ,    ComputeEnvironment.LOCAL_MACHINE		)
       == ComputeEnvironment.LOCAL_MACHINE
   ):
    lowerCamelCase_								=  ClusterConfig
   else:
    lowerCamelCase_								=  SageMakerConfig
   return config_class.from_yaml_file(yaml_file=UpperCAmelCase_		)





@dataclass
class 					snake_case   :





  """simple docstring"""




  _lowerCamelCase		   =  42
  _lowerCamelCase		   =  42
  _lowerCamelCase		   =  42
  _lowerCamelCase		   =  42






  def   snake_case		(   self					):







   """simple docstring"""
   lowerCamelCase_								=  self.__dict__
   # For serialization, it's best to convert Enums to strings (or their underlying value type).
   for key, value in result.items():
    if isinstance(UpperCamelCase      ,  UpperCamelCase					):
     lowerCamelCase_								=  value.value
    if isinstance(UpperCamelCase      ,  UpperCamelCase					) and not bool(UpperCamelCase					):
     lowerCamelCase_								=  None
   lowerCamelCase_								=  {k: v for k, v in result.items() if v is not None}
   return result






  @classmethod
  def   snake_case		(   cls      ,  UpperCamelCase=None					):







   """simple docstring"""
   lowerCamelCase_								=  default_json_config_file if json_file is None else json_file
   with open(UpperCamelCase      ,  "r"      ,  encoding="utf-8"					) as f:
    lowerCamelCase_								=  json.load(UpperCamelCase					)
   if "compute_environment" not in config_dict:
    lowerCamelCase_								=  ComputeEnvironment.LOCAL_MACHINE
   if "mixed_precision" not in config_dict:
    lowerCamelCase_								=  "fp16" if ("fp16" in config_dict and config_dict["fp16"]) else None
   if "fp16" in config_dict:  # Convert the config to the new format.
    del config_dict["fp16"]
   if "dynamo_backend" in config_dict:  # Convert the config to the new format.
    lowerCamelCase_								=  config_dict.pop("dynamo_backend"					)
    lowerCamelCase_								=  {} if dynamo_backend == "NO" else {"dynamo_backend": dynamo_backend}
   if "use_cpu" not in config_dict:
    lowerCamelCase_								=  False
   return cls(**UpperCamelCase					)






  def   snake_case		(   self      ,  UpperCamelCase					):







   """simple docstring"""
   with open(UpperCamelCase      ,  "w"      ,  encoding="utf-8"					) as f:
    lowerCamelCase_								=  json.dumps(self.to_dict()      ,  indent=2      ,  sort_keys=UpperCamelCase					) + "\n"
    f.write(UpperCamelCase					)






  @classmethod
  def   snake_case		(   cls      ,  UpperCamelCase=None					):







   """simple docstring"""
   lowerCamelCase_								=  default_yaml_config_file if yaml_file is None else yaml_file
   with open(UpperCamelCase      ,  "r"      ,  encoding="utf-8"					) as f:
    lowerCamelCase_								=  yaml.safe_load(UpperCamelCase					)
   if "compute_environment" not in config_dict:
    lowerCamelCase_								=  ComputeEnvironment.LOCAL_MACHINE

   if "mixed_precision" not in config_dict:
    lowerCamelCase_								=  "fp16" if ("fp16" in config_dict and config_dict["fp16"]) else None
   if isinstance(config_dict["mixed_precision"]      ,  UpperCamelCase					) and not config_dict["mixed_precision"]:
    lowerCamelCase_								=  "no"
   if "fp16" in config_dict:  # Convert the config to the new format.
    del config_dict["fp16"]
   if "dynamo_backend" in config_dict:  # Convert the config to the new format.
    lowerCamelCase_								=  config_dict.pop("dynamo_backend"					)
    lowerCamelCase_								=  {} if dynamo_backend == "NO" else {"dynamo_backend": dynamo_backend}
   if "use_cpu" not in config_dict:
    lowerCamelCase_								=  False
   return cls(**UpperCamelCase					)






  def   snake_case		(   self      ,  UpperCamelCase					):







   """simple docstring"""
   with open(UpperCamelCase      ,  "w"      ,  encoding="utf-8"					) as f:
    yaml.safe_dump(self.to_dict()      ,  UpperCamelCase					)







  def   snake_case		(   self					):







   """simple docstring"""
   if isinstance(self.compute_environment      ,  UpperCamelCase					):
    lowerCamelCase_								=  ComputeEnvironment(self.compute_environment					)
   if isinstance(self.distributed_type      ,  UpperCamelCase					):
    if self.compute_environment == ComputeEnvironment.AMAZON_SAGEMAKER:
     lowerCamelCase_								=  SageMakerDistributedType(self.distributed_type					)
    else:
     lowerCamelCase_								=  DistributedType(self.distributed_type					)
   if self.dynamo_config is None:
    lowerCamelCase_								=  {}





@dataclass
class 					snake_case   (   lowercase      ):





  """simple docstring"""




  _lowerCamelCase		   =  42
  _lowerCamelCase		   =  0
  _lowerCamelCase		   =  1
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  "static"
  _lowerCamelCase		   =  False
  _lowerCamelCase		   =  "main"

  # args for deepspeed_plugin
  _lowerCamelCase		   =  None
  # args for fsdp
  _lowerCamelCase		   =  None
  # args for megatron_lm
  _lowerCamelCase		   =  None
  # args for ipex
  _lowerCamelCase		   =  None
  # args for TPU
  _lowerCamelCase		   =  False

  # args for TPU pods
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  False
  _lowerCamelCase		   =  False
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  None

  # args for dynamo
  _lowerCamelCase		   =  None






  def   snake_case		(   self					):







   """simple docstring"""
   if self.deepspeed_config is None:
    lowerCamelCase_								=  {}
   if self.fsdp_config is None:
    lowerCamelCase_								=  {}
   if self.megatron_lm_config is None:
    lowerCamelCase_								=  {}
   if self.ipex_config is None:
    lowerCamelCase_								=  {}
   return super().__post_init__()





@dataclass
class 					snake_case   (   lowercase      ):





  """simple docstring"""




  _lowerCamelCase		   =  42
  _lowerCamelCase		   =  42
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  "us-east-1"
  _lowerCamelCase		   =  1
  _lowerCamelCase		   =  "all"
  _lowerCamelCase		   =  F"accelerate-sagemaker-{num_machines}"
  _lowerCamelCase		   =  SAGEMAKER_PYTORCH_VERSION
  _lowerCamelCase		   =  SAGEMAKER_TRANSFORMERS_VERSION
  _lowerCamelCase		   =  SAGEMAKER_PYTHON_VERSION
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  None
  _lowerCamelCase		   =  None



