


'''simple docstring'''



import uuid
from typing import Any, Dict, List, Optional, Union

from ..utils import add_end_docstrings, is_tf_available, is_torch_available, logging
from .base import PIPELINE_INIT_ARGS, Pipeline


if is_tf_available():
	import tensorflow as tf

if is_torch_available():
	import torch


__lowercase	:						Union[str, Any]       =	logging.get_logger(__name__)





class 							__UpperCamelCase				:




	def __init__(   self						,				__a = None						,				__a = None						,				__a=None						,				__a=None							):

						'''simple docstring'''





						if not conversation_id:
											__a			:       Tuple					    =  uuid.uuida()
						if past_user_inputs is None:
											__a			:       Optional[Any]					    =  []
						if generated_responses is None:
											__a			:       List[str]					    =  []

						__a			:       uuid.UUID					    =  conversation_id
						__a			:       List[str]					    =  past_user_inputs
						__a			:       List[str]					    =  generated_responses
						__a			:       Optional[str]					    =  text




	def __eq__(   self						,				__a							):

						'''simple docstring'''





						if not isinstance(__a						,				__a							):
											return False
						if self.uuid == other.uuid:
											return True
						return (
						    self.new_user_input == other.new_user_input
						    and self.past_user_inputs == other.past_user_inputs
						    and self.generated_responses == other.generated_responses
						)




	def       __UpperCAmelCase							(   self						,				__a						,				__a = False							):

						'''simple docstring'''





						if self.new_user_input:
											if overwrite:
																logger.warning(
																    f"""User input added while unprocessed input was existing: \"{self.new_user_input}\" was overwritten """
																    f"""with: \"{text}\"."""							)
																__a			:       Tuple					    =  text
											else:
																logger.warning(
																    f"""User input added while unprocessed input was existing: \"{self.new_user_input}\" new input """
																    f"""ignored: \"{text}\". Set `overwrite` to True to overwrite unprocessed user input"""							)
						else:
											__a			:       Optional[Any]					    =  text




	def       __UpperCAmelCase							(   self							):

						'''simple docstring'''





						if self.new_user_input:
											self.past_user_inputs.append(self.new_user_input							)
						__a			:       List[Any]					    =  None




	def       __UpperCAmelCase							(   self						,				__a							):

						'''simple docstring'''





						self.generated_responses.append(__a							)




	def       __UpperCAmelCase							(   self							):

						'''simple docstring'''





						for user_input, generated_response in zip(self.past_user_inputs						,				self.generated_responses							):
											yield True, user_input
											yield False, generated_response
						if self.new_user_input:
											yield True, self.new_user_input





	def __repr__(   self							):

						'''simple docstring'''





						__a			:       Any					    =  f"""Conversation id: {self.uuid} \n"""
						for is_user, text in self.iter_texts():
											__a			:       Any					    =  'user' if is_user else 'bot'
											output += f"""{name} >> {text} \n"""
						return output





@add_end_docstrings(
    lowerCAmelCase_		,      r"\n        min_length_for_response (`int`, *optional*, defaults to 32):\n            The minimum length (in number of tokens) for a response.\n        minimum_tokens (`int`, *optional*, defaults to 10):\n            The minimum length of tokens to leave for a response.\n    "		,      )
class 							__UpperCamelCase				(		lowerCAmelCase_					):




	def __init__(   self						,				*__a						,				**__a							):

						'''simple docstring'''





						super().__init__(*__a						,				**__a							)
						if self.tokenizer.pad_token_id is None:
											__a			:       Any					    =  self.tokenizer.eos_token




	def       __UpperCAmelCase							(   self						,				__a=None						,				__a=None						,				__a=None						,				**__a							):

						'''simple docstring'''





						__a			:       str					    =  {}
						__a			:       List[Any]					    =  {}
						__a			:       Union[str, Any]					    =  {}

						if min_length_for_response is not None:
											__a			:       List[str]					    =  min_length_for_response
						if minimum_tokens is not None:
											__a			:       Optional[Any]					    =  minimum_tokens

						if "max_length" in generate_kwargs:
											__a			:       Union[str, Any]					    =  generate_kwargs['max_length']
											# self.max_length = generate_kwargs.get("max_length", self.model.config.max_length)
						if clean_up_tokenization_spaces is not None:
											__a			:       int					    =  clean_up_tokenization_spaces

						if generate_kwargs:
											forward_params.update(__a							)
						return preprocess_params, forward_params, postprocess_params




	def __call__(   self						,				__a						,				__a=0						,				**__a							):

						'''simple docstring'''





						__a			:       Tuple					    =  super().__call__(__a						,				num_workers=__a						,				**__a							)
						if isinstance(__a						,				__a							) and len(__a							) == 1:
											return outputs[0]
						return outputs




	def       __UpperCAmelCase							(   self						,				__a						,				__a=32							):

						'''simple docstring'''





						if not isinstance(__a						,				__a							):
											raise ValueError('ConversationalPipeline, expects Conversation as inputs'							)
						if conversation.new_user_input is None:
											raise ValueError(
											    f"""Conversation with UUID {type(conversation.uuid							)} does not contain new user input to process. """
											    'Add user inputs with the conversation\'s `add_user_input` method'							)
						if hasattr(self.tokenizer						,				'_build_conversation_input_ids'							):
											__a			:       List[Any]					    =  self.tokenizer._build_conversation_input_ids(__a							)
						else:
											# If the tokenizer cannot handle conversations, we default to only the old version
											__a			:       Any					    =  self._legacy_parse_and_tokenize(__a							)

						if self.framework == "pt":
											__a			:       List[Any]					    =  torch.LongTensor([input_ids]							)
						elif self.framework == "tf":
											__a			:       Dict					    =  tf.constant([input_ids]							)
						return {"input_ids": input_ids, "conversation": conversation}




	def       __UpperCAmelCase							(   self						,				__a						,				__a=10						,				**__a							):

						'''simple docstring'''





						__a			:       Optional[int]					    =  generate_kwargs.get('max_length'						,				self.model.config.max_length							)

						__a			:       Optional[int]					    =  model_inputs['input_ids'].shape[1]
						if max_length - minimum_tokens < n:
											logger.warning(f"""Conversation input is to long ({n}), trimming it to ({max_length} - {minimum_tokens})"""							)
											__a			:       Optional[Any]					    =  max_length - minimum_tokens
											__a			:       str					    =  model_inputs['input_ids'][:, -trim:]
											if "attention_mask" in model_inputs:
																__a			:       Tuple					    =  model_inputs['attention_mask'][:, -trim:]
						__a			:       str					    =  model_inputs.pop('conversation'							)
						__a			:       Optional[Any]					    =  max_length
						__a			:       List[str]					    =  self.model.generate(**__a						,				**__a							)
						if self.model.config.is_encoder_decoder:
											__a			:       List[Any]					    =  1
						else:
											__a			:       str					    =  n
						return {"output_ids": output_ids[:, start_position:], "conversation": conversation}




	def       __UpperCAmelCase							(   self						,				__a						,				__a=True							):

						'''simple docstring'''





						__a			:       List[Any]					    =  model_outputs['output_ids']
						__a			:       Tuple					    =  self.tokenizer.decode(
						    output_ids[0]						,				skip_special_tokens=__a						,				clean_up_tokenization_spaces=__a						,				)
						__a			:       Optional[int]					    =  model_outputs['conversation']
						conversation.mark_processed()
						conversation.append_response(__a							)
						return conversation





	def       __UpperCAmelCase							(   self						,				__a							):

						'''simple docstring'''





						__a			:       List[str]					    =  self.tokenizer.eos_token_id
						__a			:       Optional[Any]					    =  []
						for is_user, text in conversation.iter_texts():
											if eos_token_id is not None:
																input_ids.extend(self.tokenizer.encode(__a						,				add_special_tokens=__a							) + [eos_token_id]							)
											else:
																input_ids.extend(self.tokenizer.encode(__a						,				add_special_tokens=__a							)							)

						if len(__a							) > self.tokenizer.model_max_length:
											__a			:       Optional[Any]					    =  input_ids[-self.tokenizer.model_max_length :]
						return input_ids











"""simple docstring"""



import json
import pathlib
import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision, slow
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin, prepare_image_inputs


if is_torch_available():
						import torch

if is_vision_available():
						from PIL import Image

						from transformers import YolosImageProcessor





class 					_UpperCAmelCase       ( unittest.TestCase							):




					def __init__(				self     :						List[Any]    ,						A     :						Any    ,						A     :						Tuple=7    ,						A     :						Tuple=3    ,						A     :						Optional[Any]=30    ,						A     :						List[Any]=4_00    ,						A     :						Tuple=True    ,						A     :						Dict=None    ,						A     :						List[str]=True    ,						A     :						Optional[int]=[0.5, 0.5, 0.5]    ,						A     :						Tuple=[0.5, 0.5, 0.5]    ,						A     :						List[str]=True    ,						A     :						List[Any]=1 / 2_55    ,						A     :						Union[str, Any]=True    ,						)  ->  Tuple:
							# by setting size["longest_edge"] > max_resolution we're effectively not testing this :p
							lowercase_ : Optional[int]							       =   size if size is not None else {'''shortest_edge''': 18, '''longest_edge''': 13_33}
							lowercase_ : Optional[int]							       =   parent
							lowercase_ : str							       =   batch_size
							lowercase_ : Tuple							       =   num_channels
							lowercase_ : str							       =   min_resolution
							lowercase_ : Any							       =   max_resolution
							lowercase_ : str							       =   do_resize
							lowercase_ : Any							       =   size
							lowercase_ : Optional[int]							       =   do_normalize
							lowercase_ : List[str]							       =   image_mean
							lowercase_ : Optional[Any]							       =   image_std
							lowercase_ : int							       =   do_rescale
							lowercase_ : List[str]							       =   rescale_factor
							lowercase_ : int							       =   do_pad




					def   A  (				self     :						Any   )  ->  str:
							return {
							    "do_resize": self.do_resize,
							    "size": self.size,
							    "do_normalize": self.do_normalize,
							    "image_mean": self.image_mean,
							    "image_std": self.image_std,
							    "do_rescale": self.do_rescale,
							    "rescale_factor": self.rescale_factor,
							    "do_pad": self.do_pad,
							}






					def   A  (				self     :						Optional[Any]    ,						A     :						int    ,						A     :						int=False   )  ->  Tuple:
							if not batched:
									lowercase_ : Optional[int]							       =   image_inputs[0]
									if isinstance(A    ,						Image.Image   ):
											lowercase_       ,					lowercase_ : int							       =   image.size
									else:
											lowercase_       ,					lowercase_ : Tuple							       =   image.shape[1], image.shape[2]
									if w < h:
											lowercase_ : int							       =   int(self.size['''shortest_edge'''] * h / w   )
											lowercase_ : Optional[Any]							       =   self.size['''shortest_edge''']
									elif w > h:
											lowercase_ : Optional[Any]							       =   self.size['''shortest_edge''']
											lowercase_ : Optional[int]							       =   int(self.size['''shortest_edge'''] * w / h   )
									else:
											lowercase_ : Any							       =   self.size['''shortest_edge''']
											lowercase_ : Any							       =   self.size['''shortest_edge''']

							else:
									lowercase_ : Tuple							       =   []
									for image in image_inputs:
											lowercase_       ,					lowercase_ : Optional[Any]							       =   self.get_expected_values([image]   )
											expected_values.append((expected_height, expected_width)   )
									lowercase_ : Union[str, Any]							       =   max(A    ,						key=lambda A   : item[0]   )[0]
									lowercase_ : Optional[Any]							       =   max(A    ,						key=lambda A   : item[1]   )[1]

							return expected_height, expected_width





@require_torch
@require_vision
class 					_UpperCAmelCase       ( _A   ,						unittest.TestCase							):
					SCREAMING_SNAKE_CASE_		:				Optional[Any]							    =   YolosImageProcessor if is_vision_available() else None




					def   A  (				self     :						Optional[int]   )  ->  Optional[int]:
							lowercase_ : Optional[Any]							       =   YolosImageProcessingTester(self   )




					@property
					def   A  (				self     :						str   )  ->  Any:
							return self.image_processor_tester.prepare_image_processor_dict()




					def   A  (				self     :						Optional[int]   )  ->  List[str]:
							lowercase_ : Tuple							       =   self.image_processing_class(**self.image_processor_dict   )
							self.assertTrue(hasattr(A    ,						'''image_mean'''   )   )
							self.assertTrue(hasattr(A    ,						'''image_std'''   )   )
							self.assertTrue(hasattr(A    ,						'''do_normalize'''   )   )
							self.assertTrue(hasattr(A    ,						'''do_resize'''   )   )
							self.assertTrue(hasattr(A    ,						'''size'''   )   )




					def   A  (				self     :						Dict   )  ->  Tuple:
							lowercase_ : Dict							       =   self.image_processing_class.from_dict(self.image_processor_dict   )
							self.assertEqual(image_processor.size    ,						{'''shortest_edge''': 18, '''longest_edge''': 13_33}   )
							self.assertEqual(image_processor.do_pad    ,						A   )

							lowercase_ : Tuple							       =   self.image_processing_class.from_dict(
							    self.image_processor_dict    ,						size=42    ,						max_size=84    ,						pad_and_return_pixel_mask=A   )
							self.assertEqual(image_processor.size    ,						{'''shortest_edge''': 42, '''longest_edge''': 84}   )
							self.assertEqual(image_processor.do_pad    ,						A   )




					def   A  (				self     :						Optional[int]   )  ->  Tuple:
							pass




					def   A  (				self     :						Tuple   )  ->  int:
							# Initialize image_processing
							lowercase_ : Dict							       =   self.image_processing_class(**self.image_processor_dict   )
							# create random PIL images
							lowercase_ : str							       =   prepare_image_inputs(self.image_processor_tester    ,						equal_resolution=A   )
							for image in image_inputs:
									self.assertIsInstance(A    ,						Image.Image   )

							# Test not batched input
							lowercase_ : Optional[int]							       =   image_processing(image_inputs[0]    ,						return_tensors='''pt'''   ).pixel_values

							lowercase_       ,					lowercase_ : Union[str, Any]							       =   self.image_processor_tester.get_expected_values(A   )

							self.assertEqual(
							    encoded_images.shape    ,						(1, self.image_processor_tester.num_channels, expected_height, expected_width)    ,						)

							# Test batched
							lowercase_       ,					lowercase_ : Dict							       =   self.image_processor_tester.get_expected_values(A    ,						batched=A   )

							lowercase_ : str							       =   image_processing(A    ,						return_tensors='''pt'''   ).pixel_values
							self.assertEqual(
							    encoded_images.shape    ,						(
							        self.image_processor_tester.batch_size,
							        self.image_processor_tester.num_channels,
							        expected_height,
							        expected_width,
							    )    ,						)




					def   A  (				self     :						str   )  ->  Any:
							# Initialize image_processing
							lowercase_ : Any							       =   self.image_processing_class(**self.image_processor_dict   )
							# create random numpy tensors
							lowercase_ : List[Any]							       =   prepare_image_inputs(self.image_processor_tester    ,						equal_resolution=A    ,						numpify=A   )
							for image in image_inputs:
									self.assertIsInstance(A    ,						np.ndarray   )

							# Test not batched input
							lowercase_ : List[Any]							       =   image_processing(image_inputs[0]    ,						return_tensors='''pt'''   ).pixel_values

							lowercase_       ,					lowercase_ : int							       =   self.image_processor_tester.get_expected_values(A   )

							self.assertEqual(
							    encoded_images.shape    ,						(1, self.image_processor_tester.num_channels, expected_height, expected_width)    ,						)

							# Test batched
							lowercase_ : Optional[int]							       =   image_processing(A    ,						return_tensors='''pt'''   ).pixel_values

							lowercase_       ,					lowercase_ : List[Any]							       =   self.image_processor_tester.get_expected_values(A    ,						batched=A   )

							self.assertEqual(
							    encoded_images.shape    ,						(
							        self.image_processor_tester.batch_size,
							        self.image_processor_tester.num_channels,
							        expected_height,
							        expected_width,
							    )    ,						)




					def   A  (				self     :						Tuple   )  ->  Optional[int]:
							# Initialize image_processing
							lowercase_ : Dict							       =   self.image_processing_class(**self.image_processor_dict   )
							# create random PyTorch tensors
							lowercase_ : Optional[int]							       =   prepare_image_inputs(self.image_processor_tester    ,						equal_resolution=A    ,						torchify=A   )
							for image in image_inputs:
									self.assertIsInstance(A    ,						torch.Tensor   )

							# Test not batched input
							lowercase_ : List[str]							       =   image_processing(image_inputs[0]    ,						return_tensors='''pt'''   ).pixel_values

							lowercase_       ,					lowercase_ : Union[str, Any]							       =   self.image_processor_tester.get_expected_values(A   )

							self.assertEqual(
							    encoded_images.shape    ,						(1, self.image_processor_tester.num_channels, expected_height, expected_width)    ,						)

							# Test batched
							lowercase_ : Any							       =   image_processing(A    ,						return_tensors='''pt'''   ).pixel_values

							lowercase_       ,					lowercase_ : List[str]							       =   self.image_processor_tester.get_expected_values(A    ,						batched=A   )

							self.assertEqual(
							    encoded_images.shape    ,						(
							        self.image_processor_tester.batch_size,
							        self.image_processor_tester.num_channels,
							        expected_height,
							        expected_width,
							    )    ,						)




					def   A  (				self     :						Tuple   )  ->  Optional[Any]:
							# Initialize image_processings
							lowercase_ : Optional[Any]							       =   self.image_processing_class(**self.image_processor_dict   )
							lowercase_ : Tuple							       =   self.image_processing_class(do_resize=A    ,						do_normalize=A    ,						do_rescale=A   )
							# create random PyTorch tensors
							lowercase_ : Union[str, Any]							       =   prepare_image_inputs(self.image_processor_tester    ,						equal_resolution=A    ,						torchify=A   )
							for image in image_inputs:
									self.assertIsInstance(A    ,						torch.Tensor   )

							# Test whether the method "pad" and calling the image processor return the same tensors
							lowercase_ : Union[str, Any]							       =   image_processing_a.pad(A    ,						return_tensors='''pt'''   )
							lowercase_ : List[Any]							       =   image_processing_a(A    ,						return_tensors='''pt'''   )

							self.assertTrue(
							    torch.allclose(encoded_images_with_method['''pixel_values''']    ,						encoded_images['''pixel_values''']    ,						atol=1e-4   )   )




					@slow
					def   A  (				self     :						str   )  ->  List[Any]:
							# prepare image and target
							lowercase_ : Dict							       =   Image.open('''./tests/fixtures/tests_samples/COCO/000000039769.png'''   )
							with open('''./tests/fixtures/tests_samples/COCO/coco_annotations.txt'''    ,						'''r'''   ) as f:
									lowercase_ : List[Any]							       =   json.loads(f.read()   )

							lowercase_ : Tuple							       =   {'''image_id''': 3_97_69, '''annotations''': target}

							# encode them
							lowercase_ : Union[str, Any]							       =   YolosImageProcessor.from_pretrained('''hustvl/yolos-small'''   )
							lowercase_ : List[Any]							       =   image_processing(images=A    ,						annotations=A    ,						return_tensors='''pt'''   )

							# verify pixel values
							lowercase_ : Union[str, Any]							       =   torch.Size([1, 3, 8_00, 10_66]   )
							self.assertEqual(encoding['''pixel_values'''].shape    ,						A   )

							lowercase_ : Union[str, Any]							       =   torch.tensor([0.2796, 0.3138, 0.3481]   )
							self.assertTrue(torch.allclose(encoding['''pixel_values'''][0, 0, 0, :3]    ,						A    ,						atol=1e-4   )   )

							# verify area
							lowercase_ : Tuple							       =   torch.tensor([5887.9600, 11250.2061, 489353.8438, 837122.7500, 147967.5156, 165732.3438]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''area''']    ,						A   )   )
							# verify boxes
							lowercase_ : List[str]							       =   torch.Size([6, 4]   )
							self.assertEqual(encoding['''labels'''][0]['''boxes'''].shape    ,						A   )
							lowercase_ : Any							       =   torch.tensor([0.5503, 0.2765, 0.0604, 0.2215]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''boxes'''][0]    ,						A    ,						atol=1e-3   )   )
							# verify image_id
							lowercase_ : List[Any]							       =   torch.tensor([3_97_69]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''image_id''']    ,						A   )   )
							# verify is_crowd
							lowercase_ : Any							       =   torch.tensor([0, 0, 0, 0, 0, 0]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''iscrowd''']    ,						A   )   )
							# verify class_labels
							lowercase_ : Optional[Any]							       =   torch.tensor([75, 75, 63, 65, 17, 17]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''class_labels''']    ,						A   )   )
							# verify orig_size
							lowercase_ : List[str]							       =   torch.tensor([4_80, 6_40]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''orig_size''']    ,						A   )   )
							# verify size
							lowercase_ : Optional[Any]							       =   torch.tensor([8_00, 10_66]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''size''']    ,						A   )   )






					@slow
					def   A  (				self     :						List[Any]   )  ->  Dict:
							# prepare image, target and masks_path
							lowercase_ : Tuple							       =   Image.open('''./tests/fixtures/tests_samples/COCO/000000039769.png'''   )
							with open('''./tests/fixtures/tests_samples/COCO/coco_panoptic_annotations.txt'''    ,						'''r'''   ) as f:
									lowercase_ : str							       =   json.loads(f.read()   )

							lowercase_ : int							       =   {'''file_name''': '''000000039769.png''', '''image_id''': 3_97_69, '''segments_info''': target}

							lowercase_ : List[Any]							       =   pathlib.Path('''./tests/fixtures/tests_samples/COCO/coco_panoptic'''   )

							# encode them
							lowercase_ : int							       =   YolosImageProcessor(format='''coco_panoptic'''   )
							lowercase_ : Any							       =   image_processing(images=A    ,						annotations=A    ,						masks_path=A    ,						return_tensors='''pt'''   )

							# verify pixel values
							lowercase_ : Optional[Any]							       =   torch.Size([1, 3, 8_00, 10_66]   )
							self.assertEqual(encoding['''pixel_values'''].shape    ,						A   )

							lowercase_ : Tuple							       =   torch.tensor([0.2796, 0.3138, 0.3481]   )
							self.assertTrue(torch.allclose(encoding['''pixel_values'''][0, 0, 0, :3]    ,						A    ,						atol=1e-4   )   )

							# verify area
							lowercase_ : List[Any]							       =   torch.tensor([147979.6875, 165527.0469, 484638.5938, 11292.9375, 5879.6562, 7634.1147]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''area''']    ,						A   )   )
							# verify boxes
							lowercase_ : str							       =   torch.Size([6, 4]   )
							self.assertEqual(encoding['''labels'''][0]['''boxes'''].shape    ,						A   )
							lowercase_ : List[str]							       =   torch.tensor([0.2625, 0.5437, 0.4688, 0.8625]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''boxes'''][0]    ,						A    ,						atol=1e-3   )   )
							# verify image_id
							lowercase_ : List[str]							       =   torch.tensor([3_97_69]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''image_id''']    ,						A   )   )
							# verify is_crowd
							lowercase_ : List[str]							       =   torch.tensor([0, 0, 0, 0, 0, 0]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''iscrowd''']    ,						A   )   )
							# verify class_labels
							lowercase_ : Any							       =   torch.tensor([17, 17, 63, 75, 75, 93]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''class_labels''']    ,						A   )   )
							# verify masks
							lowercase_ : Dict							       =   82_28_73
							self.assertEqual(encoding['''labels'''][0]['''masks'''].sum().item()    ,						A   )
							# verify orig_size
							lowercase_ : Tuple							       =   torch.tensor([4_80, 6_40]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''orig_size''']    ,						A   )   )
							# verify size
							lowercase_ : List[str]							       =   torch.tensor([8_00, 10_66]   )
							self.assertTrue(torch.allclose(encoding['''labels'''][0]['''size''']    ,						A   )   )



