






"""simple docstring"""
import enum
import warnings

from .. import MODEL_FOR_CAUSAL_LM_MAPPING, TF_MODEL_FOR_CAUSAL_LM_MAPPING
from ..utils import add_end_docstrings, is_tf_available
from .base import PIPELINE_INIT_ARGS, Pipeline


if is_tf_available():
			import tensorflow as tf







class      UpperCamelCase_			(enum.Enum	):
	__magic_name__       =							0
	__magic_name__       =							1
	__magic_name__       =							2







@add_end_docstrings(__A	)
class      UpperCamelCase_			(__A	):
	__magic_name__       =							'''
    In 1991, the remains of Russian Tsar Nicholas II and his family (except for Alexei and Maria) are discovered. The
    voice of Nicholas\'s young son, Tsarevich Alexei Nikolaevich, narrates the remainder of the story. 1883 Western
    Siberia, a young Grigori Rasputin is asked by his father and a group of men to perform magic. Rasputin has a vision
    and denounces one of the men as a horse thief. Although his father initially slaps him for making such an
    accusation, Rasputin watches as the man is chased outside and beaten. Twenty years later, Rasputin sees a vision of
    the Virgin Mary, prompting him to become a priest. Rasputin quickly becomes famous, with people, even a bishop,
    begging for his blessing. <eod> </s> <eos>
    '''





	def __init__( self   :					List[Any]      ,      *lowerCAmelCase_   :					List[str]      ,      **lowerCAmelCase_   :					List[Any]		)		->     Optional[int]:
				super().__init__(*lowerCAmelCase_      ,      **lowerCAmelCase_		)
				self.check_model_type(
				    TF_MODEL_FOR_CAUSAL_LM_MAPPING if self.framework == "tf" else MODEL_FOR_CAUSAL_LM_MAPPING		)
				if "prefix" not in self._preprocess_params:
							# This is very specific. The logic is quite complex and needs to be done
							# as a "default".
							# It also defines both some preprocess_kwargs and generate_kwargs
							# which is why we cannot put them in their respective methods.
							UpperCAmelCase_	:					Any     	=   None
							if self.model.config.prefix is not None:
										UpperCAmelCase_	:					Any     	=   self.model.config.prefix
							if prefix is None and self.model.__class__.__name__ in [
							    "XLNetLMHeadModel",
							    "TransfoXLLMHeadModel",
							    "TFXLNetLMHeadModel",
							    "TFTransfoXLLMHeadModel",
							]:
										# For XLNet and TransformerXL we add an article to the prompt to give more state to the model.
										UpperCAmelCase_	:					Optional[int]     	=   self.XL_PREFIX
							if prefix is not None:
										# Recalculate some generate_kwargs linked to prefix.
										UpperCAmelCase_	,      UpperCAmelCase_	,      UpperCAmelCase_	:					List[str]     	=   self._sanitize_parameters(prefix=lowerCAmelCase_      ,      **self._forward_params		)
										UpperCAmelCase_	:					List[Any]     	=   {**self._preprocess_params, **preprocess_params}
										UpperCAmelCase_	:					Optional[int]     	=   {**self._forward_params, **forward_params}





	def 	_SCREAMING_SNAKE_CASE ( self   :					str      ,      lowerCAmelCase_   :					int=None      ,      lowerCAmelCase_   :					Optional[Any]=None      ,      lowerCAmelCase_   :					int=None      ,      lowerCAmelCase_   :					Optional[int]=None      ,      lowerCAmelCase_   :					List[Any]=None      ,      lowerCAmelCase_   :					Dict=None      ,      lowerCAmelCase_   :					Tuple=None      ,      lowerCAmelCase_   :					List[str]=None      ,      **lowerCAmelCase_   :					Optional[Any]      ,      )		->     int:
				UpperCAmelCase_	:					Union[str, Any]     	=   {}
				if prefix is not None:
							UpperCAmelCase_	:					Tuple     	=   prefix
				if prefix:
							UpperCAmelCase_	:					Optional[Any]     	=   self.tokenizer(
							    lowerCAmelCase_      ,      padding=lowerCAmelCase_      ,      add_special_tokens=lowerCAmelCase_      ,      return_tensors=self.framework		)
							UpperCAmelCase_	:					List[str]     	=   prefix_inputs["input_ids"].shape[-1]

				if handle_long_generation is not None:
							if handle_long_generation not in {"hole"}:
										raise ValueError(
										    f"""{handle_long_generation} is not a valid value for `handle_long_generation` parameter expected"""
										    " [None, 'hole']"		)
							UpperCAmelCase_	:					Dict     	=   handle_long_generation

				preprocess_params.update(lowerCAmelCase_		)
				UpperCAmelCase_	:					Dict     	=   generate_kwargs

				UpperCAmelCase_	:					Dict     	=   {}
				if return_full_text is not None and return_type is None:
							if return_text is not None:
										raise ValueError("`return_text` is mutually exclusive with `return_full_text`"		)
							if return_tensors is not None:
										raise ValueError("`return_full_text` is mutually exclusive with `return_tensors`"		)
							UpperCAmelCase_	:					Tuple     	=   ReturnType.FULL_TEXT if return_full_text else ReturnType.NEW_TEXT
				if return_tensors is not None and return_type is None:
							if return_text is not None:
										raise ValueError("`return_text` is mutually exclusive with `return_tensors`"		)
							UpperCAmelCase_	:					int     	=   ReturnType.TENSORS
				if return_type is not None:
							UpperCAmelCase_	:					int     	=   return_type
				if clean_up_tokenization_spaces is not None:
							UpperCAmelCase_	:					Tuple     	=   clean_up_tokenization_spaces

				if stop_sequence is not None:
							UpperCAmelCase_	:					Union[str, Any]     	=   self.tokenizer.encode(lowerCAmelCase_      ,      add_special_tokens=lowerCAmelCase_		)
							if len(lowerCAmelCase_		) > 1:
										warnings.warn(
										    "Stopping on a multiple token sequence is not yet supported on transformers. The first token of"
										    " the stop sequence will be used as the stop sequence string in the interim."		)
							UpperCAmelCase_	:					Optional[int]     	=   stop_sequence_ids[0]

				return preprocess_params, forward_params, postprocess_params





	def 	_SCREAMING_SNAKE_CASE ( self   :					Union[str, Any]      ,      *lowerCAmelCase_   :					Dict      ,      **lowerCAmelCase_   :					Dict		)		->     Union[str, Any]:
				# Parse arguments
				if self.model.__class__.__name__ in ["TransfoXLLMHeadModel"]:
							kwargs.update({"add_space_before_punct_symbol": True}		)

				return super()._parse_and_tokenize(*lowerCAmelCase_      ,      **lowerCAmelCase_		)





	def __call__( self   :					List[Any]      ,      lowerCAmelCase_   :					Any      ,      **lowerCAmelCase_   :					Union[str, Any]		)		->     Dict:
				return super().__call__(lowerCAmelCase_      ,      **lowerCAmelCase_		)





	def 	_SCREAMING_SNAKE_CASE ( self   :					Optional[int]      ,      lowerCAmelCase_   :					Dict      ,      lowerCAmelCase_   :					List[str]=""      ,      lowerCAmelCase_   :					Any=None      ,      **lowerCAmelCase_   :					Optional[Any]		)		->     Dict:
				UpperCAmelCase_	:					Tuple     	=   self.tokenizer(
				    prefix + prompt_text      ,      padding=lowerCAmelCase_      ,      add_special_tokens=lowerCAmelCase_      ,      return_tensors=self.framework		)
				UpperCAmelCase_	:					Any     	=   prompt_text

				if handle_long_generation == "hole":
							UpperCAmelCase_	:					Optional[Any]     	=   inputs["input_ids"].shape[-1]
							if "max_new_tokens" in generate_kwargs:
										UpperCAmelCase_	:					Dict     	=   generate_kwargs["max_new_tokens"]
							else:
										UpperCAmelCase_	:					List[str]     	=   generate_kwargs.get("max_length"      ,      self.model.config.max_length		) - cur_len
										if new_tokens < 0:
													raise ValueError("We cannot infer how many new tokens are expected"		)
							if cur_len + new_tokens > self.tokenizer.model_max_length:
										UpperCAmelCase_	:					Tuple     	=   self.tokenizer.model_max_length - new_tokens
										if keep_length <= 0:
													raise ValueError(
													    "We cannot use `hole` to handle this generation the number of desired tokens exceeds the"
													    " models max length"		)

										UpperCAmelCase_	:					Dict     	=   inputs["input_ids"][:, -keep_length:]
										if "attention_mask" in inputs:
													UpperCAmelCase_	:					Union[str, Any]     	=   inputs["attention_mask"][:, -keep_length:]

				return inputs





	def 	_SCREAMING_SNAKE_CASE ( self   :					Union[str, Any]      ,      lowerCAmelCase_   :					Union[str, Any]      ,      **lowerCAmelCase_   :					str		)		->     Dict:
				UpperCAmelCase_	:					Optional[Any]     	=   model_inputs["input_ids"]
				UpperCAmelCase_	:					str     	=   model_inputs.get("attention_mask"      ,      lowerCAmelCase_		)
				# Allow empty prompts
				if input_ids.shape[1] == 0:
							UpperCAmelCase_	:					List[str]     	=   None
							UpperCAmelCase_	:					Union[str, Any]     	=   None
							UpperCAmelCase_	:					str     	=   1
				else:
							UpperCAmelCase_	:					Union[str, Any]     	=   input_ids.shape[0]
				UpperCAmelCase_	:					Any     	=   model_inputs.pop("prompt_text"		)

				# If there is a prefix, we may need to adjust the generation length. Do so without permanently modifying
				# generate_kwargs, as some of the parameterization may come from the initialization of the pipeline.
				UpperCAmelCase_	:					Any     	=   generate_kwargs.pop("prefix_length"      ,      0		)
				if prefix_length > 0:
							UpperCAmelCase_	:					str     	=   "max_new_tokens" in generate_kwargs or (
							    "generation_config" in generate_kwargs
							    and generate_kwargs["generation_config"].max_new_tokens is not None
							)
							if not has_max_new_tokens:
										UpperCAmelCase_	:					Tuple     	=   generate_kwargs.get("max_length"		) or self.model.config.max_length
										generate_kwargs["max_length"] += prefix_length
							UpperCAmelCase_	:					Optional[int]     	=   "min_new_tokens" in generate_kwargs or (
							    "generation_config" in generate_kwargs
							    and generate_kwargs["generation_config"].min_new_tokens is not None
							)
							if not has_min_new_tokens and "min_length" in generate_kwargs:
										generate_kwargs["min_length"] += prefix_length

        # BS x SL
				UpperCAmelCase_	:					int     	=   self.model.generate(input_ids=lowerCAmelCase_      ,      attention_mask=lowerCAmelCase_      ,      **lowerCAmelCase_		)
				UpperCAmelCase_	:					Dict     	=   generated_sequence.shape[0]
				if self.framework == "pt":
							UpperCAmelCase_	:					Optional[int]     	=   generated_sequence.reshape(lowerCAmelCase_      ,      out_b // in_b      ,      *generated_sequence.shape[1:]		)
				elif self.framework == "tf":
							UpperCAmelCase_	:					List[Any]     	=   tf.reshape(lowerCAmelCase_      ,      (in_b, out_b // in_b, *generated_sequence.shape[1:])		)
				return {"generated_sequence": generated_sequence, "input_ids": input_ids, "prompt_text": prompt_text}





	def 	_SCREAMING_SNAKE_CASE ( self   :					Optional[int]      ,      lowerCAmelCase_   :					Dict      ,      lowerCAmelCase_   :					List[str]=ReturnType.FULL_TEXT      ,      lowerCAmelCase_   :					Dict=True		)		->     List[str]:
				UpperCAmelCase_	:					List[Any]     	=   model_outputs["generated_sequence"][0]
				UpperCAmelCase_	:					int     	=   model_outputs["input_ids"]
				UpperCAmelCase_	:					List[str]     	=   model_outputs["prompt_text"]
				UpperCAmelCase_	:					Union[str, Any]     	=   generated_sequence.numpy().tolist()
				UpperCAmelCase_	:					int     	=   []
				for sequence in generated_sequence:
							if return_type == ReturnType.TENSORS:
										UpperCAmelCase_	:					Optional[Any]     	=   {"generated_token_ids": sequence}
							elif return_type in {ReturnType.NEW_TEXT, ReturnType.FULL_TEXT}:
										# Decode text
										UpperCAmelCase_	:					str     	=   self.tokenizer.decode(
										    lowerCAmelCase_      ,      skip_special_tokens=lowerCAmelCase_      ,      clean_up_tokenization_spaces=lowerCAmelCase_      ,      )

										# Remove PADDING prompt of the sequence if XLNet or Transfo-XL model is used
										if input_ids is None:
													UpperCAmelCase_	:					List[Any]     	=   0
										else:
													UpperCAmelCase_	:					str     	=   len(
													    self.tokenizer.decode(
													        input_ids[0]      ,      skip_special_tokens=lowerCAmelCase_      ,      clean_up_tokenization_spaces=lowerCAmelCase_      ,      )		)

										if return_type == ReturnType.FULL_TEXT:
													UpperCAmelCase_	:					Union[str, Any]     	=   prompt_text + text[prompt_length:]
										else:
													UpperCAmelCase_	:					Dict     	=   text[prompt_length:]

										UpperCAmelCase_	:					int     	=   {"generated_text": all_text}
							records.append(lowerCAmelCase_		)

				return records









'''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 ...utils.constants import SAGEMAKER_PARALLEL_EC2_INSTANCES, TORCH_DYNAMO_MODES
from ...utils.dataclasses import ComputeEnvironment, SageMakerDistributedType
from ...utils.imports import is_botoa_available
from .config_args import SageMakerConfig
from .config_utils import (
    DYNAMO_BACKENDS,
    _ask_field,
    _ask_options,
    _convert_dynamo_backend,
    _convert_mixed_precision,
    _convert_sagemaker_distributed_mode,
    _convert_yes_no_to_bool,
)


if is_botoa_available():
      import botoa  # noqa: F401






def 		UpperCamelCase__      (		__SCREAMING_SNAKE_CASE		)    ->   Dict:
      snake_case__       :   Optional[int]	      =    botoa.client('iam'		)

      snake_case__       :   Any	      =    {
          'Version': '2012-10-17',
          'Statement': [
              {'Effect': 'Allow', 'Principal': {'Service': 'sagemaker.amazonaws.com'}, 'Action': 'sts:AssumeRole'}
          ],
      }
      try:
            # create the role, associated with the chosen trust policy
            iam_client.create_role(
                RoleName=__SCREAMING_SNAKE_CASE				,      AssumeRolePolicyDocument=json.dumps(__SCREAMING_SNAKE_CASE				,      indent=2		)		)
            snake_case__       :   str	      =    {
                'Version': '2012-10-17',
                'Statement': [
                    {
                        'Effect': 'Allow',
                        'Action': [
                            'sagemaker:*',
                            'ecr:GetDownloadUrlForLayer',
                            'ecr:BatchGetImage',
                            'ecr:BatchCheckLayerAvailability',
                            'ecr:GetAuthorizationToken',
                            'cloudwatch:PutMetricData',
                            'cloudwatch:GetMetricData',
                            'cloudwatch:GetMetricStatistics',
                            'cloudwatch:ListMetrics',
                            'logs:CreateLogGroup',
                            'logs:CreateLogStream',
                            'logs:DescribeLogStreams',
                            'logs:PutLogEvents',
                            'logs:GetLogEvents',
                            's3:CreateBucket',
                            's3:ListBucket',
                            's3:GetBucketLocation',
                            's3:GetObject',
                            's3:PutObject',
                        ],
                        'Resource': '*',
                    }
                ],
            }
            # attach policy to role
            iam_client.put_role_policy(
                RoleName=__SCREAMING_SNAKE_CASE				,      PolicyName=f"{role_name}_policy_permission"				,      PolicyDocument=json.dumps(__SCREAMING_SNAKE_CASE				,      indent=2		)				,      )
      except iam_client.exceptions.EntityAlreadyExistsException:
            print(f"role {role_name} already exists. Using existing one"		)






def 		UpperCamelCase__      (		__SCREAMING_SNAKE_CASE		)    ->   Optional[int]:
      snake_case__       :   Tuple	      =    botoa.client('iam'		)
      return iam_client.get_role(RoleName=__SCREAMING_SNAKE_CASE		)["Role"]["Arn"]






def 		UpperCamelCase__      (		)    ->   Tuple:
      snake_case__       :   Dict	      =    _ask_options(
          'How do you want to authorize?'				,      ['AWS Profile', 'Credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) ']				,      __SCREAMING_SNAKE_CASE				,      )
      snake_case__       :   int	      =    None
      if credentials_configuration == 0:
            snake_case__       :   Any	      =    _ask_field('Enter your AWS Profile name: [default] '				,      default='default'		)
            snake_case__       :   Union[str, Any]	      =    aws_profile
      else:
            print(
                'Note you will need to provide AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY when you launch you training script with,'
                '`accelerate launch --aws_access_key_id XXX --aws_secret_access_key YYY`'		)
            snake_case__       :   Dict	      =    _ask_field('AWS Access Key ID: '		)
            snake_case__       :   Tuple	      =    aws_access_key_id

            snake_case__       :   int	      =    _ask_field('AWS Secret Access Key: '		)
            snake_case__       :   Optional[int]	      =    aws_secret_access_key

      snake_case__       :   str	      =    _ask_field('Enter your AWS Region: [us-east-1]'				,      default='us-east-1'		)
      snake_case__       :   Dict	      =    aws_region

      snake_case__       :   Optional[int]	      =    _ask_options(
          'Do you already have an IAM Role for executing Amazon SageMaker Training Jobs?'				,      ['Provide IAM Role name', 'Create new IAM role using credentials']				,      __SCREAMING_SNAKE_CASE				,      )
      if role_management == 0:
            snake_case__       :   Optional[int]	      =    _ask_field('Enter your IAM role name: '		)
      else:
            snake_case__       :   Dict	      =    'accelerate_sagemaker_execution_role'
            print(f"Accelerate will create an iam role \"{iam_role_name}\" using the provided credentials"		)
            _create_iam_role_for_sagemaker(__SCREAMING_SNAKE_CASE		)

      snake_case__       :   List[str]	      =    _ask_field(
          'Do you want to use custom Docker image? [yes/NO]: '				,      _convert_yes_no_to_bool				,      default=__SCREAMING_SNAKE_CASE				,      error_message='Please enter yes or no.'				,      )
      snake_case__       :   Dict	      =    None
      if is_custom_docker_image:
            snake_case__       :   Optional[int]	      =    _ask_field('Enter your Docker image: '				,      lambda __SCREAMING_SNAKE_CASE		: str(__SCREAMING_SNAKE_CASE		).lower()		)

      snake_case__       :   int	      =    _ask_field(
          'Do you want to provide SageMaker input channels with data locations? [yes/NO]: '				,      _convert_yes_no_to_bool				,      default=__SCREAMING_SNAKE_CASE				,      error_message='Please enter yes or no.'				,      )
      snake_case__       :   Dict	      =    None
      if is_sagemaker_inputs_enabled:
            snake_case__       :   Optional[int]	      =    _ask_field(
                'Enter the path to the SageMaker inputs TSV file with columns (channel_name, data_location): '				,      lambda __SCREAMING_SNAKE_CASE		: str(__SCREAMING_SNAKE_CASE		).lower()				,      )

      snake_case__       :   str	      =    _ask_field(
          'Do you want to enable SageMaker metrics? [yes/NO]: '				,      _convert_yes_no_to_bool				,      default=__SCREAMING_SNAKE_CASE				,      error_message='Please enter yes or no.'				,      )
      snake_case__       :   Optional[int]	      =    None
      if is_sagemaker_metrics_enabled:
            snake_case__       :   int	      =    _ask_field(
                'Enter the path to the SageMaker metrics TSV file with columns (metric_name, metric_regex): '				,      lambda __SCREAMING_SNAKE_CASE		: str(__SCREAMING_SNAKE_CASE		).lower()				,      )

      snake_case__       :   List[str]	      =    _ask_options(
          'What is the distributed mode?'				,      ['No distributed training', 'Data parallelism']				,      _convert_sagemaker_distributed_mode				,      )
      snake_case__       :   Optional[int]	      =    {}
      snake_case__       :   str	      =    _ask_field(
          'Do you wish to optimize your script with torch dynamo?[yes/NO]:'				,      _convert_yes_no_to_bool				,      default=__SCREAMING_SNAKE_CASE				,      error_message='Please enter yes or no.'				,      )
      if use_dynamo:
            snake_case__       :   List[str]	      =    'dynamo_'
            snake_case__       :   Tuple	      =    _ask_options(
                'Which dynamo backend would you like to use?'				,      [x.lower() for x in DYNAMO_BACKENDS]				,      _convert_dynamo_backend				,      default=2				,      )
            snake_case__       :   Optional[int]	      =    _ask_field(
                'Do you want to customize the defaults sent to torch.compile? [yes/NO]: '				,      _convert_yes_no_to_bool				,      default=__SCREAMING_SNAKE_CASE				,      error_message='Please enter yes or no.'				,      )

            if use_custom_options:
                  snake_case__       :   int	      =    _ask_options(
                      'Which mode do you want to use?'				,      __SCREAMING_SNAKE_CASE				,      lambda __SCREAMING_SNAKE_CASE		: TORCH_DYNAMO_MODES[int(__SCREAMING_SNAKE_CASE		)]				,      default='default'				,      )
                  snake_case__       :   Dict	      =    _ask_field(
                      'Do you want the fullgraph mode or it is ok to break model into several subgraphs? [yes/NO]: '				,      _convert_yes_no_to_bool				,      default=__SCREAMING_SNAKE_CASE				,      error_message='Please enter yes or no.'				,      )
                  snake_case__       :   List[Any]	      =    _ask_field(
                      'Do you want to enable dynamic shape tracing? [yes/NO]: '				,      _convert_yes_no_to_bool				,      default=__SCREAMING_SNAKE_CASE				,      error_message='Please enter yes or no.'				,      )
      snake_case__       :   int	      =    'Which EC2 instance type you want to use for your training?'
      if distributed_type != SageMakerDistributedType.NO:
            snake_case__       :   Tuple	      =    _ask_options(
                __SCREAMING_SNAKE_CASE				,      __SCREAMING_SNAKE_CASE				,      lambda __SCREAMING_SNAKE_CASE		: SAGEMAKER_PARALLEL_EC2_INSTANCES[int(__SCREAMING_SNAKE_CASE		)]		)
      else:
            eca_instance_query += "? [ml.p3.2xlarge]:"
            snake_case__       :   Dict	      =    _ask_field(__SCREAMING_SNAKE_CASE				,      lambda __SCREAMING_SNAKE_CASE		: str(__SCREAMING_SNAKE_CASE		).lower()				,      default='ml.p3.2xlarge'		)

      snake_case__       :   Optional[Any]	      =    1
      if distributed_type in (SageMakerDistributedType.DATA_PARALLEL, SageMakerDistributedType.MODEL_PARALLEL):
            snake_case__       :   Union[str, Any]	      =    _ask_field(
                'How many machines do you want use? [1]: '				,      __SCREAMING_SNAKE_CASE				,      default=1				,      )

      snake_case__       :   Optional[int]	      =    _ask_options(
          'Do you wish to use FP16 or BF16 (mixed precision)?'				,      ['no', 'fp16', 'bf16', 'fp8']				,      _convert_mixed_precision				,      )

      if use_dynamo and mixed_precision == "no":
            print(
                'Torch dynamo used without mixed precision requires TF32 to be efficient. Accelerate will enable it by default when launching your scripts.'		)

      return SageMakerConfig(
          image_uri=__SCREAMING_SNAKE_CASE				,      compute_environment=ComputeEnvironment.AMAZON_SAGEMAKER				,      distributed_type=__SCREAMING_SNAKE_CASE				,      use_cpu=__SCREAMING_SNAKE_CASE				,      dynamo_config=__SCREAMING_SNAKE_CASE				,      eca_instance_type=__SCREAMING_SNAKE_CASE				,      profile=__SCREAMING_SNAKE_CASE				,      region=__SCREAMING_SNAKE_CASE				,      iam_role_name=__SCREAMING_SNAKE_CASE				,      mixed_precision=__SCREAMING_SNAKE_CASE				,      num_machines=__SCREAMING_SNAKE_CASE				,      sagemaker_inputs_file=__SCREAMING_SNAKE_CASE				,      sagemaker_metrics_file=__SCREAMING_SNAKE_CASE				,      )
