
import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import Mock, patch

import diffusers.utils.hub_utils






class     SCREAMING_SNAKE_CASE__      (							unittest.TestCase      ):

							"""simple docstring"""






							@patch('''diffusers.utils.hub_utils.get_full_repo_name'''     )
							def       A__						(					self       ,		SCREAMING_SNAKE_CASE_     )->				None:





													'''simple docstring'''






													__UpperCamelCase       					=     '''full_repo_name'''
													with TemporaryDirectory() as tmpdir:
																			# Dummy args values
																			__UpperCamelCase       					=     Mock()
																			__UpperCamelCase       					=     tmpdir
																			__UpperCamelCase       					=     0
																			__UpperCamelCase       					=     '''hub_token'''
																			__UpperCamelCase       					=     '''dataset_name'''
																			__UpperCamelCase       					=     0.0_1
																			__UpperCamelCase       					=     100000
																			__UpperCamelCase       					=     10000
																			__UpperCamelCase       					=     0.0_1
																			__UpperCamelCase       					=     0.0_2
																			__UpperCamelCase       					=     0.0_3
																			__UpperCamelCase       					=     0.0_0_0_5
																			__UpperCamelCase       					=     0.0_0_0_0_0_1
																			__UpperCamelCase       					=     1
																			__UpperCamelCase       					=     10
																			__UpperCamelCase       					=     0.0_0_1
																			__UpperCamelCase       					=     0.1
																			__UpperCamelCase       					=     0.2
																			__UpperCamelCase       					=     True

																			# Model card mush be rendered and saved
																			diffusers.utils.hub_utils.create_model_card(SCREAMING_SNAKE_CASE_       ,		model_name='''model_name'''     )
																			self.assertTrue((Path(SCREAMING_SNAKE_CASE_     ) / '''README.md''').is_file()     )






import torch

from transformers import PreTrainedModel

from .custom_configuration import CustomConfig, NoSuperInitConfig






class     SCREAMING_SNAKE_CASE__      (							SCREAMING_SNAKE_CASE_      ):

							"""simple docstring"""






							_snake_case       						=					CustomConfig



							def __init__(					self       ,		SCREAMING_SNAKE_CASE_     )->				Tuple:





													'''simple docstring'''






													super().__init__(SCREAMING_SNAKE_CASE_     )
													__UpperCamelCase       					=     torch.nn.Linear(config.hidden_size       ,		config.hidden_size     )



							def       A__						(					self       ,		SCREAMING_SNAKE_CASE_     )->				List[str]:





													'''simple docstring'''






													return self.linear(SCREAMING_SNAKE_CASE_     )



							def       A__						(					self       ,		SCREAMING_SNAKE_CASE_     )->				Any:





													'''simple docstring'''






													pass






class     SCREAMING_SNAKE_CASE__      (							SCREAMING_SNAKE_CASE_      ):

							"""simple docstring"""






							_snake_case       						=					NoSuperInitConfig



							def __init__(					self       ,		SCREAMING_SNAKE_CASE_     )->				Tuple:





													'''simple docstring'''






													super().__init__(SCREAMING_SNAKE_CASE_     )
													__UpperCamelCase       					=     torch.nn.Linear(config.attribute       ,		config.attribute     )



							def       A__						(					self       ,		SCREAMING_SNAKE_CASE_     )->				List[str]:





													'''simple docstring'''






													return self.linear(SCREAMING_SNAKE_CASE_     )



							def       A__						(					self       ,		SCREAMING_SNAKE_CASE_     )->				Union[str, Any]:





													'''simple docstring'''






													pass




