


'''simple docstring'''

import unittest
from dataclasses import dataclass

import pytest

from accelerate.commands.config.config_args import SageMakerConfig
from accelerate.utils import ComputeEnvironment
from accelerate.utils.launch import _convert_nargs_to_dict
@dataclass
class   __lowerCAmelCase						(lowercase_     ):





      '''simple docstring'''






      lowerCAmelCase__					:     Optional[int]  					=							ComputeEnvironment.AMAZON_SAGEMAKER
      lowerCAmelCase__					:     List[str]  					=							True
      lowerCAmelCase__					:     str  					=							"""ml.p3.2xlarge"""
      lowerCAmelCase__					:     Optional[Any]  					=							"""accelerate_sagemaker_execution_role"""
      lowerCAmelCase__					:     Optional[int]  					=							"""hf-sm"""
      lowerCAmelCase__					:     List[Any]  					=							"""us-east-1"""
      lowerCAmelCase__					:     Tuple  					=							1
      lowerCAmelCase__					:     List[str]  					=							"""accelerate-sagemaker-1"""
      lowerCAmelCase__					:     Any  					=							"""1.6"""
      lowerCAmelCase__					:     Optional[Any]  					=							"""4.4"""
      lowerCAmelCase__					:     Union[str, Any]  					=							"""train.py"""
      lowerCAmelCase__					:     str  					=							[
          """--model_name_or_path""",
          """bert""",
          """--do_train""",
          """False""",
          """--epochs""",
          """3""",
          """--learning_rate""",
          """5e-5""",
          """--max_steps""",
          """50.5""",
      ]
      lowerCAmelCase__					:     Tuple  					=							[
          """--model_name_or_path""",
          """bert""",
          """--do_train""",
          """--do_test""",
          """False""",
          """--do_predict""",
          """--epochs""",
          """3""",
          """--learning_rate""",
          """5e-5""",
          """--max_steps""",
          """50.5""",
      ]






class   __lowerCAmelCase						(unittest.TestCase     ):





      '''simple docstring'''






      def       UpperCamelCase__		(self    :    Union[str, Any] ):

             '''simple docstring'''







             lowercase__      			= _convert_nargs_to_dict(MockLaunchConfig.success_training_script_args )
             assert isinstance(converted_args['''model_name_or_path''']   ,						UpperCamelCase )
             assert isinstance(converted_args['''do_train''']   ,						UpperCamelCase )
             assert isinstance(converted_args['''epochs''']   ,						UpperCamelCase )
             assert isinstance(converted_args['''learning_rate''']   ,						UpperCamelCase )
             assert isinstance(converted_args['''max_steps''']   ,						UpperCamelCase )

             with pytest.raises(UpperCamelCase ):
                    _convert_nargs_to_dict(MockLaunchConfig.fail_training_script_args )






"""simple docstring"""



def 					_UpperCAmelCase      ( __lowerCamelCase   :       int = 1_00_00_00		)     ->					int:
  _snake_case					     =       limit + 1
  _snake_case					     =       [0] * limit
  for first_term in range(1 ,					__lowerCamelCase		):
    for n in range(__lowerCamelCase ,					__lowerCamelCase ,					__lowerCamelCase		):
      _snake_case					     =       first_term + n / first_term
      if common_difference % 4:  # d must be divisble by 4
        continue
      else:
        common_difference /= 4
        if (
            first_term > common_difference
            and first_term < 4 * common_difference
        ):  # since x,y,z are positive integers
          frequency[n] += 1  # so z>0 and a>d ,also 4d<a

  _snake_case					     =       sum(1 for x in frequency[1:limit] if x == 10		)

  return count


if __name__ == "__main__":
 print(F"{solution() = }")



