
import time
from dataclasses import dataclass
from multiprocessing import Pool
from unittest import TestCase
from unittest.mock import patch

import multiprocess
import numpy as np
import pytest

from datasets.utils.py_utils import (
    NestedDataStructure,
    asdict,
    iflatmap_unordered,
    map_nested,
    temp_seed,
    temporary_assignment,
    zip_dict,
)

from .utils import require_tf, require_torch





def 			lowerCamelCase_ (				lowerCamelCase__    ):  # picklable for multiprocessing
				return x.sum()





def 			lowerCamelCase_ (				lowerCamelCase__    ):  # picklable for multiprocessing
				return i + 1




@dataclass
class     _SCREAMING_SNAKE_CASE     :
	lowerCAmelCase__         = 42
	lowerCAmelCase__         = 42




class     _SCREAMING_SNAKE_CASE     (      snake_case_						):



	def     SCREAMING_SNAKE_CASE_(    self )				->       Tuple:
					lowerCamelCase_						=			{}
					lowerCamelCase_						=			[]
					lowerCamelCase_						=			1
					lowerCamelCase_						=			[1, 2]
					lowerCamelCase_						=			{"a": 1, "b": 2}
					lowerCamelCase_						=			{"a": [1, 2], "b": [3, 4]}
					lowerCamelCase_						=			{"a": {"1": 1}, "b": 2}
					lowerCamelCase_						=			{"a": 1, "b": 2, "c": 3, "d": 4}
					lowerCamelCase_						=			{}
					lowerCamelCase_						=			[]
					lowerCamelCase_						=			2
					lowerCamelCase_						=			[2, 3]
					lowerCamelCase_						=			{"a": 2, "b": 3}
					lowerCamelCase_						=			{"a": [2, 3], "b": [4, 5]}
					lowerCamelCase_						=			{"a": {"1": 2}, "b": 3}
					lowerCamelCase_						=			{"a": 2, "b": 3, "c": 4, "d": 5}
					self.assertEqual(map_nested(lowercase						,  lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase )						,  lowercase )

					lowerCamelCase_						=			2
					self.assertEqual(map_nested(lowercase						,  lowercase						,  num_proc=lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase						,  num_proc=lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase						,  num_proc=lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase						,  num_proc=lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase						,  num_proc=lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase						,  num_proc=lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase						,  num_proc=lowercase )						,  lowercase )
					self.assertEqual(map_nested(lowercase						,  lowercase						,  num_proc=lowercase )						,  lowercase )

					lowerCamelCase_						=			{"a": np.eye(2 ), "b": np.zeros(3 ), "c": np.ones(2 )}
					lowerCamelCase_						=			{"a": 2, "b": 0, "c": 2}
					lowerCamelCase_						=			{
					    "a": np.eye(2 ).astype(lowercase ),
					    "b": np.zeros(3 ).astype(lowercase ),
					    "c": np.ones(2 ).astype(lowercase ),
					}
					self.assertEqual(map_nested(lowercase						,  lowercase						,  map_numpy=lowercase )						,  lowercase )
					self.assertEqual(
					    {k: v.tolist() for k, v in map_nested(lowercase						,  lowercase						,  map_numpy=lowercase ).items()}						,  {k: v.tolist() for k, v in expected_map_nested_sna_int.items()}						,  )
					self.assertEqual(map_nested(lowercase						,  lowercase						,  map_numpy=lowercase						,  num_proc=lowercase )						,  lowercase )
					self.assertEqual(
					    {k: v.tolist() for k, v in map_nested(lowercase						,  lowercase						,  map_numpy=lowercase						,  num_proc=lowercase ).items()}						,  {k: v.tolist() for k, v in expected_map_nested_sna_int.items()}						,  )
					with self.assertRaises(lowercase ):  # can't pickle a local lambda
									map_nested(lambda lowercase : x + 1						,  lowercase						,  num_proc=lowercase )



	def     SCREAMING_SNAKE_CASE_(    self )				->       Optional[int]:
					lowerCamelCase_						=			{"a": 1, "b": 2}
					lowerCamelCase_						=			{"a": 3, "b": 4}
					lowerCamelCase_						=			{"a": 5, "b": 6}
					lowerCamelCase_						=			sorted([("a", (1, 3, 5)), ("b", (2, 4, 6))] )
					self.assertEqual(sorted(zip_dict(lowercase						,  lowercase						,  lowercase ) )						,  lowercase )



	def     SCREAMING_SNAKE_CASE_(    self )				->       Dict:




					class     _SCREAMING_SNAKE_CASE     :
						lowerCAmelCase__         = 'bar'



					lowerCamelCase_						=			Foo()
					self.assertEqual(foo.my_attr						,  "bar" )
					with temporary_assignment(lowercase						,  "my_attr"						,  "BAR" ):
									self.assertEqual(foo.my_attr						,  "BAR" )
					self.assertEqual(foo.my_attr						,  "bar" )





@pytest.mark.parametrize(
    "iterable_length, num_proc, expected_num_proc"	, [
        (1, None, 1),
        (1, 1, 1),
        (2, None, 1),
        (2, 1, 1),
        (2, 2, 1),
        (2, 3, 1),
        (3, 2, 1),
        (1_6, 1_6, 1_6),
        (1_6, 1_7, 1_6),
        (1_7, 1_6, 1_6),
    ]	, )
def 			lowerCamelCase_ (				lowerCamelCase__	, lowerCamelCase__	, lowerCamelCase__    ):
				with patch("datasets.utils.py_utils._single_map_nested"    ) as mock_single_map_nested, patch(
				    "datasets.parallel.parallel.Pool"    ) as mock_multiprocessing_pool:
								lowerCamelCase_						=			{F'{i}': i for i in range(lowerCamelCase__    )}
								lowerCamelCase_						=			map_nested(lambda lowerCamelCase__    : x + 1_0	, lowerCamelCase__	, num_proc=lowerCamelCase__	, parallel_min_length=1_6    )
								if expected_num_proc == 1:
												assert mock_single_map_nested.called
												assert not mock_multiprocessing_pool.called
								else:
												assert not mock_single_map_nested.called
												assert mock_multiprocessing_pool.called
												assert mock_multiprocessing_pool.call_args[0][0] == expected_num_proc




class     _SCREAMING_SNAKE_CASE     (      snake_case_						):



	@require_tf
	def     SCREAMING_SNAKE_CASE_(    self )				->       Optional[Any]:
					import tensorflow as tf
					from tensorflow.keras import layers

					lowerCamelCase_						=			layers.Dense(2 )

					def gen_random_output():
									lowerCamelCase_						=			tf.random.uniform((1, 3) )
									return model(lowercase ).numpy()

					with temp_seed(42						,  set_tensorflow=lowercase ):
									lowerCamelCase_						=			gen_random_output()
					with temp_seed(42						,  set_tensorflow=lowercase ):
									lowerCamelCase_						=			gen_random_output()
					lowerCamelCase_						=			gen_random_output()

					np.testing.assert_equal(lowercase						,  lowercase )
					self.assertGreater(np.abs(outa - outa ).sum()						,  0 )



	@require_torch
	def     SCREAMING_SNAKE_CASE_(    self )				->       List[str]:
					import torch

					def gen_random_output():
									lowerCamelCase_						=			torch.nn.Linear(3						,  2 )
									lowerCamelCase_						=			torch.rand(1						,  3 )
									return model(lowercase ).detach().numpy()

					with temp_seed(42						,  set_pytorch=lowercase ):
									lowerCamelCase_						=			gen_random_output()
					with temp_seed(42						,  set_pytorch=lowercase ):
									lowerCamelCase_						=			gen_random_output()
					lowerCamelCase_						=			gen_random_output()

					np.testing.assert_equal(lowercase						,  lowercase )
					self.assertGreater(np.abs(outa - outa ).sum()						,  0 )



	def     SCREAMING_SNAKE_CASE_(    self )				->       Optional[Any]:
					def gen_random_output():
									return np.random.rand(1						,  3 )

					with temp_seed(42 ):
									lowerCamelCase_						=			gen_random_output()
					with temp_seed(42 ):
									lowerCamelCase_						=			gen_random_output()
					lowerCamelCase_						=			gen_random_output()

					np.testing.assert_equal(lowercase						,  lowercase )
					self.assertGreater(np.abs(outa - outa ).sum()						,  0 )





@pytest.mark.parametrize("input_data"	, [{}]    )
def 			lowerCamelCase_ (				lowerCamelCase__    ):
				lowerCamelCase_						=			NestedDataStructure(lowerCamelCase__    ).data
				assert output_data == input_data





@pytest.mark.parametrize(
    "data, expected_output"	, [
        ({}, []),
        ([], []),
        ("foo", ["foo"]),
        (["foo", "bar"], ["foo", "bar"]),
        ([["foo", "bar"]], ["foo", "bar"]),
        ([[["foo"], ["bar"]]], ["foo", "bar"]),
        ([[["foo"], "bar"]], ["foo", "bar"]),
        ({"a": 1, "b": 2}, [1, 2]),
        ({"a": [1, 2], "b": [3, 4]}, [1, 2, 3, 4]),
        ({"a": [[1, 2]], "b": [[3, 4]]}, [1, 2, 3, 4]),
        ({"a": [[1, 2]], "b": [3, 4]}, [1, 2, 3, 4]),
        ({"a": [[[1], [2]]], "b": [[[3], [4]]]}, [1, 2, 3, 4]),
        ({"a": [[[1], [2]]], "b": [[3, 4]]}, [1, 2, 3, 4]),
        ({"a": [[[1], [2]]], "b": [3, 4]}, [1, 2, 3, 4]),
        ({"a": [[[1], [2]]], "b": [3, [4]]}, [1, 2, 3, 4]),
        ({"a": {"1": 1}, "b": 2}, [1, 2]),
        ({"a": {"1": [1]}, "b": 2}, [1, 2]),
        ({"a": {"1": [1]}, "b": [2]}, [1, 2]),
    ]	, )
def 			lowerCamelCase_ (				lowerCamelCase__	, lowerCamelCase__    ):
				lowerCamelCase_						=			NestedDataStructure(lowerCamelCase__    ).flatten()
				assert output == expected_output





def 			lowerCamelCase_ (				):
				lowerCamelCase_						=			A(x=1	, y="foobar"    )
				lowerCamelCase_						=			{"x": 1, "y": "foobar"}
				assert asdict(lowerCamelCase__    ) == expected_output

				lowerCamelCase_						=			{"a": {"b": A(x=1_0	, y="foo"    )}, "c": [A(x=2_0	, y="bar"    )]}
				lowerCamelCase_						=			{"a": {"b": {"x": 1_0, "y": "foo"}}, "c": [{"x": 2_0, "y": "bar"}]}
				assert asdict(lowerCamelCase__    ) == expected_output

				with pytest.raises(lowerCamelCase__    ):
								asdict([1, A(x=1_0	, y="foo"    )]    )





def 			lowerCamelCase_ (				lowerCamelCase__    ):
				return text.split()





def 			lowerCamelCase_ (				lowerCamelCase__    ):
				yield (time.time(), content)
				time.sleep(2    )
				yield (time.time(), content)





def 			lowerCamelCase_ (				):
				with Pool(2    ) as pool:
								lowerCamelCase_						=			list(iflatmap_unordered(lowerCamelCase__	, _split_text	, kwargs_iterable=[{"text": "hello there"}] * 1_0    )    )
								assert out.count("hello"    ) == 1_0
								assert out.count("there"    ) == 1_0
								assert len(lowerCamelCase__    ) == 2_0

				# check multiprocess from pathos (uses dill for pickling)
				with multiprocess.Pool(2    ) as pool:
								lowerCamelCase_						=			list(iflatmap_unordered(lowerCamelCase__	, _split_text	, kwargs_iterable=[{"text": "hello there"}] * 1_0    )    )
								assert out.count("hello"    ) == 1_0
								assert out.count("there"    ) == 1_0
								assert len(lowerCamelCase__    ) == 2_0

				# check that we get items as fast as possible
				with Pool(2    ) as pool:
								lowerCamelCase_						=			[]
								for yield_time, content in iflatmap_unordered(
								    lowerCamelCase__	, _aseconds_generator_of_aitems_with_timing	, kwargs_iterable=[{"content": "a"}, {"content": "b"}]    ):
												assert yield_time < time.time() + 0.1, "we should each item directly after it was yielded"
												out.append(lowerCamelCase__    )
								assert out.count("a"    ) == 2
								assert out.count("b"    ) == 2
								assert len(lowerCamelCase__    ) == 4




import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...generation.test_utils import GenerationTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
			import torch

			from transformers import (
			    OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST,
			    OpenAIGPTConfig,
			    OpenAIGPTDoubleHeadsModel,
			    OpenAIGPTForSequenceClassification,
			    OpenAIGPTLMHeadModel,
			    OpenAIGPTModel,
			)




class     _SCREAMING_SNAKE_CASE     :



	def __init__(    self						,  lowercase						,  lowercase=13						,  lowercase=7						,  lowercase=True						,  lowercase=True						,  lowercase=True						,  lowercase=99						,  lowercase=32						,  lowercase=5						,  lowercase=4						,  lowercase=37						,  lowercase="gelu"						,  lowercase=0.1						,  lowercase=0.1						,  lowercase=512						,  lowercase=16						,  lowercase=2						,  lowercase=0.0_2						,  lowercase=3						,  lowercase=4						,  lowercase=None						,  )				->       List[str]:
					lowerCamelCase_						=			parent
					lowerCamelCase_						=			batch_size
					lowerCamelCase_						=			seq_length
					lowerCamelCase_						=			is_training
					lowerCamelCase_						=			use_token_type_ids
					lowerCamelCase_						=			use_labels
					lowerCamelCase_						=			vocab_size
					lowerCamelCase_						=			hidden_size
					lowerCamelCase_						=			num_hidden_layers
					lowerCamelCase_						=			num_attention_heads
					lowerCamelCase_						=			intermediate_size
					lowerCamelCase_						=			hidden_act
					lowerCamelCase_						=			hidden_dropout_prob
					lowerCamelCase_						=			attention_probs_dropout_prob
					lowerCamelCase_						=			max_position_embeddings
					lowerCamelCase_						=			type_vocab_size
					lowerCamelCase_						=			type_sequence_label_size
					lowerCamelCase_						=			initializer_range
					lowerCamelCase_						=			num_labels
					lowerCamelCase_						=			num_choices
					lowerCamelCase_						=			scope
					lowerCamelCase_						=			self.vocab_size - 1



	def     SCREAMING_SNAKE_CASE_(    self )				->       Any:
					lowerCamelCase_						=			ids_tensor([self.batch_size, self.seq_length]						,  self.vocab_size )

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

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

					lowerCamelCase_						=			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						,  )

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

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



	def     SCREAMING_SNAKE_CASE_(    self						,  lowercase						,  lowercase						,  lowercase						,  lowercase						,  *lowercase )				->       Dict:
					lowerCamelCase_						=			OpenAIGPTModel(config=lowercase )
					model.to(lowercase )
					model.eval()

					lowerCamelCase_						=			model(lowercase						,  token_type_ids=lowercase						,  head_mask=lowercase )
					lowerCamelCase_						=			model(lowercase						,  token_type_ids=lowercase )
					lowerCamelCase_						=			model(lowercase )

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



	def     SCREAMING_SNAKE_CASE_(    self						,  lowercase						,  lowercase						,  lowercase						,  lowercase						,  *lowercase )				->       int:
					lowerCamelCase_						=			OpenAIGPTLMHeadModel(lowercase )
					model.to(lowercase )
					model.eval()

					lowerCamelCase_						=			model(lowercase						,  token_type_ids=lowercase						,  labels=lowercase )
					self.parent.assertEqual(result.loss.shape						,  () )
					self.parent.assertEqual(result.logits.shape						,  (self.batch_size, self.seq_length, self.vocab_size) )



	def     SCREAMING_SNAKE_CASE_(    self						,  lowercase						,  lowercase						,  lowercase						,  lowercase						,  *lowercase )				->       Dict:
					lowerCamelCase_						=			OpenAIGPTDoubleHeadsModel(lowercase )
					model.to(lowercase )
					model.eval()

					lowerCamelCase_						=			model(lowercase						,  token_type_ids=lowercase						,  labels=lowercase )
					self.parent.assertEqual(result.loss.shape						,  () )
					self.parent.assertEqual(result.logits.shape						,  (self.batch_size, self.seq_length, self.vocab_size) )



	def     SCREAMING_SNAKE_CASE_(    self						,  lowercase						,  lowercase						,  lowercase						,  lowercase						,  *lowercase )				->       int:
					lowerCamelCase_						=			self.num_labels
					lowerCamelCase_						=			OpenAIGPTForSequenceClassification(lowercase )
					model.to(lowercase )
					model.eval()

					lowerCamelCase_						=			ids_tensor([self.batch_size]						,  self.type_sequence_label_size )
					lowerCamelCase_						=			model(lowercase						,  token_type_ids=lowercase						,  labels=lowercase )
					self.parent.assertEqual(result.logits.shape						,  (self.batch_size, self.num_labels) )



	def     SCREAMING_SNAKE_CASE_(    self )				->       Union[str, Any]:
					lowerCamelCase_						=			self.prepare_config_and_inputs()
					(
					    (
					    lowerCamelCase_
					)	,    (
					    lowerCamelCase_
					)	,    (
					    lowerCamelCase_
					)	,    (
					    lowerCamelCase_
					)	,    (
					    lowerCamelCase_
					)	,    (
					    lowerCamelCase_
					)	,    (
					    lowerCamelCase_
					)	,    
					)						=			config_and_inputs
					lowerCamelCase_						=			{
					    "input_ids": input_ids,
					    "token_type_ids": token_type_ids,
					    "head_mask": head_mask,
					}

					return config, inputs_dict




@require_torch
class     _SCREAMING_SNAKE_CASE     (      snake_case_			,       snake_case_			,       snake_case_			,       unittest.TestCase						):
	lowerCAmelCase__         = (
	    (OpenAIGPTModel, OpenAIGPTLMHeadModel, OpenAIGPTDoubleHeadsModel, OpenAIGPTForSequenceClassification)
	    if is_torch_available()
	    else ()
	)
	lowerCAmelCase__         = (
	    (OpenAIGPTLMHeadModel,) if is_torch_available() else ()
	)  # TODO (PVP): Add Double HeadsModel when generate() function is changed accordingly
	lowerCAmelCase__         = (
	    {
	        'feature-extraction': OpenAIGPTModel,
	        'text-classification': OpenAIGPTForSequenceClassification,
	        'text-generation': OpenAIGPTLMHeadModel,
	        'zero-shot': OpenAIGPTForSequenceClassification,
	    }
	    if is_torch_available()
	    else {}
	)



	def     SCREAMING_SNAKE_CASE_(    self						,  lowercase						,  lowercase						,  lowercase						,  lowercase						,  lowercase )				->       int:
					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     SCREAMING_SNAKE_CASE_(    self						,  lowercase						,  lowercase						,  lowercase=False )				->       Any:
					lowerCamelCase_						=			super()._prepare_for_class(lowercase						,  lowercase						,  return_labels=lowercase )

					if return_labels:
									if model_class.__name__ == "OpenAIGPTDoubleHeadsModel":
													lowerCamelCase_						=			torch.zeros(
													    (self.model_tester.batch_size, self.model_tester.num_choices, self.model_tester.seq_length)						,  dtype=torch.long						,  device=lowercase						,  )
													lowerCamelCase_						=			inputs_dict["labels"]
													lowerCamelCase_						=			inputs_dict["labels"]
													lowerCamelCase_						=			torch.zeros(
													    (self.model_tester.batch_size, self.model_tester.num_choices)						,  dtype=torch.long						,  device=lowercase						,  )
													lowerCamelCase_						=			torch.zeros(
													    self.model_tester.batch_size						,  dtype=torch.long						,  device=lowercase )
					return inputs_dict



	def     SCREAMING_SNAKE_CASE_(    self )				->       Dict:
					lowerCamelCase_						=			OpenAIGPTModelTester(self )
					lowerCamelCase_						=			ConfigTester(self						,  config_class=lowercase						,  n_embd=37 )



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



	def     SCREAMING_SNAKE_CASE_(    self )				->       Union[str, Any]:
					lowerCamelCase_						=			self.model_tester.prepare_config_and_inputs()
					self.model_tester.create_and_check_openai_gpt_model(*lowercase )



	def     SCREAMING_SNAKE_CASE_(    self )				->       str:
					lowerCamelCase_						=			self.model_tester.prepare_config_and_inputs()
					self.model_tester.create_and_check_lm_head_model(*lowercase )



	def     SCREAMING_SNAKE_CASE_(    self )				->       Tuple:
					lowerCamelCase_						=			self.model_tester.prepare_config_and_inputs()
					self.model_tester.create_and_check_double_lm_head_model(*lowercase )



	def     SCREAMING_SNAKE_CASE_(    self )				->       Optional[Any]:
					lowerCamelCase_						=			self.model_tester.prepare_config_and_inputs()
					self.model_tester.create_and_check_openai_gpt_for_sequence_classification(*lowercase )



	@slow
	def     SCREAMING_SNAKE_CASE_(    self )				->       Any:
					for model_name in OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
									lowerCamelCase_						=			OpenAIGPTModel.from_pretrained(lowercase )
									self.assertIsNotNone(lowercase )




@require_torch
class     _SCREAMING_SNAKE_CASE     (      unittest.TestCase						):



	@slow
	def     SCREAMING_SNAKE_CASE_(    self )				->       str:
					lowerCamelCase_						=			OpenAIGPTLMHeadModel.from_pretrained("openai-gpt" )
					model.to(lowercase )
					lowerCamelCase_						=			torch.tensor([[481, 4735, 544]]						,  dtype=torch.long						,  device=lowercase )  # the president is
					lowerCamelCase_						=			[
					    481,
					    4735,
					    544,
					    246,
					    963,
					    870,
					    762,
					    239,
					    244,
					    40477,
					    244,
					    249,
					    719,
					    881,
					    487,
					    544,
					    240,
					    244,
					    603,
					    481,
					]  # the president is a very good man. " \n " i\'m sure he is, " said the

					lowerCamelCase_						=			model.generate(lowercase						,  do_sample=lowercase )
					self.assertListEqual(output_ids[0].tolist()						,  lowercase )


