





from typing import Callable



def    SCREAMING_SNAKE_CASE							(			snake_case       )		->						Tuple:

		def wrapper(snake_case       ):
				__lowercase					=    function_with_docstring.__doc__
				return target_function

		return wrapper











import torch
import torch.nn.functional as F

from diffusers import VQDiffusionScheduler

from .test_schedulers import SchedulerCommonTest

class 		snake_case_      (       UpperCAmelCase_	):







	'''simple docstring'''
	__UpperCamelCase        =		(VQDiffusionScheduler,)




	def       UpperCAmelCase (	self       :    int				,			**__lowerCamelCase       :    List[Any]      )					->   Tuple:

			'''simple docstring'''




			__lowercase					=    {
			    'num_vec_classes': 4_097,
			    'num_train_timesteps': 100,
			}

			config.update(**__lowerCamelCase      )
			return config




	def       UpperCAmelCase (	self       :    List[Any]				,			__lowerCamelCase       :    List[str]      )					->   Tuple:

			'''simple docstring'''




			__lowercase					=    4
			__lowercase					=    8
			__lowercase					=    8

			__lowercase					=    torch.randint(0				,			__lowerCamelCase				,			(batch_size, height * width)      )

			return sample




	@property
	def       UpperCAmelCase (	self       :    Any      )					->   List[Any]:

			'''simple docstring'''




			assert False




	def       UpperCAmelCase (	self       :    Union[str, Any]				,			__lowerCamelCase       :    str      )					->   Dict:

			'''simple docstring'''




			def model(__lowerCamelCase       :    Dict				,			__lowerCamelCase       :    Optional[Any]				,			*__lowerCamelCase       :    List[Any]      ):
					__lowercase	,			__lowercase					=    sample.shape
					__lowercase					=    torch.rand((batch_size, num_vec_classes - 1, num_latent_pixels)      )
					__lowercase					=    F.log_softmax(logits.double()				,			dim=1      ).float()
					return return_value

			return model




	def       UpperCAmelCase (	self       :    Dict      )					->   List[Any]:

			'''simple docstring'''




			for timesteps in [2, 5, 100, 1_000]:
					self.check_over_configs(num_train_timesteps=__lowerCamelCase      )




	def       UpperCAmelCase (	self       :    Optional[Any]      )					->   int:

			'''simple docstring'''




			for num_vec_classes in [5, 100, 1_000, 4_000]:
					self.check_over_configs(num_vec_classes=__lowerCamelCase      )




	def       UpperCAmelCase (	self       :    Any      )					->   List[Any]:

			'''simple docstring'''




			for t in [0, 50, 99]:
					self.check_over_forward(time_step=__lowerCamelCase      )






	def       UpperCAmelCase (	self       :    str      )					->   Optional[int]:

			'''simple docstring'''




			pass




