






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__					    =    """src/transformers"""


# This is to make sure the transformers module imported is the one in the repo.
UpperCamelCase__					    =    direct_transformers_import(PATH_TO_TRANSFORMERS)

UpperCamelCase__					    =    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__					    =    re.compile(R"""\[(.+?)\]\((https://huggingface\.co/.+?)\)""")


UpperCamelCase__					    =    {
    """DecisionTransformerConfig""",
    """EncoderDecoderConfig""",
    """MusicgenConfig""",
    """RagConfig""",
    """SpeechEncoderDecoderConfig""",
    """TimmBackboneConfig""",
    """VisionEncoderDecoderConfig""",
    """VisionTextDualEncoderConfig""",
    """LlamaConfig""",
}







def 			_a   (		SCREAMING_SNAKE_CASE_							:       Tuple  ):
					__lowerCAmelCase            = None

					# source code of `config_class`
					__lowerCAmelCase            = inspect.getsource(SCREAMING_SNAKE_CASE_  )
					__lowerCAmelCase            = _re_checkpoint.findall(SCREAMING_SNAKE_CASE_  )

					# 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            = ckpt_link[:-1]

										# verify the checkpoint name corresponds to the checkpoint link
										__lowerCAmelCase            = F"""https://huggingface.co/{ckpt_name}"""
										if ckpt_link == ckpt_link_from_name:
															__lowerCAmelCase            = ckpt_name
															break

					return checkpoint







def 			_a   (		):
					__lowerCAmelCase            = []

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

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

					if len(SCREAMING_SNAKE_CASE_  ) > 0:
										__lowerCAmelCase            = "\n".join(sorted(SCREAMING_SNAKE_CASE_  )  )
										raise ValueError(F"""The following configurations don't contain any valid checkpoint:\n{message}"""  )


if __name__ == "__main__":
					check_config_docstrings_have_checkpoints()










def 			_a   (		SCREAMING_SNAKE_CASE_							:       list[int]  ):
					__lowerCAmelCase            = len(SCREAMING_SNAKE_CASE_  )
					for i in range(SCREAMING_SNAKE_CASE_  ):
										for j in range(i + 1   ,   SCREAMING_SNAKE_CASE_  ):
															if numbers[j] < numbers[i]:
																				__lowerCAmelCase     ,							__lowerCAmelCase            = numbers[j], numbers[i]
					return numbers


if __name__ == "__main__":
					UpperCamelCase__					    =    input("""Enter numbers separated by a comma:\n""").strip()
					UpperCamelCase__					    =    [int(item) for item in user_input.split(""",""")]
					print(exchange_sort(unsorted))




