






import shutil
import tempfile
import unittest
from unittest.mock import patch

from transformers import (
    DefaultFlowCallback,
    IntervalStrategy,
    PrinterCallback,
    ProgressCallback,
    Trainer,
    TrainerCallback,
    TrainingArguments,
    is_torch_available,
)
from transformers.testing_utils import require_torch


if is_torch_available():
	from transformers.trainer import DEFAULT_CALLBACKS

	from .test_trainer import RegressionDataset, RegressionModelConfig, RegressionPreTrainedModel


class      lowercase__     (			_UpperCAmelCase	):

	def __init__(							self       )->					Tuple:







							'''simple docstring'''





							lowerCAmelCase__       =						[]

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    **__UpperCAmelCase       )->					Any:







							'''simple docstring'''





							self.events.append("on_init_end"       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    **__UpperCAmelCase       )->					int:







							'''simple docstring'''





							self.events.append("on_train_begin"       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    **__UpperCAmelCase       )->					Any:







							'''simple docstring'''





							self.events.append("on_train_end"       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    **__UpperCAmelCase       )->					Any:







							'''simple docstring'''





							self.events.append("on_epoch_begin"       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    **__UpperCAmelCase       )->					str:







							'''simple docstring'''





							self.events.append("on_epoch_end"       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    **__UpperCAmelCase       )->					Union[str, Any]:







							'''simple docstring'''





							self.events.append("on_step_begin"       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    **__UpperCAmelCase       )->					Optional[Any]:







							'''simple docstring'''





							self.events.append("on_step_end"       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    **__UpperCAmelCase       )->					Tuple:







							'''simple docstring'''





							self.events.append("on_evaluate"       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    **__UpperCAmelCase       )->					List[str]:







							'''simple docstring'''





							self.events.append("on_predict"       )

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







							'''simple docstring'''





							self.events.append("on_save"       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    **__UpperCAmelCase       )->					Union[str, Any]:







							'''simple docstring'''





							self.events.append("on_log"       )


	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    **__UpperCAmelCase       )->					int:







							'''simple docstring'''





							self.events.append("on_prediction_step"       )





@require_torch
class      lowercase__     (			unittest.TestCase	):

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







							'''simple docstring'''





							lowerCAmelCase__       =						tempfile.mkdtemp()

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







							'''simple docstring'''





							shutil.rmtree(self.output_dir       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase=0		,    __UpperCAmelCase=0		,    __UpperCAmelCase=64		,    __UpperCAmelCase=64		,    __UpperCAmelCase=None		,    __UpperCAmelCase=False		,    **__UpperCAmelCase       )->					Optional[int]:







							'''simple docstring'''





							lowerCAmelCase__       =						RegressionDataset(length=__UpperCAmelCase       )
							lowerCAmelCase__       =						RegressionDataset(length=__UpperCAmelCase       )
							lowerCAmelCase__       =						RegressionModelConfig(a=__UpperCAmelCase		,    b=__UpperCAmelCase       )
							lowerCAmelCase__       =						RegressionPreTrainedModel(__UpperCAmelCase       )

							lowerCAmelCase__       =						TrainingArguments(self.output_dir		,    disable_tqdm=__UpperCAmelCase		,    report_to=[]		,    **__UpperCAmelCase       )
							return Trainer(
							    __UpperCAmelCase		,    __UpperCAmelCase		,    train_dataset=__UpperCAmelCase		,    eval_dataset=__UpperCAmelCase		,    callbacks=__UpperCAmelCase		,    )

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







							'''simple docstring'''





							self.assertEqual(len(__UpperCAmelCase       )		,    len(__UpperCAmelCase       )       )

							# Order doesn't matter
							lowerCAmelCase__       =						sorted(__UpperCAmelCase		,    key=lambda __UpperCAmelCase       : cb.__name__ if isinstance(__UpperCAmelCase		,    __UpperCAmelCase       ) else cb.__class__.__name__       )
							lowerCAmelCase__       =						sorted(__UpperCAmelCase		,    key=lambda __UpperCAmelCase       : cb.__name__ if isinstance(__UpperCAmelCase		,    __UpperCAmelCase       ) else cb.__class__.__name__       )

							for cba, cba in zip(__UpperCAmelCase		,    __UpperCAmelCase       ):
													if isinstance(__UpperCAmelCase		,    __UpperCAmelCase       ) and isinstance(__UpperCAmelCase		,    __UpperCAmelCase       ):
																			self.assertEqual(__UpperCAmelCase		,    __UpperCAmelCase       )
													elif isinstance(__UpperCAmelCase		,    __UpperCAmelCase       ) and not isinstance(__UpperCAmelCase		,    __UpperCAmelCase       ):
																			self.assertEqual(__UpperCAmelCase		,    cba.__class__       )
													elif not isinstance(__UpperCAmelCase		,    __UpperCAmelCase       ) and isinstance(__UpperCAmelCase		,    __UpperCAmelCase       ):
																			self.assertEqual(cba.__class__		,    __UpperCAmelCase       )
													else:
																			self.assertEqual(__UpperCAmelCase		,    __UpperCAmelCase       )

	def 		UpperCAmelCase  (							self		,    __UpperCAmelCase       )->					Tuple:







							'''simple docstring'''





							lowerCAmelCase__       =						["on_init_end", "on_train_begin"]
							lowerCAmelCase__       =						0
							lowerCAmelCase__       =						len(trainer.get_eval_dataloader()       )
							lowerCAmelCase__       =						["on_prediction_step"] * len(trainer.get_eval_dataloader()       ) + ["on_log", "on_evaluate"]
							for _ in range(trainer.state.num_train_epochs       ):
													expected_events.append("on_epoch_begin"       )
													for _ in range(__UpperCAmelCase       ):
																			step += 1
																			expected_events += ["on_step_begin", "on_step_end"]
																			if step % trainer.args.logging_steps == 0:
																									expected_events.append("on_log"       )
																			if trainer.args.evaluation_strategy == IntervalStrategy.STEPS and step % trainer.args.eval_steps == 0:
																									expected_events += evaluation_events.copy()
																			if step % trainer.args.save_steps == 0:
																									expected_events.append("on_save"       )
													expected_events.append("on_epoch_end"       )
													if trainer.args.evaluation_strategy == IntervalStrategy.EPOCH:
																			expected_events += evaluation_events.copy()
							expected_events += ["on_log", "on_train_end"]
							return expected_events

	def 		UpperCAmelCase  (							self       )->					Any:







							'''simple docstring'''





							lowerCAmelCase__       =						self.get_trainer()
							lowerCAmelCase__       =						DEFAULT_CALLBACKS.copy() + [ProgressCallback]
							self.check_callbacks_equality(trainer.callback_handler.callbacks		,    __UpperCAmelCase       )

							# Callbacks passed at init are added to the default callbacks
							lowerCAmelCase__       =						self.get_trainer(callbacks=[MyTestTrainerCallback]       )
							expected_callbacks.append(__UpperCAmelCase       )
							self.check_callbacks_equality(trainer.callback_handler.callbacks		,    __UpperCAmelCase       )

							# TrainingArguments.disable_tqdm controls if use ProgressCallback or PrinterCallback
							lowerCAmelCase__       =						self.get_trainer(disable_tqdm=__UpperCAmelCase       )
							lowerCAmelCase__       =						DEFAULT_CALLBACKS.copy() + [PrinterCallback]
							self.check_callbacks_equality(trainer.callback_handler.callbacks		,    __UpperCAmelCase       )

	def 		UpperCAmelCase  (							self       )->					Tuple:







							'''simple docstring'''





							lowerCAmelCase__       =						DEFAULT_CALLBACKS.copy() + [ProgressCallback]
							lowerCAmelCase__       =						self.get_trainer()

							# We can add, pop, or remove by class name
							trainer.remove_callback(__UpperCAmelCase       )
							expected_callbacks.remove(__UpperCAmelCase       )
							self.check_callbacks_equality(trainer.callback_handler.callbacks		,    __UpperCAmelCase       )

							lowerCAmelCase__       =						self.get_trainer()
							lowerCAmelCase__       =						trainer.pop_callback(__UpperCAmelCase       )
							self.assertEqual(cb.__class__		,    __UpperCAmelCase       )
							self.check_callbacks_equality(trainer.callback_handler.callbacks		,    __UpperCAmelCase       )

							trainer.add_callback(__UpperCAmelCase       )
							expected_callbacks.insert(0		,    __UpperCAmelCase       )
							self.check_callbacks_equality(trainer.callback_handler.callbacks		,    __UpperCAmelCase       )

							# We can also add, pop, or remove by instance
							lowerCAmelCase__       =						self.get_trainer()
							lowerCAmelCase__       =						trainer.callback_handler.callbacks[0]
							trainer.remove_callback(__UpperCAmelCase       )
							expected_callbacks.remove(__UpperCAmelCase       )
							self.check_callbacks_equality(trainer.callback_handler.callbacks		,    __UpperCAmelCase       )

							lowerCAmelCase__       =						self.get_trainer()
							lowerCAmelCase__       =						trainer.callback_handler.callbacks[0]
							lowerCAmelCase__       =						trainer.pop_callback(__UpperCAmelCase       )
							self.assertEqual(__UpperCAmelCase		,    __UpperCAmelCase       )
							self.check_callbacks_equality(trainer.callback_handler.callbacks		,    __UpperCAmelCase       )

							trainer.add_callback(__UpperCAmelCase       )
							expected_callbacks.insert(0		,    __UpperCAmelCase       )
							self.check_callbacks_equality(trainer.callback_handler.callbacks		,    __UpperCAmelCase       )


	def 		UpperCAmelCase  (							self       )->					Tuple:







							'''simple docstring'''





							import warnings

							# XXX: for now ignore scatter_gather warnings in this test since it's not relevant to what's being tested
							warnings.simplefilter(action="ignore"		,    category=__UpperCAmelCase       )

							lowerCAmelCase__       =						self.get_trainer(callbacks=[MyTestTrainerCallback]       )
							trainer.train()
							lowerCAmelCase__       =						trainer.callback_handler.callbacks[-2].events
							self.assertEqual(__UpperCAmelCase		,    self.get_expected_events(__UpperCAmelCase       )       )

							# Independent log/save/eval
							lowerCAmelCase__       =						self.get_trainer(callbacks=[MyTestTrainerCallback]		,    logging_steps=5       )
							trainer.train()
							lowerCAmelCase__       =						trainer.callback_handler.callbacks[-2].events
							self.assertEqual(__UpperCAmelCase		,    self.get_expected_events(__UpperCAmelCase       )       )

							lowerCAmelCase__       =						self.get_trainer(callbacks=[MyTestTrainerCallback]		,    save_steps=5       )
							trainer.train()
							lowerCAmelCase__       =						trainer.callback_handler.callbacks[-2].events
							self.assertEqual(__UpperCAmelCase		,    self.get_expected_events(__UpperCAmelCase       )       )

							lowerCAmelCase__       =						self.get_trainer(callbacks=[MyTestTrainerCallback]		,    eval_steps=5		,    evaluation_strategy="steps"       )
							trainer.train()
							lowerCAmelCase__       =						trainer.callback_handler.callbacks[-2].events
							self.assertEqual(__UpperCAmelCase		,    self.get_expected_events(__UpperCAmelCase       )       )

							lowerCAmelCase__       =						self.get_trainer(callbacks=[MyTestTrainerCallback]		,    evaluation_strategy="epoch"       )
							trainer.train()
							lowerCAmelCase__       =						trainer.callback_handler.callbacks[-2].events
							self.assertEqual(__UpperCAmelCase		,    self.get_expected_events(__UpperCAmelCase       )       )

							# A bit of everything
							lowerCAmelCase__       =						self.get_trainer(
							    callbacks=[MyTestTrainerCallback]		,    logging_steps=3		,    save_steps=10		,    eval_steps=5		,    evaluation_strategy="steps"		,    )
							trainer.train()
							lowerCAmelCase__       =						trainer.callback_handler.callbacks[-2].events
							self.assertEqual(__UpperCAmelCase		,    self.get_expected_events(__UpperCAmelCase       )       )

							# warning should be emitted for duplicated callbacks
							with patch("transformers.trainer_callback.logger.warning"       ) as warn_mock:
													lowerCAmelCase__       =						self.get_trainer(
													    callbacks=[MyTestTrainerCallback, MyTestTrainerCallback]		,    )
													assert str(__UpperCAmelCase       ) in warn_mock.call_args[0][0]














import flax.linen as nn
import jax.numpy as jnp

from .attention_flax import FlaxTransformeraDModel
from .resnet_flax import FlaxDownsampleaD, FlaxResnetBlockaD, FlaxUpsampleaD


class      lowercase__     (			nn.Module	):
	a_         =42
	a_         =42
	a_         =0.0
	a_         =1
	a_         =1
	a_         =True
	a_         =False
	a_         =False
	a_         =False
	a_         =jnp.floataa

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







							'''simple docstring'''





							lowerCAmelCase__       =						[]
							lowerCAmelCase__       =						[]

							for i in range(self.num_layers       ):
													lowerCAmelCase__       =						self.in_channels if i == 0 else self.out_channels

													lowerCAmelCase__       =						FlaxResnetBlockaD(
													    in_channels=__UpperCAmelCase		,    out_channels=self.out_channels		,    dropout_prob=self.dropout		,    dtype=self.dtype		,    )
													resnets.append(__UpperCAmelCase       )

													lowerCAmelCase__       =						FlaxTransformeraDModel(
													    in_channels=self.out_channels		,    n_heads=self.num_attention_heads		,    d_head=self.out_channels // self.num_attention_heads		,    depth=1		,    use_linear_projection=self.use_linear_projection		,    only_cross_attention=self.only_cross_attention		,    use_memory_efficient_attention=self.use_memory_efficient_attention		,    dtype=self.dtype		,    )
													attentions.append(__UpperCAmelCase       )

							lowerCAmelCase__       =						resnets
							lowerCAmelCase__       =						attentions

							if self.add_downsample:
													lowerCAmelCase__       =						FlaxDownsampleaD(self.out_channels		,    dtype=self.dtype       )


	def __call__(							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase=True       )->					str:







							'''simple docstring'''





							lowerCAmelCase__       =						()

							for resnet, attn in zip(self.resnets		,    self.attentions       ):
													lowerCAmelCase__       =						resnet(__UpperCAmelCase		,    __UpperCAmelCase		,    deterministic=__UpperCAmelCase       )
													lowerCAmelCase__       =						attn(__UpperCAmelCase		,    __UpperCAmelCase		,    deterministic=__UpperCAmelCase       )
													output_states += (hidden_states,)

							if self.add_downsample:
													lowerCAmelCase__       =						self.downsamplers_a(__UpperCAmelCase       )
													output_states += (hidden_states,)

							return hidden_states, output_states





class      lowercase__     (			nn.Module	):
	a_         =42
	a_         =42
	a_         =0.0
	a_         =1
	a_         =True
	a_         =jnp.floataa

	def 		UpperCAmelCase  (							self       )->					Dict:







							'''simple docstring'''





							lowerCAmelCase__       =						[]

							for i in range(self.num_layers       ):
													lowerCAmelCase__       =						self.in_channels if i == 0 else self.out_channels

													lowerCAmelCase__       =						FlaxResnetBlockaD(
													    in_channels=__UpperCAmelCase		,    out_channels=self.out_channels		,    dropout_prob=self.dropout		,    dtype=self.dtype		,    )
													resnets.append(__UpperCAmelCase       )
							lowerCAmelCase__       =						resnets

							if self.add_downsample:
													lowerCAmelCase__       =						FlaxDownsampleaD(self.out_channels		,    dtype=self.dtype       )


	def __call__(							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase=True       )->					int:







							'''simple docstring'''





							lowerCAmelCase__       =						()

							for resnet in self.resnets:
													lowerCAmelCase__       =						resnet(__UpperCAmelCase		,    __UpperCAmelCase		,    deterministic=__UpperCAmelCase       )
													output_states += (hidden_states,)

							if self.add_downsample:
													lowerCAmelCase__       =						self.downsamplers_a(__UpperCAmelCase       )
													output_states += (hidden_states,)

							return hidden_states, output_states





class      lowercase__     (			nn.Module	):
	a_         =42
	a_         =42
	a_         =42
	a_         =0.0
	a_         =1
	a_         =1
	a_         =True
	a_         =False
	a_         =False
	a_         =False
	a_         =jnp.floataa

	def 		UpperCAmelCase  (							self       )->					int:







							'''simple docstring'''





							lowerCAmelCase__       =						[]
							lowerCAmelCase__       =						[]

							for i in range(self.num_layers       ):
													lowerCAmelCase__       =						self.in_channels if (i == self.num_layers - 1) else self.out_channels
													lowerCAmelCase__       =						self.prev_output_channel if i == 0 else self.out_channels

													lowerCAmelCase__       =						FlaxResnetBlockaD(
													    in_channels=resnet_in_channels + res_skip_channels		,    out_channels=self.out_channels		,    dropout_prob=self.dropout		,    dtype=self.dtype		,    )
													resnets.append(__UpperCAmelCase       )

													lowerCAmelCase__       =						FlaxTransformeraDModel(
													    in_channels=self.out_channels		,    n_heads=self.num_attention_heads		,    d_head=self.out_channels // self.num_attention_heads		,    depth=1		,    use_linear_projection=self.use_linear_projection		,    only_cross_attention=self.only_cross_attention		,    use_memory_efficient_attention=self.use_memory_efficient_attention		,    dtype=self.dtype		,    )
													attentions.append(__UpperCAmelCase       )

							lowerCAmelCase__       =						resnets
							lowerCAmelCase__       =						attentions

							if self.add_upsample:
													lowerCAmelCase__       =						FlaxUpsampleaD(self.out_channels		,    dtype=self.dtype       )


	def __call__(							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase=True       )->					Dict:







							'''simple docstring'''





							for resnet, attn in zip(self.resnets		,    self.attentions       ):
													# pop res hidden states
													lowerCAmelCase__       =						res_hidden_states_tuple[-1]
													lowerCAmelCase__       =						res_hidden_states_tuple[:-1]
													lowerCAmelCase__       =						jnp.concatenate((hidden_states, res_hidden_states)		,    axis=-1       )

													lowerCAmelCase__       =						resnet(__UpperCAmelCase		,    __UpperCAmelCase		,    deterministic=__UpperCAmelCase       )
													lowerCAmelCase__       =						attn(__UpperCAmelCase		,    __UpperCAmelCase		,    deterministic=__UpperCAmelCase       )

							if self.add_upsample:
													lowerCAmelCase__       =						self.upsamplers_a(__UpperCAmelCase       )

							return hidden_states





class      lowercase__     (			nn.Module	):
	a_         =42
	a_         =42
	a_         =42
	a_         =0.0
	a_         =1
	a_         =True
	a_         =jnp.floataa

	def 		UpperCAmelCase  (							self       )->					int:







							'''simple docstring'''





							lowerCAmelCase__       =						[]

							for i in range(self.num_layers       ):
													lowerCAmelCase__       =						self.in_channels if (i == self.num_layers - 1) else self.out_channels
													lowerCAmelCase__       =						self.prev_output_channel if i == 0 else self.out_channels

													lowerCAmelCase__       =						FlaxResnetBlockaD(
													    in_channels=resnet_in_channels + res_skip_channels		,    out_channels=self.out_channels		,    dropout_prob=self.dropout		,    dtype=self.dtype		,    )
													resnets.append(__UpperCAmelCase       )

							lowerCAmelCase__       =						resnets

							if self.add_upsample:
													lowerCAmelCase__       =						FlaxUpsampleaD(self.out_channels		,    dtype=self.dtype       )


	def __call__(							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase=True       )->					int:







							'''simple docstring'''





							for resnet in self.resnets:
													# pop res hidden states
													lowerCAmelCase__       =						res_hidden_states_tuple[-1]
													lowerCAmelCase__       =						res_hidden_states_tuple[:-1]
													lowerCAmelCase__       =						jnp.concatenate((hidden_states, res_hidden_states)		,    axis=-1       )

													lowerCAmelCase__       =						resnet(__UpperCAmelCase		,    __UpperCAmelCase		,    deterministic=__UpperCAmelCase       )

							if self.add_upsample:
													lowerCAmelCase__       =						self.upsamplers_a(__UpperCAmelCase       )

							return hidden_states





class      lowercase__     (			nn.Module	):
	a_         =42
	a_         =0.0
	a_         =1
	a_         =1
	a_         =False
	a_         =False
	a_         =jnp.floataa

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







							'''simple docstring'''





							lowerCAmelCase__       =						[
							    FlaxResnetBlockaD(
							        in_channels=self.in_channels		,    out_channels=self.in_channels		,    dropout_prob=self.dropout		,    dtype=self.dtype		,    )
							]

							lowerCAmelCase__       =						[]

							for _ in range(self.num_layers       ):
													lowerCAmelCase__       =						FlaxTransformeraDModel(
													    in_channels=self.in_channels		,    n_heads=self.num_attention_heads		,    d_head=self.in_channels // self.num_attention_heads		,    depth=1		,    use_linear_projection=self.use_linear_projection		,    use_memory_efficient_attention=self.use_memory_efficient_attention		,    dtype=self.dtype		,    )
													attentions.append(__UpperCAmelCase       )

													lowerCAmelCase__       =						FlaxResnetBlockaD(
													    in_channels=self.in_channels		,    out_channels=self.in_channels		,    dropout_prob=self.dropout		,    dtype=self.dtype		,    )
													resnets.append(__UpperCAmelCase       )

							lowerCAmelCase__       =						resnets
							lowerCAmelCase__       =						attentions


	def __call__(							self		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase		,    __UpperCAmelCase=True       )->					Union[str, Any]:







							'''simple docstring'''





							lowerCAmelCase__       =						self.resnets[0](__UpperCAmelCase		,    __UpperCAmelCase       )
							for attn, resnet in zip(self.attentions		,    self.resnets[1:]       ):
													lowerCAmelCase__       =						attn(__UpperCAmelCase		,    __UpperCAmelCase		,    deterministic=__UpperCAmelCase       )
													lowerCAmelCase__       =						resnet(__UpperCAmelCase		,    __UpperCAmelCase		,    deterministic=__UpperCAmelCase       )

							return hidden_states






