


"""simple docstring"""




import math
from dataclasses import dataclass
from typing import List, Optional, Tuple, Union

import numpy as np
import torch

from ..configuration_utils import ConfigMixin, register_to_config
from ..utils import BaseOutput, logging, randn_tensor
from .scheduling_utils import KarrasDiffusionSchedulers, SchedulerMixin


UpperCAmelCase__            =							logging.get_logger(__name__)  # pylint: disable=invalid-name







@dataclass
# Copied from diffusers.schedulers.scheduling_ddpm.DDPMSchedulerOutput with DDPM->EulerDiscrete
class 				lowerCamelCase__       (	_A):
     SCREAMING_SNAKE_CASE__				      =      42
     SCREAMING_SNAKE_CASE__				      =      None



def     UpperCAmelCase_ (							__snake_case					,						__snake_case=0.9_99					,						__snake_case="cosine"					,						)					->      List[Any]:







 """simple docstring"""


 if alpha_transform_type == "cosine":

  def alpha_bar_fn(__snake_case						):
   return math.cos((t + 0.0_08) / 1.0_08 * math.pi / 2						) ** 2

 elif alpha_transform_type == "exp":

  def alpha_bar_fn(__snake_case						):
   return math.exp(t * -12.0						)

 else:
  raise ValueError(F"Unsupported alpha_tranform_type: {alpha_transform_type}"						)

 _lowercase											=[]
 for i in range(A_						):
  _lowercase											=i / num_diffusion_timesteps
  _lowercase											=(i + 1) / num_diffusion_timesteps
  betas.append(min(1 - alpha_bar_fn(A_						) / alpha_bar_fn(A_						)					,						A_						)						)
 return torch.tensor(A_					,						dtype=torch.floataa						)







class 				lowerCamelCase__       (	_A       ,							_A):
     SCREAMING_SNAKE_CASE__				      =      [e.name for e in KarrasDiffusionSchedulers]
     SCREAMING_SNAKE_CASE__				      =      1





     @register_to_config
     def __init__(self		,					UpperCAmelCase = 1_0_0_0		,					UpperCAmelCase = 0.0001		,					UpperCAmelCase = 0.02		,					UpperCAmelCase = "linear"		,					UpperCAmelCase = None		,					UpperCAmelCase = "epsilon"		,					UpperCAmelCase = "linear"		,					UpperCAmelCase = False		,					UpperCAmelCase = "linspace"		,					UpperCAmelCase = 0		,					)					->       Optional[Any]:






      if trained_betas is not None:
       _lowercase											=torch.tensor(UpperCamelCase__		,					dtype=torch.floataa	)
      elif beta_schedule == "linear":
       _lowercase											=torch.linspace(UpperCamelCase__		,					UpperCamelCase__		,					UpperCamelCase__		,					dtype=torch.floataa	)
      elif beta_schedule == "scaled_linear":
       # this schedule is very specific to the latent diffusion model.
       _lowercase											=(
           torch.linspace(beta_start**0.5		,					beta_end**0.5		,					UpperCamelCase__		,					dtype=torch.floataa	) ** 2
       )
      elif beta_schedule == "squaredcos_cap_v2":
       # Glide cosine schedule
       _lowercase											=betas_for_alpha_bar(UpperCamelCase__	)
      else:
       raise NotImplementedError(f"{beta_schedule} does is not implemented for {self.__class__}"	)

      _lowercase											=1.0 - self.betas
      _lowercase											=torch.cumprod(self.alphas		,					dim=0	)

      _lowercase											=np.array(((1 - self.alphas_cumprod) / self.alphas_cumprod) ** 0.5	)
      _lowercase											=np.concatenate([sigmas[::-1], [0.0]]	).astype(np.floataa	)
      _lowercase											=torch.from_numpy(UpperCamelCase__	)

      # setable values
      _lowercase											=None
      _lowercase											=np.linspace(0		,					num_train_timesteps - 1		,					UpperCamelCase__		,					dtype=UpperCamelCase__	)[::-1].copy()
      _lowercase											=torch.from_numpy(UpperCamelCase__	)
      _lowercase											=False
      _lowercase											=use_karras_sigmas





     @property
     def 					__A (self	)					->       int:






      if self.config.timestep_spacing in ["linspace", "trailing"]:
       return self.sigmas.max()

      return (self.sigmas.max() ** 2 + 1) ** 0.5





     def 					__A (self		,					UpperCAmelCase		,					UpperCAmelCase	)					->       torch.FloatTensor:






      if isinstance(UpperCamelCase__		,					torch.Tensor	):
       _lowercase											=timestep.to(self.timesteps.device	)
      _lowercase											=(self.timesteps == timestep).nonzero().item()
      _lowercase											=self.sigmas[step_index]

      _lowercase											=sample / ((sigma**2 + 1) ** 0.5)

      _lowercase											=True
      return sample





     def 					__A (self		,					UpperCAmelCase		,					UpperCAmelCase = None	)					->       int:
      _lowercase											=num_inference_steps

      # "linspace", "leading", "trailing" corresponds to annotation of Table 2. of https://arxiv.org/abs/2305.08891
      if self.config.timestep_spacing == "linspace":
       _lowercase											=np.linspace(0		,					self.config.num_train_timesteps - 1		,					UpperCamelCase__		,					dtype=UpperCamelCase__	)[
           ::-1
       ].copy()
      elif self.config.timestep_spacing == "leading":
       _lowercase											=self.config.num_train_timesteps // self.num_inference_steps
       # creates integer timesteps by multiplying by ratio
       # casting to int to avoid issues when num_inference_step is power of 3
       _lowercase											=(np.arange(0		,					UpperCamelCase__	) * step_ratio).round()[::-1].copy().astype(UpperCamelCase__	)
       timesteps += self.config.steps_offset
      elif self.config.timestep_spacing == "trailing":
       _lowercase											=self.config.num_train_timesteps / self.num_inference_steps
       # creates integer timesteps by multiplying by ratio
       # casting to int to avoid issues when num_inference_step is power of 3
       _lowercase											=(np.arange(self.config.num_train_timesteps		,					0		,					-step_ratio	)).round().copy().astype(UpperCamelCase__	)
       timesteps -= 1
      else:
       raise ValueError(
           f"{self.config.timestep_spacing} is not supported. Please make sure to choose one of \'linspace\', \'leading\' or \'trailing\'."	)

      _lowercase											=np.array(((1 - self.alphas_cumprod) / self.alphas_cumprod) ** 0.5	)
      _lowercase											=np.log(UpperCamelCase__	)

      if self.config.interpolation_type == "linear":
       _lowercase											=np.interp(UpperCamelCase__		,					np.arange(0		,					len(UpperCamelCase__	)	)		,					UpperCamelCase__	)
      elif self.config.interpolation_type == "log_linear":
       _lowercase											=torch.linspace(np.log(sigmas[-1]	)		,					np.log(sigmas[0]	)		,					num_inference_steps + 1	).exp()
      else:
       raise ValueError(
           f"{self.config.interpolation_type} is not implemented. Please specify interpolation_type to either"
           ''' \'linear\' or \'log_linear\''''	)

      if self.use_karras_sigmas:
       _lowercase											=self._convert_to_karras(in_sigmas=UpperCamelCase__		,					num_inference_steps=self.num_inference_steps	)
       _lowercase											=np.array([self._sigma_to_t(UpperCamelCase__		,					UpperCamelCase__	) for sigma in sigmas]	)

      _lowercase											=np.concatenate([sigmas, [0.0]]	).astype(np.floataa	)
      _lowercase											=torch.from_numpy(UpperCamelCase__	).to(device=UpperCamelCase__	)
      if str(UpperCamelCase__	).startswith('''mps'''	):
       # mps does not support float64
       _lowercase											=torch.from_numpy(UpperCamelCase__	).to(UpperCamelCase__		,					dtype=torch.floataa	)
      else:
       _lowercase											=torch.from_numpy(UpperCamelCase__	).to(device=UpperCamelCase__	)





     def 					__A (self		,					UpperCAmelCase		,					UpperCAmelCase	)					->       List[str]:
      _lowercase											=np.log(UpperCamelCase__	)

      # get distribution
      _lowercase											=log_sigma - log_sigmas[:, np.newaxis]

      # get sigmas range
      _lowercase											=np.cumsum((dists >= 0)		,					axis=0	).argmax(axis=0	).clip(max=log_sigmas.shape[0] - 2	)
      _lowercase											=low_idx + 1

      _lowercase											=log_sigmas[low_idx]
      _lowercase											=log_sigmas[high_idx]

      # interpolate sigmas
      _lowercase											=(low - log_sigma) / (low - high)
      _lowercase											=np.clip(UpperCamelCase__		,					0		,					1	)

      # transform interpolation to time range
      _lowercase											=(1 - w) * low_idx + w * high_idx
      _lowercase											=t.reshape(sigma.shape	)
      return t





     def 					__A (self		,					UpperCAmelCase		,					UpperCAmelCase	)					->       torch.FloatTensor:
      _lowercase											=in_sigmas[-1].item()
      _lowercase											=in_sigmas[0].item()

      _lowercase											=7.0  # 7.0 is the value used in the paper
      _lowercase											=np.linspace(0		,					1		,					UpperCamelCase__	)
      _lowercase											=sigma_min ** (1 / rho)
      _lowercase											=sigma_max ** (1 / rho)
      _lowercase											=(max_inv_rho + ramp * (min_inv_rho - max_inv_rho)) ** rho
      return sigmas





     def 					__A (self		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase = 0.0		,					UpperCAmelCase = 0.0		,					UpperCAmelCase = float('''inf'''	)		,					UpperCAmelCase = 1.0		,					UpperCAmelCase = None		,					UpperCAmelCase = True		,					)					->       Union[EulerDiscreteSchedulerOutput, Tuple]:






      if (
          isinstance(UpperCamelCase__		,					UpperCamelCase__	)
          or isinstance(UpperCamelCase__		,					torch.IntTensor	)
          or isinstance(UpperCamelCase__		,					torch.LongTensor	)
      ):
       raise ValueError(
           (
               '''Passing integer indices (e.g. from `enumerate(timesteps)`) as timesteps to'''
               ''' `EulerDiscreteScheduler.step()` is not supported. Make sure to pass'''
               ''' one of the `scheduler.timesteps` as a timestep.'''
           )		,					)

      if not self.is_scale_input_called:
       logger.warning(
           '''The `scale_model_input` function should be called before `step` to ensure correct denoising. '''
           '''See `StableDiffusionPipeline` for a usage example.'''	)

      if isinstance(UpperCamelCase__		,					torch.Tensor	):
       _lowercase											=timestep.to(self.timesteps.device	)

      _lowercase											=(self.timesteps == timestep).nonzero().item()
      _lowercase											=self.sigmas[step_index]

      _lowercase											=min(s_churn / (len(self.sigmas	) - 1)		,					2**0.5 - 1	) if s_tmin <= sigma <= s_tmax else 0.0

      _lowercase											=randn_tensor(
          model_output.shape		,					dtype=model_output.dtype		,					device=model_output.device		,					generator=UpperCamelCase__	)

      _lowercase											=noise * s_noise
      _lowercase											=sigma * (gamma + 1)

      if gamma > 0:
       _lowercase											=sample + eps * (sigma_hat**2 - sigma**2) ** 0.5

      # 1. compute predicted original sample (x_0) from sigma-scaled predicted noise
      # NOTE: "original_sample" should not be an expected prediction_type but is left in for
      # backwards compatibility
      if self.config.prediction_type == "original_sample" or self.config.prediction_type == "sample":
       _lowercase											=model_output
      elif self.config.prediction_type == "epsilon":
       _lowercase											=sample - sigma_hat * model_output
      elif self.config.prediction_type == "v_prediction":
       # * c_out + input * c_skip
       _lowercase											=model_output * (-sigma / (sigma**2 + 1) ** 0.5) + (sample / (sigma**2 + 1))
      else:
       raise ValueError(
           f"prediction_type given as {self.config.prediction_type} must be one of `epsilon`, or `v_prediction`"	)

      # 2. Convert to an ODE derivative
      _lowercase											=(sample - pred_original_sample) / sigma_hat

      _lowercase											=self.sigmas[step_index + 1] - sigma_hat

      _lowercase											=sample + derivative * dt

      if not return_dict:
       return (prev_sample,)

      return EulerDiscreteSchedulerOutput(prev_sample=UpperCamelCase__		,					pred_original_sample=UpperCamelCase__	)





     def 					__A (self		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					)					->       torch.FloatTensor:
      _lowercase											=self.sigmas.to(device=original_samples.device		,					dtype=original_samples.dtype	)
      if original_samples.device.type == "mps" and torch.is_floating_point(UpperCamelCase__	):
       # mps does not support float64
       _lowercase											=self.timesteps.to(original_samples.device		,					dtype=torch.floataa	)
       _lowercase											=timesteps.to(original_samples.device		,					dtype=torch.floataa	)
      else:
       _lowercase											=self.timesteps.to(original_samples.device	)
       _lowercase											=timesteps.to(original_samples.device	)

      _lowercase											=[(schedule_timesteps == t).nonzero().item() for t in timesteps]

      _lowercase											=sigmas[step_indices].flatten()
      while len(sigma.shape	) < len(original_samples.shape	):
       _lowercase											=sigma.unsqueeze(-1	)

      _lowercase											=original_samples + noise * sigma
      return noisy_samples





     def __len__(self	)					->       Union[str, Any]:
      return self.config.num_train_timesteps





from __future__ import annotations

import unittest

from transformers import OpenAIGPTConfig, is_tf_available
from transformers.testing_utils import require_tf, slow

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_tf_available():
  import tensorflow as tf

  from transformers.models.openai.modeling_tf_openai import (
      TF_OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFOpenAIGPTDoubleHeadsModel,
      TFOpenAIGPTForSequenceClassification,
      TFOpenAIGPTLMHeadModel,
      TFOpenAIGPTModel,
  )







class 				lowerCamelCase__       :





     def __init__(self		,					UpperCAmelCase		,					)					->       str:
      _lowercase											=parent
      _lowercase											=1_3
      _lowercase											=7
      _lowercase											=True
      _lowercase											=True
      _lowercase											=True
      _lowercase											=True
      _lowercase											=True
      _lowercase											=9_9
      _lowercase											=3_2
      _lowercase											=2
      _lowercase											=4
      _lowercase											=3_7
      _lowercase											='''gelu'''
      _lowercase											=0.1
      _lowercase											=0.1
      _lowercase											=5_1_2
      _lowercase											=1_6
      _lowercase											=2
      _lowercase											=0.02
      _lowercase											=3
      _lowercase											=4
      _lowercase											=None
      _lowercase											=self.vocab_size - 1





     def 					__A (self	)					->       str:
      _lowercase											=ids_tensor([self.batch_size, self.seq_length]		,					self.vocab_size	)

      _lowercase											=None
      if self.use_input_mask:
       _lowercase											=random_attention_mask([self.batch_size, self.seq_length]	)

      _lowercase											=None
      if self.use_token_type_ids:
       _lowercase											=ids_tensor([self.batch_size, self.seq_length]		,					self.type_vocab_size	)

      _lowercase											=None
      if self.use_mc_token_ids:
       _lowercase											=ids_tensor([self.batch_size, self.num_choices]		,					self.seq_length	)

      _lowercase											=None
      _lowercase											=None
      _lowercase											=None
      if self.use_labels:
       _lowercase											=ids_tensor([self.batch_size]		,					self.type_sequence_label_size	)
       _lowercase											=ids_tensor([self.batch_size, self.seq_length]		,					self.num_labels	)
       _lowercase											=ids_tensor([self.batch_size]		,					self.num_choices	)

      _lowercase											=OpenAIGPTConfig(
          vocab_size=self.vocab_size		,					n_embd=self.hidden_size		,					n_layer=self.num_hidden_layers		,					n_head=self.num_attention_heads		,					n_positions=self.max_position_embeddings		,					pad_token_id=self.pad_token_id		,					)

      _lowercase											=ids_tensor([self.num_hidden_layers, self.num_attention_heads]		,					2	)

      return (
          config,
          input_ids,
          input_mask,
          head_mask,
          token_type_ids,
          mc_token_ids,
          sequence_labels,
          token_labels,
          choice_labels,
      )





     def 					__A (self		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					*UpperCAmelCase	)					->       List[Any]:
      _lowercase											=TFOpenAIGPTModel(config=UpperCAmelCase	)
      _lowercase											={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
      _lowercase											=model(UpperCAmelCase	)

      _lowercase											=[input_ids, input_mask]
      _lowercase											=model(UpperCAmelCase	)

      _lowercase											=model(UpperCAmelCase	)

      self.parent.assertEqual(result.last_hidden_state.shape		,					(self.batch_size, self.seq_length, self.hidden_size)	)





     def 					__A (self		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					*UpperCAmelCase	)					->       Optional[Any]:
      _lowercase											=TFOpenAIGPTLMHeadModel(config=UpperCAmelCase	)
      _lowercase											={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
      _lowercase											=model(UpperCAmelCase	)
      self.parent.assertEqual(result.logits.shape		,					(self.batch_size, self.seq_length, self.vocab_size)	)





     def 					__A (self		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					*UpperCAmelCase	)					->       str:
      _lowercase											=TFOpenAIGPTDoubleHeadsModel(config=UpperCAmelCase	)

      _lowercase											=tf.tile(tf.expand_dims(UpperCAmelCase		,					1	)		,					(1, self.num_choices, 1)	)
      _lowercase											=tf.tile(tf.expand_dims(UpperCAmelCase		,					1	)		,					(1, self.num_choices, 1)	)
      _lowercase											=tf.tile(tf.expand_dims(UpperCAmelCase		,					1	)		,					(1, self.num_choices, 1)	)

      _lowercase											={
          '''input_ids''': multiple_choice_inputs_ids,
          '''mc_token_ids''': mc_token_ids,
          '''attention_mask''': multiple_choice_input_mask,
          '''token_type_ids''': multiple_choice_token_type_ids,
      }
      _lowercase											=model(UpperCAmelCase	)
      self.parent.assertEqual(
          result.logits.shape		,					(self.batch_size, self.num_choices, self.seq_length, self.vocab_size)	)
      self.parent.assertEqual(result.mc_logits.shape		,					(self.batch_size, self.num_choices)	)





     def 					__A (self		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					*UpperCAmelCase	)					->       Any:
      _lowercase											=self.num_labels
      _lowercase											=ids_tensor([self.batch_size]		,					self.type_sequence_label_size	)
      _lowercase											={
          '''input_ids''': input_ids,
          '''attention_mask''': input_mask,
          '''token_type_ids''': token_type_ids,
          '''labels''': sequence_labels,
      }
      _lowercase											=TFOpenAIGPTForSequenceClassification(UpperCAmelCase	)
      _lowercase											=model(UpperCAmelCase	)
      self.parent.assertEqual(result.logits.shape		,					(self.batch_size, self.num_labels)	)





     def 					__A (self	)					->       List[str]:
      _lowercase											=self.prepare_config_and_inputs()

      (
          (
          _lowercase
      )				,   (
          _lowercase
      )				,   (
          _lowercase
      )				,   (
          _lowercase
      )				,   (
          _lowercase
      )				,   (
          _lowercase
      )				,   (
          _lowercase
      )				,   (
          _lowercase
      )				,   (
          _lowercase
      )				,   
      )											=config_and_inputs

      _lowercase											={'''input_ids''': input_ids, '''token_type_ids''': token_type_ids, '''attention_mask''': input_mask}
      return config, inputs_dict







@require_tf
class 				lowerCamelCase__       (	lowerCAmelCase       ,							lowerCAmelCase       ,							unittest.TestCase):
     SCREAMING_SNAKE_CASE__				      =      (
         (TFOpenAIGPTModel, TFOpenAIGPTLMHeadModel, TFOpenAIGPTDoubleHeadsModel, TFOpenAIGPTForSequenceClassification)
         if is_tf_available()
         else ()
     )
     SCREAMING_SNAKE_CASE__				      =      (
         (TFOpenAIGPTLMHeadModel,) if is_tf_available() else ()
     )  # TODO (PVP): Add Double HeadsModel when generate() function is changed accordingly
     SCREAMING_SNAKE_CASE__				      =      (
         {
             '''feature-extraction''': TFOpenAIGPTModel,
             '''text-classification''': TFOpenAIGPTForSequenceClassification,
             '''text-generation''': TFOpenAIGPTLMHeadModel,
             '''zero-shot''': TFOpenAIGPTForSequenceClassification,
         }
         if is_tf_available()
         else {}
     )
     SCREAMING_SNAKE_CASE__				      =      False
     SCREAMING_SNAKE_CASE__				      =      False





     def 					__A (self		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase		,					UpperCAmelCase	)					->       Optional[Any]:
      if pipeline_test_casse_name == "ZeroShotClassificationPipelineTests":
       # Get `tokenizer does not have a padding token` error for both fast/slow tokenizers.
       # `OpenAIGPTConfig` was never used in pipeline tests, either because of a missing checkpoint or because a
       # tiny config could not be created.
       return True

      return False





     def 					__A (self	)					->       List[str]:
      _lowercase											=TFOpenAIGPTModelTester(self	)
      _lowercase											=ConfigTester(self		,					config_class=UpperCAmelCase		,					n_embd=3_7	)





     def 					__A (self	)					->       Any:
      self.config_tester.run_common_tests()





     def 					__A (self	)					->       Optional[int]:
      _lowercase											=self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_openai_gpt_model(*UpperCAmelCase	)





     def 					__A (self	)					->       Union[str, Any]:
      _lowercase											=self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_openai_gpt_lm_head(*UpperCAmelCase	)





     def 					__A (self	)					->       Tuple:
      _lowercase											=self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_openai_gpt_double_head(*UpperCAmelCase	)





     def 					__A (self	)					->       Union[str, Any]:
      _lowercase											=self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_openai_gpt_for_sequence_classification(*UpperCAmelCase	)





     @slow
     def 					__A (self	)					->       Union[str, Any]:
      for model_name in TF_OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
       _lowercase											=TFOpenAIGPTModel.from_pretrained(UpperCAmelCase	)
       self.assertIsNotNone(UpperCAmelCase	)







@require_tf
class 				lowerCamelCase__       (	unittest.TestCase):





     @slow
     def 					__A (self	)					->       str:
      _lowercase											=TFOpenAIGPTLMHeadModel.from_pretrained('''openai-gpt'''	)
      _lowercase											=tf.convert_to_tensor([[4_8_1, 4_7_3_5, 5_4_4]]		,					dtype=tf.intaa	)  # the president is
      _lowercase											=[
          4_8_1,
          4_7_3_5,
          5_4_4,
          2_4_6,
          9_6_3,
          8_7_0,
          7_6_2,
          2_3_9,
          2_4_4,
          4_0_4_7_7,
          2_4_4,
          2_4_9,
          7_1_9,
          8_8_1,
          4_8_7,
          5_4_4,
          2_4_0,
          2_4_4,
          6_0_3,
          4_8_1,
      ]  # the president is a very good man. " \n " i\'m sure he is, " said the

      _lowercase											=model.generate(UpperCAmelCase		,					do_sample=UpperCAmelCase	)
      self.assertListEqual(output_ids[0].numpy().tolist()		,					UpperCAmelCase	)

