


import argparse
import json
import os
import sys
import tempfile
import unittest
from argparse import Namespace
from dataclasses import dataclass, field
from enum import Enum
from pathlib import Path
from typing import List, Literal, Optional

import yaml

from transformers import HfArgumentParser, TrainingArguments
from transformers.hf_argparser import make_choice_type_function, string_to_bool


# Since Python 3.10, we can use the builtin `|` operator for Union types
# See PEP 604: https://peps.python.org/pep-0604
_UpperCAmelCase			:  Union[str, Any]     =sys.version_info >= (3, 10)



def 			lowerCAmelCase (		lowerCAmelCase_=None ,   lowerCAmelCase_=None )-> Union[str, Any]:
    return field(default_factory=lambda: default ,   metadata=lowerCamelCase__ )







@dataclass
class 				snake_case__:







      '''simple docstring'''




      SCREAMING_SNAKE_CASE__      :  List[Any]					=							42
      SCREAMING_SNAKE_CASE__      :  Dict					=							42
      SCREAMING_SNAKE_CASE__      :  str					=							42
      SCREAMING_SNAKE_CASE__      :  int					=							42







@dataclass
class 				snake_case__:







      '''simple docstring'''




      SCREAMING_SNAKE_CASE__      :  Optional[int]					=							42
      SCREAMING_SNAKE_CASE__      :  Optional[int]					=							field(default="""toto""",						metadata={"""help""": """help message"""}							)







@dataclass
class 				snake_case__:







      '''simple docstring'''




      SCREAMING_SNAKE_CASE__      :  Dict					=							False
      SCREAMING_SNAKE_CASE__      :  Any					=							True
      SCREAMING_SNAKE_CASE__      :  int					=							None







class 				snake_case__(							_UpperCamelCase							):







      '''simple docstring'''




      SCREAMING_SNAKE_CASE__      :  Tuple					=							"""titi"""
      SCREAMING_SNAKE_CASE__      :  Union[str, Any]					=							"""toto"""







class 				snake_case__(							_UpperCamelCase							):







      '''simple docstring'''




      SCREAMING_SNAKE_CASE__      :  str					=							"""titi"""
      SCREAMING_SNAKE_CASE__      :  Dict					=							"""toto"""
      SCREAMING_SNAKE_CASE__      :  List[Any]					=							42







@dataclass
class 				snake_case__:







      '''simple docstring'''




      SCREAMING_SNAKE_CASE__      :  Any					=							"""toto"""




      def 						lowercase_ (				self							)					->    Optional[int]:
          lowerCAmelCase_ :      Optional[Any]    				=				BasicEnum(self.foo							)







@dataclass
class 				snake_case__:







      '''simple docstring'''




      SCREAMING_SNAKE_CASE__      :  int					=							"""toto"""




      def 						lowercase_ (				self							)					->    Optional[Any]:
          lowerCAmelCase_ :      List[str]    				=				MixedTypeEnum(self.foo							)







@dataclass
class 				snake_case__:







      '''simple docstring'''




      SCREAMING_SNAKE_CASE__      :  str					=							None
      SCREAMING_SNAKE_CASE__      :  int					=							field(default=_UpperCamelCase,						metadata={"""help""": """help message"""}							)
      SCREAMING_SNAKE_CASE__      :  List[str]					=							None
      SCREAMING_SNAKE_CASE__      :  Dict					=							list_field(default=[]							)
      SCREAMING_SNAKE_CASE__      :  List[Any]					=							list_field(default=[]							)







@dataclass
class 				snake_case__:







      '''simple docstring'''




      SCREAMING_SNAKE_CASE__      :  int					=							list_field(default=[]							)
      SCREAMING_SNAKE_CASE__      :  List[str]					=							list_field(default=[1, 2, 3]							)
      SCREAMING_SNAKE_CASE__      :  Union[str, Any]					=							list_field(default=["""Hallo""", """Bonjour""", """Hello"""]							)
      SCREAMING_SNAKE_CASE__      :  Optional[Any]					=							list_field(default=[0.1, 0.2, 0.3]							)







@dataclass
class 				snake_case__:







      '''simple docstring'''




      SCREAMING_SNAKE_CASE__      :  List[str]					=							field()
      SCREAMING_SNAKE_CASE__      :  List[Any]					=							field()
      SCREAMING_SNAKE_CASE__      :  Any					=							field()




      def 						lowercase_ (				self							)					->    Dict:
          lowerCAmelCase_ :      List[Any]    				=				BasicEnum(self.required_enum							)







@dataclass
class 				snake_case__:







      '''simple docstring'''




      SCREAMING_SNAKE_CASE__      :  Optional[Any]					=							42
      SCREAMING_SNAKE_CASE__      :  Union[str, Any]					=							field()
      SCREAMING_SNAKE_CASE__      :  int					=							None
      SCREAMING_SNAKE_CASE__      :  Union[str, Any]					=							field(default="""toto""",						metadata={"""help""": """help message"""}							)
      SCREAMING_SNAKE_CASE__      :  Optional[Any]					=							list_field(default=["""Hallo""", """Bonjour""", """Hello"""]							)


if is_python_no_less_than_3_10:







      @dataclass
      class 				snake_case__:







            '''simple docstring'''




            SCREAMING_SNAKE_CASE__      :  List[str]					=							False
            SCREAMING_SNAKE_CASE__      :  Optional[int]					=							True
            SCREAMING_SNAKE_CASE__      :  Any					=							None







      @dataclass
      class 				snake_case__:







            '''simple docstring'''




            SCREAMING_SNAKE_CASE__      :  List[Any]					=							None
            SCREAMING_SNAKE_CASE__      :  List[str]					=							field(default=_UpperCamelCase,						metadata={"""help""": """help message"""}							)
            SCREAMING_SNAKE_CASE__      :  int					=							None
            SCREAMING_SNAKE_CASE__      :  Any					=							list_field(default=[]							)
            SCREAMING_SNAKE_CASE__      :  int					=							list_field(default=[]							)







class 				snake_case__(							unittest.TestCase							):







      '''simple docstring'''




      def 						lowercase_ (				self   ,						__lowercase   ,						__lowercase							)					->    List[Any]:
          self.assertEqual(len(a._actions							)   ,						len(b._actions							)							)
          for x, y in zip(a._actions   ,						b._actions							):
              lowerCAmelCase_ :      Tuple    				=				{k: v for k, v in vars(__lowercase							).items() if k != "container"}
              lowerCAmelCase_ :      Optional[Any]    				=				{k: v for k, v in vars(__lowercase							).items() if k != "container"}

              # Choices with mixed type have custom function as "type"
              # So we need to compare results directly for equality
              if xx.get('''choices'''   ,						__lowercase							) and yy.get('''choices'''   ,						__lowercase							):
                  for expected_choice in yy["choices"] + xx["choices"]:
                      self.assertEqual(xx['''type'''](__lowercase							)   ,						yy['''type'''](__lowercase							)							)
                  del xx["type"], yy["type"]

              self.assertEqual(__lowercase   ,						__lowercase							)




      def 						lowercase_ (				self							)					->    Dict:
          lowerCAmelCase_ :      Any    				=				HfArgumentParser(__lowercase							)

          lowerCAmelCase_ :      Optional[Any]    				=				argparse.ArgumentParser()
          expected.add_argument('''--foo'''   ,						type=__lowercase   ,						required=__lowercase							)
          expected.add_argument('''--bar'''   ,						type=__lowercase   ,						required=__lowercase							)
          expected.add_argument('''--baz'''   ,						type=__lowercase   ,						required=__lowercase							)
          expected.add_argument('''--flag'''   ,						type=__lowercase   ,						default=__lowercase   ,						const=__lowercase   ,						nargs='''?'''							)
          self.argparsersEqual(__lowercase   ,						__lowercase							)

          lowerCAmelCase_ :      Tuple    				=				["--foo", "1", "--baz", "quux", "--bar", "0.5"]
          (lowerCAmelCase_							) :      Optional[Any]    				=				parser.parse_args_into_dataclasses(__lowercase   ,						look_for_args_file=__lowercase							)
          self.assertFalse(example.flag							)




      def 						lowercase_ (				self							)					->    str:
          lowerCAmelCase_ :      List[Any]    				=				HfArgumentParser(__lowercase							)

          lowerCAmelCase_ :      Tuple    				=				argparse.ArgumentParser()
          expected.add_argument('''--foo'''   ,						default=4_2   ,						type=__lowercase							)
          expected.add_argument('''--baz'''   ,						default='''toto'''   ,						type=__lowercase   ,						help='''help message'''							)
          self.argparsersEqual(__lowercase   ,						__lowercase							)




      def 						lowercase_ (				self							)					->    int:
          lowerCAmelCase_ :      List[str]    				=				argparse.ArgumentParser()
          expected.add_argument('''--foo'''   ,						type=__lowercase   ,						default=__lowercase   ,						const=__lowercase   ,						nargs='''?'''							)
          expected.add_argument('''--baz'''   ,						type=__lowercase   ,						default=__lowercase   ,						const=__lowercase   ,						nargs='''?'''							)
          # A boolean no_* argument always has to come after its "default: True" regular counter-part
          # and its default must be set to False
          expected.add_argument('''--no_baz'''   ,						action='''store_false'''   ,						default=__lowercase   ,						dest='''baz'''							)
          expected.add_argument('''--opt'''   ,						type=__lowercase   ,						default=__lowercase							)

          lowerCAmelCase_ :      Optional[int]    				=				[WithDefaultBoolExample]
          if is_python_no_less_than_3_10:
              dataclass_types.append(__lowercase							)

          for dataclass_type in dataclass_types:
              lowerCAmelCase_ :      int    				=				HfArgumentParser(__lowercase							)
              self.argparsersEqual(__lowercase   ,						__lowercase							)

              lowerCAmelCase_ :      str    				=				parser.parse_args([]							)
              self.assertEqual(__lowercase   ,						Namespace(foo=__lowercase   ,						baz=__lowercase   ,						opt=__lowercase							)							)

              lowerCAmelCase_ :      Dict    				=				parser.parse_args(['''--foo''', '''--no_baz''']							)
              self.assertEqual(__lowercase   ,						Namespace(foo=__lowercase   ,						baz=__lowercase   ,						opt=__lowercase							)							)

              lowerCAmelCase_ :      Any    				=				parser.parse_args(['''--foo''', '''--baz''']							)
              self.assertEqual(__lowercase   ,						Namespace(foo=__lowercase   ,						baz=__lowercase   ,						opt=__lowercase							)							)

              lowerCAmelCase_ :      int    				=				parser.parse_args(['''--foo''', '''True''', '''--baz''', '''True''', '''--opt''', '''True''']							)
              self.assertEqual(__lowercase   ,						Namespace(foo=__lowercase   ,						baz=__lowercase   ,						opt=__lowercase							)							)

              lowerCAmelCase_ :      Optional[int]    				=				parser.parse_args(['''--foo''', '''False''', '''--baz''', '''False''', '''--opt''', '''False''']							)
              self.assertEqual(__lowercase   ,						Namespace(foo=__lowercase   ,						baz=__lowercase   ,						opt=__lowercase							)							)




      def 						lowercase_ (				self							)					->    str:
          lowerCAmelCase_ :      Any    				=				HfArgumentParser(__lowercase							)

          lowerCAmelCase_ :      List[Any]    				=				argparse.ArgumentParser()
          expected.add_argument(
              '''--foo'''   ,						default='''toto'''   ,						choices=['''titi''', '''toto''', 4_2]   ,						type=make_choice_type_function(['''titi''', '''toto''', 4_2]							)   ,						)
          self.argparsersEqual(__lowercase   ,						__lowercase							)

          lowerCAmelCase_ :      List[Any]    				=				parser.parse_args([]							)
          self.assertEqual(args.foo   ,						'''toto'''							)
          lowerCAmelCase_ :      List[Any]    				=				parser.parse_args_into_dataclasses([]							)[0]
          self.assertEqual(enum_ex.foo   ,						MixedTypeEnum.toto							)

          lowerCAmelCase_ :      List[Any]    				=				parser.parse_args(['''--foo''', '''titi''']							)
          self.assertEqual(args.foo   ,						'''titi'''							)
          lowerCAmelCase_ :      Optional[int]    				=				parser.parse_args_into_dataclasses(['''--foo''', '''titi''']							)[0]
          self.assertEqual(enum_ex.foo   ,						MixedTypeEnum.titi							)

          lowerCAmelCase_ :      Optional[Any]    				=				parser.parse_args(['''--foo''', '''42''']							)
          self.assertEqual(args.foo   ,						4_2							)
          lowerCAmelCase_ :      Dict    				=				parser.parse_args_into_dataclasses(['''--foo''', '''42''']							)[0]
          self.assertEqual(enum_ex.foo   ,						MixedTypeEnum.fourtytwo							)




      def 						lowercase_ (				self							)					->    int:







          @dataclass
          class 				snake_case__:







                '''simple docstring'''




                SCREAMING_SNAKE_CASE__      :  Optional[int]					=							"""toto"""






          lowerCAmelCase_ :      Dict    				=				HfArgumentParser(__lowercase							)

          lowerCAmelCase_ :      List[str]    				=				argparse.ArgumentParser()
          expected.add_argument(
              '''--foo'''   ,						default='''toto'''   ,						choices=('''titi''', '''toto''', 4_2)   ,						type=make_choice_type_function(['''titi''', '''toto''', 4_2]							)   ,						)
          self.argparsersEqual(__lowercase   ,						__lowercase							)

          lowerCAmelCase_ :      int    				=				parser.parse_args([]							)
          self.assertEqual(args.foo   ,						'''toto'''							)

          lowerCAmelCase_ :      Optional[int]    				=				parser.parse_args(['''--foo''', '''titi''']							)
          self.assertEqual(args.foo   ,						'''titi'''							)

          lowerCAmelCase_ :      Union[str, Any]    				=				parser.parse_args(['''--foo''', '''42''']							)
          self.assertEqual(args.foo   ,						4_2							)




      def 						lowercase_ (				self							)					->    int:
          lowerCAmelCase_ :      Union[str, Any]    				=				HfArgumentParser(__lowercase							)

          lowerCAmelCase_ :      List[Any]    				=				argparse.ArgumentParser()
          expected.add_argument('''--foo_int'''   ,						nargs='''+'''   ,						default=[]   ,						type=__lowercase							)
          expected.add_argument('''--bar_int'''   ,						nargs='''+'''   ,						default=[1, 2, 3]   ,						type=__lowercase							)
          expected.add_argument('''--foo_str'''   ,						nargs='''+'''   ,						default=['''Hallo''', '''Bonjour''', '''Hello''']   ,						type=__lowercase							)
          expected.add_argument('''--foo_float'''   ,						nargs='''+'''   ,						default=[0.1, 0.2, 0.3]   ,						type=__lowercase							)

          self.argparsersEqual(__lowercase   ,						__lowercase							)

          lowerCAmelCase_ :      Any    				=				parser.parse_args([]							)
          self.assertEqual(
              __lowercase   ,						Namespace(foo_int=[]   ,						bar_int=[1, 2, 3]   ,						foo_str=['''Hallo''', '''Bonjour''', '''Hello''']   ,						foo_float=[0.1, 0.2, 0.3]							)   ,						)

          lowerCAmelCase_ :      Any    				=				parser.parse_args('''--foo_int 1 --bar_int 2 3 --foo_str a b c --foo_float 0.1 0.7'''.split()							)
          self.assertEqual(__lowercase   ,						Namespace(foo_int=[1]   ,						bar_int=[2, 3]   ,						foo_str=['''a''', '''b''', '''c''']   ,						foo_float=[0.1, 0.7]							)							)




      def 						lowercase_ (				self							)					->    Optional[int]:
          lowerCAmelCase_ :      List[str]    				=				argparse.ArgumentParser()
          expected.add_argument('''--foo'''   ,						default=__lowercase   ,						type=__lowercase							)
          expected.add_argument('''--bar'''   ,						default=__lowercase   ,						type=__lowercase   ,						help='''help message'''							)
          expected.add_argument('''--baz'''   ,						default=__lowercase   ,						type=__lowercase							)
          expected.add_argument('''--ces'''   ,						nargs='''+'''   ,						default=[]   ,						type=__lowercase							)
          expected.add_argument('''--des'''   ,						nargs='''+'''   ,						default=[]   ,						type=__lowercase							)

          lowerCAmelCase_ :      str    				=				[OptionalExample]
          if is_python_no_less_than_3_10:
              dataclass_types.append(__lowercase							)

          for dataclass_type in dataclass_types:
              lowerCAmelCase_ :      Dict    				=				HfArgumentParser(__lowercase							)

              self.argparsersEqual(__lowercase   ,						__lowercase							)

              lowerCAmelCase_ :      Any    				=				parser.parse_args([]							)
              self.assertEqual(__lowercase   ,						Namespace(foo=__lowercase   ,						bar=__lowercase   ,						baz=__lowercase   ,						ces=[]   ,						des=[]							)							)

              lowerCAmelCase_ :      Optional[Any]    				=				parser.parse_args('''--foo 12 --bar 3.14 --baz 42 --ces a b c --des 1 2 3'''.split()							)
              self.assertEqual(__lowercase   ,						Namespace(foo=1_2   ,						bar=3.14   ,						baz='''42'''   ,						ces=['''a''', '''b''', '''c''']   ,						des=[1, 2, 3]							)							)




      def 						lowercase_ (				self							)					->    str:
          lowerCAmelCase_ :      str    				=				HfArgumentParser(__lowercase							)

          lowerCAmelCase_ :      Union[str, Any]    				=				argparse.ArgumentParser()
          expected.add_argument('''--required_list'''   ,						nargs='''+'''   ,						type=__lowercase   ,						required=__lowercase							)
          expected.add_argument('''--required_str'''   ,						type=__lowercase   ,						required=__lowercase							)
          expected.add_argument(
              '''--required_enum'''   ,						type=make_choice_type_function(['''titi''', '''toto''']							)   ,						choices=['''titi''', '''toto''']   ,						required=__lowercase   ,						)
          self.argparsersEqual(__lowercase   ,						__lowercase							)




      def 						lowercase_ (				self							)					->    Union[str, Any]:
          lowerCAmelCase_ :      str    				=				HfArgumentParser(__lowercase							)

          lowerCAmelCase_ :      int    				=				argparse.ArgumentParser()
          expected.add_argument('''--foo'''   ,						type=__lowercase   ,						required=__lowercase							)
          expected.add_argument(
              '''--required_enum'''   ,						type=make_choice_type_function(['''titi''', '''toto''']							)   ,						choices=['''titi''', '''toto''']   ,						required=__lowercase   ,						)
          expected.add_argument('''--opt'''   ,						type=__lowercase   ,						default=__lowercase							)
          expected.add_argument('''--baz'''   ,						default='''toto'''   ,						type=__lowercase   ,						help='''help message'''							)
          expected.add_argument('''--foo_str'''   ,						nargs='''+'''   ,						default=['''Hallo''', '''Bonjour''', '''Hello''']   ,						type=__lowercase							)
          self.argparsersEqual(__lowercase   ,						__lowercase							)




      def 						lowercase_ (				self							)					->    Dict:
          lowerCAmelCase_ :      Optional[Any]    				=				HfArgumentParser(__lowercase							)

          lowerCAmelCase_ :      Dict    				=				{
              "foo": 1_2,
              "bar": 3.14,
              "baz": "42",
              "flag": True,
          }

          lowerCAmelCase_ :      Optional[int]    				=				parser.parse_dict(__lowercase							)[0]
          lowerCAmelCase_ :      Optional[int]    				=				BasicExample(**__lowercase							)
          self.assertEqual(__lowercase   ,						__lowercase							)




      def 						lowercase_ (				self							)					->    Dict:
          lowerCAmelCase_ :      str    				=				HfArgumentParser(__lowercase							)

          lowerCAmelCase_ :      List[Any]    				=				{
              "foo": 1_2,
              "bar": 3.14,
              "baz": "42",
              "flag": True,
              "extra": 4_2,
          }

          self.assertRaises(__lowercase   ,						parser.parse_dict   ,						__lowercase   ,						allow_extra_keys=__lowercase							)




      def 						lowercase_ (				self							)					->    Optional[Any]:
          lowerCAmelCase_ :      Union[str, Any]    				=				HfArgumentParser(__lowercase							)

          lowerCAmelCase_ :      Optional[Any]    				=				{
              "foo": 1_2,
              "bar": 3.14,
              "baz": "42",
              "flag": True,
          }
          with tempfile.TemporaryDirectory() as tmp_dir:
              lowerCAmelCase_ :      Dict    				=				os.path.join(__lowercase   ,						'''temp_json'''							)
              os.mkdir(__lowercase							)
              with open(temp_local_path + '''.json'''   ,						'''w+'''							) as f:
                  json.dump(__lowercase   ,						__lowercase							)
              lowerCAmelCase_ :      List[Any]    				=				parser.parse_yaml_file(Path(temp_local_path + '''.json'''							)							)[0]

          lowerCAmelCase_ :      str    				=				BasicExample(**__lowercase							)
          self.assertEqual(__lowercase   ,						__lowercase							)




      def 						lowercase_ (				self							)					->    Optional[Any]:
          lowerCAmelCase_ :      str    				=				HfArgumentParser(__lowercase							)

          lowerCAmelCase_ :      str    				=				{
              "foo": 1_2,
              "bar": 3.14,
              "baz": "42",
              "flag": True,
          }
          with tempfile.TemporaryDirectory() as tmp_dir:
              lowerCAmelCase_ :      str    				=				os.path.join(__lowercase   ,						'''temp_yaml'''							)
              os.mkdir(__lowercase							)
              with open(temp_local_path + '''.yaml'''   ,						'''w+'''							) as f:
                  yaml.dump(__lowercase   ,						__lowercase							)
              lowerCAmelCase_ :      int    				=				parser.parse_yaml_file(Path(temp_local_path + '''.yaml'''							)							)[0]
          lowerCAmelCase_ :      Union[str, Any]    				=				BasicExample(**__lowercase							)
          self.assertEqual(__lowercase   ,						__lowercase							)




      def 						lowercase_ (				self							)					->    List[Any]:
          lowerCAmelCase_ :      Union[str, Any]    				=				HfArgumentParser(__lowercase							)
          self.assertIsNotNone(__lowercase							)



import inspect
import re

from transformers.utils import direct_transformers_import


# All paths are set with the intent you should run this script from the root of the repo with the command
# python utils/check_config_docstrings.py
_UpperCAmelCase			:  Any     ="""src/transformers"""


# This is to make sure the transformers module imported is the one in the repo.
_UpperCAmelCase			:  Optional[Any]     =direct_transformers_import(PATH_TO_TRANSFORMERS)

_UpperCAmelCase			:  List[str]     =transformers.models.auto.configuration_auto.CONFIG_MAPPING

# Regex pattern used to find the checkpoint mentioned in the docstring of `config_class`.
# For example, `[bert-base-uncased](https://huggingface.co/bert-base-uncased)`
_UpperCAmelCase			:  Dict     =re.compile(R"""\[(.+?)\]\((https://huggingface\.co/.+?)\)""")


_UpperCAmelCase			:  Any     ={
    """DecisionTransformerConfig""",
    """EncoderDecoderConfig""",
    """MusicgenConfig""",
    """RagConfig""",
    """SpeechEncoderDecoderConfig""",
    """TimmBackboneConfig""",
    """VisionEncoderDecoderConfig""",
    """VisionTextDualEncoderConfig""",
    """LlamaConfig""",
}



def 			lowerCAmelCase (		lowerCAmelCase_ )-> str:
				lowerCAmelCase_ :      Any    				=				None

				# source code of `config_class`
				lowerCAmelCase_ :      Optional[int]    				=				inspect.getsource(lowerCAmelCase_ )
				lowerCAmelCase_ :      str    				=				_re_checkpoint.findall(lowerCAmelCase_ )

				# Each `checkpoint` is a tuple of a checkpoint name and a checkpoint link.
				# For example, `('bert-base-uncased', 'https://huggingface.co/bert-base-uncased')`
				for ckpt_name, ckpt_link in checkpoints:
								# allow the link to end with `/`
								if ckpt_link.endswith('''/''' ):
												lowerCAmelCase_ :      Optional[Any]    				=				ckpt_link[:-1]

								# verify the checkpoint name corresponds to the checkpoint link
								lowerCAmelCase_ :      Tuple    				=				f"""https://huggingface.co/{ckpt_name}"""
								if ckpt_link == ckpt_link_from_name:
												lowerCAmelCase_ :      List[str]    				=				ckpt_name
												break

				return checkpoint



def 			lowerCAmelCase (		)-> Optional[Any]:
				lowerCAmelCase_ :      Tuple    				=				[]

				for config_class in list(CONFIG_MAPPING.values() ):
								# Skip deprecated models
								if "models.deprecated" in config_class.__module__:
												continue
								lowerCAmelCase_ :      int    				=				get_checkpoint_from_config_class(lowerCAmelCase_ )

								lowerCAmelCase_ :      Tuple    				=				config_class.__name__
								if checkpoint is None and name not in CONFIG_CLASSES_TO_IGNORE_FOR_DOCSTRING_CHECKPOINT_CHECK:
												configs_without_checkpoint.append(lowerCAmelCase_ )

				if len(lowerCAmelCase_ ) > 0:
								lowerCAmelCase_ :      List[Any]    				=				'''\n'''.join(sorted(lowerCAmelCase_ ) )
								raise ValueError(f"""The following configurations don't contain any valid checkpoint:\n{message}""" )


if __name__ == "__main__":
						check_config_docstrings_have_checkpoints()