


'''simple docstring'''


import unittest

import numpy as np

from transformers import is_flax_available
from transformers.testing_utils import require_flax

from ..test_modeling_flax_common import ids_tensor


if is_flax_available():
						import jax
						import jax.numpy as jnp

						from transformers.generation import (
						    FlaxForcedBOSTokenLogitsProcessor,
						    FlaxForcedEOSTokenLogitsProcessor,
						    FlaxLogitsProcessorList,
						    FlaxMinLengthLogitsProcessor,
						    FlaxTemperatureLogitsWarper,
						    FlaxTopKLogitsWarper,
						    FlaxTopPLogitsWarper,
						)






@require_flax
class 	lowerCAmelCase__			(			unittest.TestCase	):




			def 							lowerCAmelCase__    (		self  :     List[str]	,  lowerCamelCase__  :     int	,  lowerCamelCase__  :     int )   ->Dict:



					'''simple docstring'''







					_UpperCAmelCase		:       Union[str, Any]								=      jnp.ones((batch_size, length) ) / length
					return scores




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



					'''simple docstring'''







					_UpperCAmelCase		:       List[Any]								=      None
					_UpperCAmelCase		:       Dict								=      20

					_UpperCAmelCase		:       List[str]								=      self._get_uniform_logits(batch_size=2	,  length=lowerCamelCase__ )

					# tweak scores to not be uniform anymore
					_UpperCAmelCase		:       Optional[int]								=      scores.at[1, 5].set((1 / length) + 0.1 )  # peak, 1st batch
					_UpperCAmelCase		:       Optional[Any]								=      scores.at[1, 10].set((1 / length) - 0.4 )  # valley, 1st batch

					# compute softmax
					_UpperCAmelCase		:       List[Any]								=      jax.nn.softmax(lowerCamelCase__	,  axis=-1 )

					_UpperCAmelCase		:       int								=      FlaxTemperatureLogitsWarper(temperature=0.5 )
					_UpperCAmelCase		:       List[Any]								=      FlaxTemperatureLogitsWarper(temperature=1.3 )

					_UpperCAmelCase		:       List[Any]								=      jax.nn.softmax(temp_dist_warper_sharper(lowerCamelCase__	,  scores.copy()	,  cur_len=lowerCamelCase__ )	,  axis=-1 )
					_UpperCAmelCase		:       Any								=      jax.nn.softmax(temp_dist_warper_smoother(lowerCamelCase__	,  scores.copy()	,  cur_len=lowerCamelCase__ )	,  axis=-1 )

					# uniform distribution stays uniform
					self.assertTrue(jnp.allclose(probs[0, :]	,  warped_prob_sharp[0, :]	,  atol=1E-3 ) )
					self.assertTrue(jnp.allclose(probs[0, :]	,  warped_prob_smooth[0, :]	,  atol=1E-3 ) )

					# sharp peaks get higher, valleys get lower
					self.assertLess(probs[1, :].max()	,  warped_prob_sharp[1, :].max() )
					self.assertGreater(probs[1, :].min()	,  warped_prob_sharp[1, :].min() )

					# smooth peaks get lower, valleys get higher
					self.assertGreater(probs[1, :].max()	,  warped_prob_smooth[1, :].max() )
					self.assertLess(probs[1, :].min()	,  warped_prob_smooth[1, :].min() )




			def 							lowerCAmelCase__    (		self  :     Optional[int] )   ->Union[str, Any]:



					'''simple docstring'''







					_UpperCAmelCase		:       Any								=      None
					_UpperCAmelCase		:       int								=      10
					_UpperCAmelCase		:       Tuple								=      2

					# create ramp distribution
					_UpperCAmelCase		:       Optional[int]								=      np.broadcast_to(np.arange(lowerCamelCase__ )[None, :]	,  (batch_size, vocab_size) ).copy()
					_UpperCAmelCase		:       Tuple								=      ramp_logits[1:, : vocab_size // 2] + vocab_size

					_UpperCAmelCase		:       int								=      FlaxTopKLogitsWarper(3 )

					_UpperCAmelCase		:       List[str]								=      top_k_warp(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )

					# check that correct tokens are filtered
					self.assertListEqual(jnp.isinf(scores[0] ).tolist()	,  7 * [True] + 3 * [False] )
					self.assertListEqual(jnp.isinf(scores[1] ).tolist()	,  2 * [True] + 3 * [False] + 5 * [True] )

					# check special case
					_UpperCAmelCase		:       str								=      5
					_UpperCAmelCase		:       Any								=      FlaxTopKLogitsWarper(top_k=1	,  filter_value=0.0	,  min_tokens_to_keep=3 )

					_UpperCAmelCase		:       int								=      np.broadcast_to(np.arange(lowerCamelCase__ )[None, :]	,  (batch_size, length) ).copy()
					_UpperCAmelCase		:       List[Any]								=      top_k_warp_safety_check(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )

					# min_tokens overwrites k: 3 tokens are kept => 2 tokens are nullified
					self.assertListEqual((scores == 0.0).sum(axis=-1 ).tolist()	,  [2, 2] )




			def 							lowerCAmelCase__    (		self  :     Dict )   ->List[str]:



					'''simple docstring'''







					_UpperCAmelCase		:       Optional[int]								=      None
					_UpperCAmelCase		:       Optional[int]								=      10
					_UpperCAmelCase		:       int								=      2

					# create distribution and take log (inverse to Softmax as taken in TopPLogitsWarper)
					_UpperCAmelCase		:       Tuple								=      np.log(np.array([[0.3, 0.1, 0.1, 0.5], [0.1_5, 0.3, 0.3, 0.2_5]] ) )

					_UpperCAmelCase		:       Tuple								=      FlaxTopPLogitsWarper(0.8 )
					_UpperCAmelCase		:       List[Any]								=      np.exp(top_p_warp(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ ) )

					# dist should be filtered to keep min num values so that sum is >= top_p
					# exp (-inf) => 0
					_UpperCAmelCase		:       Tuple								=      np.array([[0.3, 0.0, 0.0, 0.5], [0.0, 0.3, 0.3, 0.2_5]] )
					self.assertTrue(np.allclose(lowerCamelCase__	,  lowerCamelCase__	,  atol=1E-3 ) )

					# check edge cases with negative and extreme logits
					_UpperCAmelCase		:       Optional[Any]								=      np.broadcast_to(np.arange(lowerCamelCase__ )[None, :]	,  (batch_size, vocab_size) ).copy() - (
					    vocab_size // 2
					)

					# make ramp_logits more extreme
					_UpperCAmelCase		:       str								=      ramp_logits[1] * 1_0_0.0

					# make sure at least 2 tokens are kept
					_UpperCAmelCase		:       int								=      FlaxTopPLogitsWarper(0.9	,  min_tokens_to_keep=2	,  filter_value=0.0 )
					_UpperCAmelCase		:       Tuple								=      top_p_warp(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )

					# first batch should keep three tokens, second batch would keep only 1, but due to `min_tokens_to_keep=2` keeps 2.
					self.assertListEqual((filtered_dist != 0.0).sum(axis=-1 ).tolist()	,  [3, 2] )




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



					'''simple docstring'''







					_UpperCAmelCase		:       Union[str, Any]								=      20
					_UpperCAmelCase		:       str								=      4
					_UpperCAmelCase		:       Any								=      0

					_UpperCAmelCase		:       Optional[Any]								=      FlaxMinLengthLogitsProcessor(min_length=10	,  eos_token_id=lowerCamelCase__ )

					# check that min length is applied at length 5
					_UpperCAmelCase		:       Union[str, Any]								=      ids_tensor((batch_size, 20)	,  vocab_size=20 )
					_UpperCAmelCase		:       int								=      5
					_UpperCAmelCase		:       List[Any]								=      self._get_uniform_logits(lowerCamelCase__	,  lowerCamelCase__ )
					_UpperCAmelCase		:       Any								=      min_dist_processor(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
					self.assertListEqual(scores_before_min_length[:, eos_token_id].tolist()	,  4 * [-float("inf" )] )

					# check that min length is not applied anymore at length 15
					_UpperCAmelCase		:       Dict								=      self._get_uniform_logits(lowerCamelCase__	,  lowerCamelCase__ )
					_UpperCAmelCase		:       Dict								=      15
					_UpperCAmelCase		:       str								=      min_dist_processor(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
					self.assertFalse(jnp.isinf(lowerCamelCase__ ).any() )




			def 							lowerCAmelCase__    (		self  :     List[str] )   ->Any:



					'''simple docstring'''







					_UpperCAmelCase		:       int								=      20
					_UpperCAmelCase		:       int								=      4
					_UpperCAmelCase		:       List[str]								=      0

					_UpperCAmelCase		:       Dict								=      FlaxForcedBOSTokenLogitsProcessor(bos_token_id=lowerCamelCase__ )

					# check that all scores are -inf except the bos_token_id score
					_UpperCAmelCase		:       int								=      ids_tensor((batch_size, 1)	,  vocab_size=20 )
					_UpperCAmelCase		:       Any								=      1
					_UpperCAmelCase		:       str								=      self._get_uniform_logits(lowerCamelCase__	,  lowerCamelCase__ )
					_UpperCAmelCase		:       int								=      logits_processor(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
					self.assertTrue(jnp.isneginf(scores[:, bos_token_id + 1 :] ).all() )
					self.assertListEqual(scores[:, bos_token_id].tolist()	,  4 * [0] )  # score for bos_token_id shold be zero

					# check that bos_token_id is not forced if current length is greater than 1
					_UpperCAmelCase		:       int								=      3
					_UpperCAmelCase		:       str								=      self._get_uniform_logits(lowerCamelCase__	,  lowerCamelCase__ )
					_UpperCAmelCase		:       Optional[int]								=      logits_processor(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
					self.assertFalse(jnp.isinf(lowerCamelCase__ ).any() )




			def 							lowerCAmelCase__    (		self  :     List[Any] )   ->Union[str, Any]:



					'''simple docstring'''







					_UpperCAmelCase		:       Any								=      20
					_UpperCAmelCase		:       Union[str, Any]								=      4
					_UpperCAmelCase		:       List[Any]								=      0
					_UpperCAmelCase		:       str								=      5

					_UpperCAmelCase		:       Tuple								=      FlaxForcedEOSTokenLogitsProcessor(max_length=lowerCamelCase__	,  eos_token_id=lowerCamelCase__ )

					# check that all scores are -inf except the eos_token_id when max_length is reached
					_UpperCAmelCase		:       Tuple								=      ids_tensor((batch_size, 4)	,  vocab_size=20 )
					_UpperCAmelCase		:       List[str]								=      4
					_UpperCAmelCase		:       Any								=      self._get_uniform_logits(lowerCamelCase__	,  lowerCamelCase__ )
					_UpperCAmelCase		:       int								=      logits_processor(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
					self.assertTrue(jnp.isneginf(scores[:, eos_token_id + 1 :] ).all() )
					self.assertListEqual(scores[:, eos_token_id].tolist()	,  4 * [0] )  # score for eos_token_id should be zero

					# check that eos_token_id is not forced if max_length is not reached
					_UpperCAmelCase		:       List[Any]								=      3
					_UpperCAmelCase		:       Dict								=      self._get_uniform_logits(lowerCamelCase__	,  lowerCamelCase__ )
					_UpperCAmelCase		:       List[str]								=      logits_processor(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
					self.assertFalse(jnp.isinf(lowerCamelCase__ ).any() )




			def 							lowerCAmelCase__    (		self  :     Optional[int] )   ->Dict:



					'''simple docstring'''







					_UpperCAmelCase		:       Dict								=      4
					_UpperCAmelCase		:       int								=      10
					_UpperCAmelCase		:       str								=      15
					_UpperCAmelCase		:       int								=      2
					_UpperCAmelCase		:       str								=      1
					_UpperCAmelCase		:       str								=      15

					# dummy input_ids and scores
					_UpperCAmelCase		:       Optional[int]								=      ids_tensor((batch_size, sequence_length)	,  lowerCamelCase__ )
					_UpperCAmelCase		:       List[str]								=      input_ids.copy()

					_UpperCAmelCase		:       List[Any]								=      self._get_uniform_logits(lowerCamelCase__	,  lowerCamelCase__ )
					_UpperCAmelCase		:       List[Any]								=      scores.copy()

					# instantiate all dist processors
					_UpperCAmelCase		:       int								=      FlaxTemperatureLogitsWarper(temperature=0.5 )
					_UpperCAmelCase		:       Optional[Any]								=      FlaxTopKLogitsWarper(3 )
					_UpperCAmelCase		:       Dict								=      FlaxTopPLogitsWarper(0.8 )

					# instantiate all logits processors
					_UpperCAmelCase		:       Any								=      FlaxMinLengthLogitsProcessor(min_length=10	,  eos_token_id=lowerCamelCase__ )
					_UpperCAmelCase		:       Optional[Any]								=      FlaxForcedBOSTokenLogitsProcessor(bos_token_id=lowerCamelCase__ )
					_UpperCAmelCase		:       Dict								=      FlaxForcedEOSTokenLogitsProcessor(max_length=lowerCamelCase__	,  eos_token_id=lowerCamelCase__ )

					_UpperCAmelCase		:       List[Any]								=      10

					# no processor list
					_UpperCAmelCase		:       Tuple								=      temp_dist_warp(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
					_UpperCAmelCase		:       Dict								=      top_k_warp(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
					_UpperCAmelCase		:       str								=      top_p_warp(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
					_UpperCAmelCase		:       Union[str, Any]								=      min_dist_proc(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
					_UpperCAmelCase		:       List[str]								=      bos_dist_proc(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
					_UpperCAmelCase		:       int								=      eos_dist_proc(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )

					# with processor list
					_UpperCAmelCase		:       Any								=      FlaxLogitsProcessorList(
					    [temp_dist_warp, top_k_warp, top_p_warp, min_dist_proc, bos_dist_proc, eos_dist_proc] )
					_UpperCAmelCase		:       Dict								=      processor(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )

					# scores should be equal
					self.assertTrue(jnp.allclose(lowerCamelCase__	,  lowerCamelCase__	,  atol=1E-3 ) )

					# input_ids should never be changed
					self.assertListEqual(input_ids.tolist()	,  input_ids_comp.tolist() )






			def 							lowerCAmelCase__    (		self  :     Any )   ->List[str]:



					'''simple docstring'''







					_UpperCAmelCase		:       int								=      4
					_UpperCAmelCase		:       Tuple								=      10
					_UpperCAmelCase		:       Optional[int]								=      15
					_UpperCAmelCase		:       Tuple								=      2
					_UpperCAmelCase		:       List[Any]								=      1
					_UpperCAmelCase		:       Dict								=      15

					# dummy input_ids and scores
					_UpperCAmelCase		:       List[str]								=      ids_tensor((batch_size, sequence_length)	,  lowerCamelCase__ )
					_UpperCAmelCase		:       List[Any]								=      input_ids.copy()

					_UpperCAmelCase		:       Optional[Any]								=      self._get_uniform_logits(lowerCamelCase__	,  lowerCamelCase__ )
					_UpperCAmelCase		:       int								=      scores.copy()

					# instantiate all dist processors
					_UpperCAmelCase		:       Union[str, Any]								=      FlaxTemperatureLogitsWarper(temperature=0.5 )
					_UpperCAmelCase		:       Any								=      FlaxTopKLogitsWarper(3 )
					_UpperCAmelCase		:       List[Any]								=      FlaxTopPLogitsWarper(0.8 )

					# instantiate all logits processors
					_UpperCAmelCase		:       Dict								=      FlaxMinLengthLogitsProcessor(min_length=10	,  eos_token_id=lowerCamelCase__ )
					_UpperCAmelCase		:       Dict								=      FlaxForcedBOSTokenLogitsProcessor(bos_token_id=lowerCamelCase__ )
					_UpperCAmelCase		:       Optional[int]								=      FlaxForcedEOSTokenLogitsProcessor(max_length=lowerCamelCase__	,  eos_token_id=lowerCamelCase__ )

					_UpperCAmelCase		:       Union[str, Any]								=      10

					# no processor list
					def run_no_processor_list(lowerCamelCase__  :     Any	,  lowerCamelCase__  :     int	,  lowerCamelCase__  :     int ):
							_UpperCAmelCase		:       Optional[Any]								=      temp_dist_warp(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
							_UpperCAmelCase		:       str								=      top_k_warp(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
							_UpperCAmelCase		:       Optional[int]								=      top_p_warp(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
							_UpperCAmelCase		:       List[Any]								=      min_dist_proc(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
							_UpperCAmelCase		:       Any								=      bos_dist_proc(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
							_UpperCAmelCase		:       Tuple								=      eos_dist_proc(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
							return scores

					# with processor list
					def run_processor_list(lowerCamelCase__  :     Dict	,  lowerCamelCase__  :     Any	,  lowerCamelCase__  :     Dict ):
							_UpperCAmelCase		:       int								=      FlaxLogitsProcessorList(
							    [temp_dist_warp, top_k_warp, top_p_warp, min_dist_proc, bos_dist_proc, eos_dist_proc] )
							_UpperCAmelCase		:       Optional[int]								=      processor(lowerCamelCase__	,  lowerCamelCase__	,  cur_len=lowerCamelCase__ )
							return scores

					_UpperCAmelCase		:       Tuple								=      jax.jit(lowerCamelCase__ )
					_UpperCAmelCase		:       str								=      jax.jit(lowerCamelCase__ )

					_UpperCAmelCase		:       List[str]								=      jitted_run_no_processor_list(lowerCamelCase__	,  lowerCamelCase__	,  lowerCamelCase__ )
					_UpperCAmelCase		:       Dict								=      jitted_run_processor_list(lowerCamelCase__	,  lowerCamelCase__	,  lowerCamelCase__ )

					# scores should be equal
					self.assertTrue(jnp.allclose(lowerCamelCase__	,  lowerCamelCase__	,  atol=1E-3 ) )

					# input_ids should never be changed
					self.assertListEqual(input_ids.tolist()	,  input_ids_comp.tolist() )







'''simple docstring'''


import os
import re
import shutil
import sys
import tempfile
import unittest

import black


lowerCamelCase__    	=     os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
sys.path.append(os.path.join(git_repo_path, 'utils'))

import check_copies  # noqa: E402


# This is the reference code that will be used in the tests.
# If DDPMSchedulerOutput is changed in scheduling_ddpm.py, this code needs to be manually updated.
lowerCamelCase__    	=     '    \"""\n    Output class for the scheduler\'s step function output.\n\n    Args:\n        prev_sample (`torch.FloatTensor` of shape `(batch_size, num_channels, height, width)` for images):\n            Computed sample (x_{t-1}) of previous timestep. `prev_sample` should be used as next model input in the\n            denoising loop.\n        pred_original_sample (`torch.FloatTensor` of shape `(batch_size, num_channels, height, width)` for images):\n            The predicted denoised sample (x_{0}) based on the model output from the current timestep.\n            `pred_original_sample` can be used to preview progress or for guidance.\n    \"""\n\n    prev_sample: torch.FloatTensor\n    pred_original_sample: Optional[torch.FloatTensor] = None\n'






class 	lowerCAmelCase__			(			unittest.TestCase	):




			def 							lowerCAmelCase__    (		self  :     Any )   ->Any:



					'''simple docstring'''







					_UpperCAmelCase		:       Optional[int]								=      tempfile.mkdtemp()
					os.makedirs(os.path.join(self.diffusers_dir	,  "schedulers/" ) )
					_UpperCAmelCase		:       Optional[Any]								=      self.diffusers_dir
					shutil.copy(
					    os.path.join(lowerCamelCase__	,  "src/diffusers/schedulers/scheduling_ddpm.py" )	,  os.path.join(self.diffusers_dir	,  "schedulers/scheduling_ddpm.py" )	,  )




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



					'''simple docstring'''







					_UpperCAmelCase		:       int								=      "src/diffusers"
					shutil.rmtree(self.diffusers_dir )




			def 							lowerCAmelCase__    (		self  :     str	,  lowerCamelCase__  :     List[str]	,  lowerCamelCase__  :     Optional[Any]	,  lowerCamelCase__  :     Union[str, Any]	,  lowerCamelCase__  :     Any=None )   ->List[str]:



					'''simple docstring'''







					_UpperCAmelCase		:       Union[str, Any]								=      comment + F"""\nclass {class_name}(nn.Module):\n""" + class_code
					if overwrite_result is not None:
							_UpperCAmelCase		:       Tuple								=      comment + F"""\nclass {class_name}(nn.Module):\n""" + overwrite_result
					_UpperCAmelCase		:       Optional[Any]								=      black.Mode(target_versions={black.TargetVersion.PYaa}	,  line_length=1_19 )
					_UpperCAmelCase		:       Tuple								=      black.format_str(lowerCamelCase__	,  mode=lowerCamelCase__ )
					_UpperCAmelCase		:       Optional[int]								=      os.path.join(self.diffusers_dir	,  "new_code.py" )
					with open(lowerCamelCase__	,  "w"	,  newline="\n" ) as f:
							f.write(lowerCamelCase__ )
					if overwrite_result is None:
							self.assertTrue(len(check_copies.is_copy_consistent(lowerCamelCase__ ) ) == 0 )
					else:
							check_copies.is_copy_consistent(f.name	,  overwrite=lowerCamelCase__ )
							with open(lowerCamelCase__	,  "r" ) as f:
									self.assertTrue(f.read()	,  lowerCamelCase__ )




			def 							lowerCAmelCase__    (		self  :     str )   ->Tuple:



					'''simple docstring'''







					_UpperCAmelCase		:       Tuple								=      check_copies.find_code_in_diffusers("schedulers.scheduling_ddpm.DDPMSchedulerOutput" )
					self.assertEqual(lowerCamelCase__	,  lowerCamelCase__ )






			def 							lowerCAmelCase__    (		self  :     Union[str, Any] )   ->Optional[int]:



					'''simple docstring'''







					self.check_copy_consistency(
					    "# Copied from diffusers.schedulers.scheduling_ddpm.DDPMSchedulerOutput"	,  "DDPMSchedulerOutput"	,  REFERENCE_CODE + "\n"	,  )

					# With no empty line at the end
					self.check_copy_consistency(
					    "# Copied from diffusers.schedulers.scheduling_ddpm.DDPMSchedulerOutput"	,  "DDPMSchedulerOutput"	,  lowerCamelCase__	,  )

					# Copy consistency with rename
					self.check_copy_consistency(
					    "# Copied from diffusers.schedulers.scheduling_ddpm.DDPMSchedulerOutput with DDPM->Test"	,  "TestSchedulerOutput"	,  re.sub("DDPM"	,  "Test"	,  lowerCamelCase__ )	,  )

					# Copy consistency with a really long name
					_UpperCAmelCase		:       int								=      "TestClassWithAReallyLongNameBecauseSomePeopleLikeThatForSomeReason"
					self.check_copy_consistency(
					    F"""# Copied from diffusers.schedulers.scheduling_ddpm.DDPMSchedulerOutput with DDPM->{long_class_name}"""	,  F"""{long_class_name}SchedulerOutput"""	,  re.sub("Bert"	,  lowerCamelCase__	,  lowerCamelCase__ )	,  )

					# Copy consistency with overwrite
					self.check_copy_consistency(
					    "# Copied from diffusers.schedulers.scheduling_ddpm.DDPMSchedulerOutput with DDPM->Test"	,  "TestSchedulerOutput"	,  lowerCamelCase__	,  overwrite_result=re.sub("DDPM"	,  "Test"	,  lowerCamelCase__ )	,  )



