from collections import OrderedDict
from typing import Any, Mapping, Optional

from ... import PreTrainedTokenizer
from ...configuration_utils import PretrainedConfig
from ...file_utils import TensorType, is_torch_available
from ...onnx import OnnxConfig, OnnxConfigWithPast, OnnxSeqaSeqConfigWithPast
from ...onnx.utils import compute_effective_axis_dimension
from ...utils import logging


UpperCAmelCase_    		=				logging.get_logger(__name__)

UpperCAmelCase_    		=				{
    'facebook/blenderbot-3B': 'https://huggingface.co/facebook/blenderbot-3B/resolve/main/config.json',
    # See all Blenderbot models at https://huggingface.co/models?filter=blenderbot
}





class   lowerCAmelCase    (       lowerCAmelCase_      ):
     _SCREAMING_SNAKE_CASE  :  Optional[Any]		="blenderbot"
     _SCREAMING_SNAKE_CASE  :  Any		=["past_key_values"]
     _SCREAMING_SNAKE_CASE  :  str		={"num_attention_heads": "encoder_attention_heads", "hidden_size": "d_model"}



     def __init__(       self					,   lowerCAmelCase__=8008					,   lowerCAmelCase__=128					,   lowerCAmelCase__=2					,   lowerCAmelCase__=10240					,   lowerCAmelCase__=32					,   lowerCAmelCase__=24					,   lowerCAmelCase__=10240					,   lowerCAmelCase__=32					,   lowerCAmelCase__=0.0					,   lowerCAmelCase__=0.0					,   lowerCAmelCase__=True					,   lowerCAmelCase__=True					,   lowerCAmelCase__="gelu"					,   lowerCAmelCase__=2560					,   lowerCAmelCase__=0.1					,   lowerCAmelCase__=0.0					,   lowerCAmelCase__=0.0					,   lowerCAmelCase__=0.02					,   lowerCAmelCase__=1					,   lowerCAmelCase__=False					,   lowerCAmelCase__=0					,   lowerCAmelCase__=1					,   lowerCAmelCase__=2					,   lowerCAmelCase__=3					,   lowerCAmelCase__=2					,   **lowerCAmelCase__					,   ):
            _A=						vocab_size
            _A=						max_position_embeddings
            _A=						d_model
            _A=						encoder_ffn_dim
            _A=						encoder_layers
            _A=						encoder_attention_heads
            _A=						decoder_ffn_dim
            _A=						decoder_layers
            _A=						decoder_attention_heads
            _A=						dropout
            _A=						attention_dropout
            _A=						activation_dropout
            _A=						activation_function
            _A=						init_std
            _A=						encoder_layerdrop
            _A=						decoder_layerdrop
            _A=						use_cache
            _A=						encoder_layers
            _A=						scale_embedding  # scale factor will be sqrt(d_model) if True

            super().__init__(
                pad_token_id=__UpperCamelCase					,   bos_token_id=__UpperCamelCase					,   eos_token_id=__UpperCamelCase					,   is_encoder_decoder=__UpperCamelCase					,   decoder_start_token_id=__UpperCamelCase					,   encoder_no_repeat_ngram_size=__UpperCamelCase					,   forced_eos_token_id=__UpperCamelCase					,   **__UpperCamelCase					,   )





class   lowerCAmelCase    (       lowerCAmelCase_      ):



     @property
     def       a__	(       self							):
            if self.task in ["default", "seq2seq-lm"]:
                   _A=						OrderedDict(
                       [
                           ('input_ids', {0: 'batch', 1: 'encoder_sequence'}),
                           ('attention_mask', {0: 'batch', 1: 'encoder_sequence'}),
                       ]							)
                   if self.use_past:
                          _A=						{0: 'batch'}
                          _A=						{0: 'batch', 1: 'past_decoder_sequence + sequence'}
                   else:
                          _A=						{0: 'batch', 1: 'decoder_sequence'}
                          _A=						{0: 'batch', 1: 'decoder_sequence'}
                   if self.use_past:
                          self.fill_with_past_key_values_(__UpperCamelCase					,   direction='inputs'							)
            elif self.task == "causal-lm":
                   _A=						OrderedDict(
                       [
                           ('input_ids', {0: 'batch', 1: 'encoder_sequence'}),
                           ('attention_mask', {0: 'batch', 1: 'encoder_sequence'}),
                       ]							)
                   if self.use_past:
                          _A,      _A=						self.num_layers
                          for i in range(__UpperCamelCase							):
                                 _A=						{0: 'batch', 2: 'past_sequence + sequence'}
                                 _A=						{0: 'batch', 2: 'past_sequence + sequence'}
            else:
                   _A=						OrderedDict(
                       [
                           ('input_ids', {0: 'batch', 1: 'encoder_sequence'}),
                           ('attention_mask', {0: 'batch', 1: 'encoder_sequence'}),
                           ('decoder_input_ids', {0: 'batch', 1: 'decoder_sequence'}),
                           ('decoder_attention_mask', {0: 'batch', 1: 'decoder_sequence'}),
                       ]							)

            return common_inputs



     @property
     # Copied from transformers.models.bart.configuration_bart.BartOnnxConfig.outputs
     def       a__	(       self							):
            if self.task in ["default", "seq2seq-lm"]:
                   _A=						super().outputs
            else:
                   _A=						super(__UpperCamelCase					,   self							).outputs
                   if self.use_past:
                          _A,      _A=						self.num_layers
                          for i in range(__UpperCamelCase							):
                                 _A=						{0: 'batch', 2: 'past_sequence + sequence'}
                                 _A=						{0: 'batch', 2: 'past_sequence + sequence'}
            return common_outputs



     def       a__	(       self					,   lowerCAmelCase__					,   lowerCAmelCase__ = -1					,   lowerCAmelCase__ = -1					,   lowerCAmelCase__ = False					,   lowerCAmelCase__ = None					,   ):
            _A=						self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
                __UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase							)
            # Generate decoder inputs
            _A=						seq_length if not self.use_past else 1
            _A=						self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
                __UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase							)
            _A=						{f"decoder_{name}": tensor for name, tensor in decoder_inputs.items()}
            _A=						dict(**__UpperCamelCase					,   **__UpperCamelCase							)

            if self.use_past:
                   if not is_torch_available():
                          raise ValueError('Cannot generate dummy past_keys inputs without PyTorch installed.'							)
                   else:
                          import torch
                   _A,      _A=						common_inputs['input_ids'].shape
                   _A=						common_inputs['decoder_input_ids'].shape[1]
                   _A,      _A=						self.num_attention_heads
                   _A=						(
                       batch,
                       num_encoder_attention_heads,
                       encoder_seq_length,
                       self._config.hidden_size // num_encoder_attention_heads,
                   )
                   _A=						decoder_seq_length
                   _A=						(
                       batch,
                       num_decoder_attention_heads,
                       decoder_past_length,
                       self._config.hidden_size // num_decoder_attention_heads,
                   )
                   _A=						torch.cat(
                       [common_inputs['decoder_attention_mask'], torch.ones(__UpperCamelCase					,   __UpperCamelCase							)]					,   dim=1							)
                   _A=						[]
                   _A,      _A=						self.num_layers

                   for _ in range(__UpperCamelCase							):
                          common_inputs["past_key_values"].append(
                              (
                                  torch.zeros(__UpperCamelCase							),
                                  torch.zeros(__UpperCamelCase							),
                                  torch.zeros(__UpperCamelCase							),
                                  torch.zeros(__UpperCamelCase							),
                              )							)
            return common_inputs



     def       a__	(       self					,   lowerCAmelCase__					,   lowerCAmelCase__ = -1					,   lowerCAmelCase__ = -1					,   lowerCAmelCase__ = False					,   lowerCAmelCase__ = None					,   ):
            _A=						self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
                __UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase							)

            if self.use_past:
                   if not is_torch_available():
                          raise ValueError('Cannot generate dummy past_keys inputs without PyTorch installed.'							)
                   else:
                          import torch
                   _A,      _A=						common_inputs['input_ids'].shape
                   _A=						seqlen
                   _A,      _A=						self.num_layers
                   _A,      _A=						self.num_attention_heads
                   _A=						(
                       batch,
                       num_encoder_attention_heads,
                       past_key_values_length,
                       self._config.hidden_size // num_encoder_attention_heads,
                   )
                   _A=						common_inputs['attention_mask'].dtype
                   _A=						torch.cat(
                       [common_inputs['attention_mask'], torch.ones(__UpperCamelCase					,   __UpperCamelCase					,   dtype=__UpperCamelCase							)]					,   dim=1							)
                   _A=						[
                       (torch.zeros(__UpperCamelCase							), torch.zeros(__UpperCamelCase							)) for _ in range(__UpperCamelCase							)
                   ]
            return common_inputs



     def       a__	(       self					,   lowerCAmelCase__					,   lowerCAmelCase__ = -1					,   lowerCAmelCase__ = -1					,   lowerCAmelCase__ = False					,   lowerCAmelCase__ = None					,   ):
            # Copied from OnnxConfig.generate_dummy_inputs
            # Did not use super(OnnxConfigWithPast, self).generate_dummy_inputs for code clarity.
            # If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX
            _A=						compute_effective_axis_dimension(
                __UpperCamelCase					,   fixed_dimension=OnnxConfig.default_fixed_batch					,   num_token_to_add=0							)

            # If dynamic axis (-1) we forward with a fixed dimension of 8 tokens to avoid optimizations made by ONNX
            _A=						tokenizer.num_special_tokens_to_add(__UpperCamelCase							)
            _A=						compute_effective_axis_dimension(
                __UpperCamelCase					,   fixed_dimension=OnnxConfig.default_fixed_sequence					,   num_token_to_add=__UpperCamelCase							)

            # Generate dummy inputs according to compute batch and sequence
            _A=						[' '.join([tokenizer.unk_token]							) * seq_length] * batch_size
            _A=						dict(tokenizer(__UpperCamelCase					,   return_tensors=__UpperCamelCase							)							)
            return common_inputs



     def       a__	(       self					,   lowerCAmelCase__					,   lowerCAmelCase__ = -1					,   lowerCAmelCase__ = -1					,   lowerCAmelCase__ = False					,   lowerCAmelCase__ = None					,   ):
            if self.task in ["default", "seq2seq-lm"]:
                   _A=						self._generate_dummy_inputs_for_default_and_seqaseq_lm(
                       __UpperCamelCase					,   batch_size=__UpperCamelCase					,   seq_length=__UpperCamelCase					,   is_pair=__UpperCamelCase					,   framework=__UpperCamelCase							)

            elif self.task == "causal-lm":
                   _A=						self._generate_dummy_inputs_for_causal_lm(
                       __UpperCamelCase					,   batch_size=__UpperCamelCase					,   seq_length=__UpperCamelCase					,   is_pair=__UpperCamelCase					,   framework=__UpperCamelCase							)
            else:
                   _A=						self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
                       __UpperCamelCase					,   batch_size=__UpperCamelCase					,   seq_length=__UpperCamelCase					,   is_pair=__UpperCamelCase					,   framework=__UpperCamelCase							)

            return common_inputs



     def       a__	(       self					,   lowerCAmelCase__					,   lowerCAmelCase__					,   lowerCAmelCase__					,   lowerCAmelCase__							):
            if self.task in ["default", "seq2seq-lm"]:
                   _A=						super()._flatten_past_key_values_(__UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase							)
            else:
                   _A=						super(__UpperCamelCase					,   self							)._flatten_past_key_values_(
                       __UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase					,   __UpperCamelCase							)





     def       a__	(       self					,   lowerCAmelCase__					,   lowerCAmelCase__							):
            if direction not in ["inputs", "outputs"]:
                   raise ValueError(f"direction must either be \"inputs\" or \"outputs\", but {direction} was given"							)

            _A=						'past_key_values' if direction == 'inputs' else 'present'
            _A,      _A=						self.num_layers

            _A=						'past_encoder_sequence'
            _A=						'past_decoder_sequence' if direction == 'inputs' else 'past_decoder_sequence + sequence'

            for i in range(__UpperCamelCase							):
                   _A=						{0: 'batch', 2: decoder_sequence}
                   _A=						{0: 'batch', 2: decoder_sequence}
                   _A=						{0: 'batch', 2: encoder_sequence}
                   _A=						{0: 'batch', 2: encoder_sequence}




'''simple docstring'''







import csv
import dataclasses
import json
from dataclasses import dataclass
from typing import List, Optional, Union

from ...utils import is_tf_available, is_torch_available, logging


lowercase__  :	str            =      logging.get_logger(__name__)

@dataclass
class    lowerCamelCase_				:






   '''simple docstring'''

   A			:  str
   A			:  str
   A			:  Optional[str]					=						None
   A			:  Optional[str]					=						None


   def 						_UpperCamelCase							(	self			):
       return json.dumps(dataclasses.asdict(self			)  ,    indent=2			) + "\n"

@dataclass(frozen=lowerCAmelCase_	)
class    lowerCamelCase_				:






   '''simple docstring'''

   A			:  List[int]
   A			:  Optional[List[int]]					=						None
   A			:  Optional[List[int]]					=						None
   A			:  Optional[Union[int, float]]					=						None


   def 						_UpperCamelCase							(	self			):
       return json.dumps(dataclasses.asdict(self			)			) + "\n"

class    lowerCamelCase_				:






   '''simple docstring'''

   def 						_UpperCamelCase							(	self  ,    __UpperCamelCase			):
       raise NotImplementedError()


   def 						_UpperCamelCase							(	self  ,    __UpperCamelCase			):
       raise NotImplementedError()


   def 						_UpperCamelCase							(	self  ,    __UpperCamelCase			):
       raise NotImplementedError()


   def 						_UpperCamelCase							(	self  ,    __UpperCamelCase			):
       raise NotImplementedError()


   def 						_UpperCamelCase							(	self			):
       raise NotImplementedError()


   def 						_UpperCamelCase							(	self  ,    __UpperCamelCase			):
       if len(self.get_labels()			) > 1:
           UpperCamelCase__	     =      self.get_labels()[int(example.label			)]
       return example







   @classmethod
   def 						_UpperCamelCase							(	cls  ,    __UpperCamelCase  ,    __UpperCamelCase=None			):
       with open(__UpperCamelCase  ,    "r"  ,    encoding="utf-8-sig"			) as f:
           return list(csv.reader(__UpperCamelCase  ,    delimiter="\t"  ,    quotechar=__UpperCamelCase			)			)

class    lowerCamelCase_				(						lowerCAmelCase_	):






   '''simple docstring'''

   def __init__(	self  ,    __UpperCamelCase=None  ,    __UpperCamelCase=None  ,    __UpperCamelCase="classification"  ,    __UpperCamelCase=False			):
       UpperCamelCase__	     =      [] if labels is None else labels
       UpperCamelCase__	     =      [] if examples is None else examples
       UpperCamelCase__	     =      mode
       UpperCamelCase__	     =      verbose


   def __len__(	self			):
       return len(self.examples			)


   def __getitem__(	self  ,    __UpperCamelCase			):
       if isinstance(__UpperCamelCase  ,    __UpperCamelCase			):
           return SingleSentenceClassificationProcessor(labels=self.labels  ,    examples=self.examples[idx]			)
       return self.examples[idx]


   @classmethod
   def 						_UpperCamelCase							(	cls  ,    __UpperCamelCase  ,    __UpperCamelCase=""  ,    __UpperCamelCase=0  ,    __UpperCamelCase=1  ,    __UpperCamelCase=None  ,    __UpperCamelCase=False  ,    **__UpperCamelCase			):
       UpperCamelCase__	     =      cls(**__UpperCamelCase			)
       processor.add_examples_from_csv(
           __UpperCamelCase  ,    split_name=__UpperCamelCase  ,    column_label=__UpperCamelCase  ,    column_text=__UpperCamelCase  ,    column_id=__UpperCamelCase  ,    skip_first_row=__UpperCamelCase  ,    overwrite_labels=__UpperCamelCase  ,    overwrite_examples=__UpperCamelCase  ,    )
       return processor


   @classmethod
   def 						_UpperCamelCase							(	cls  ,    __UpperCamelCase  ,    __UpperCamelCase=None  ,    **__UpperCamelCase			):
       UpperCamelCase__	     =      cls(**__UpperCamelCase			)
       processor.add_examples(__UpperCamelCase  ,    labels=__UpperCamelCase			)
       return processor


   def 						_UpperCamelCase							(	self  ,    __UpperCamelCase  ,    __UpperCamelCase=""  ,    __UpperCamelCase=0  ,    __UpperCamelCase=1  ,    __UpperCamelCase=None  ,    __UpperCamelCase=False  ,    __UpperCamelCase=False  ,    __UpperCamelCase=False  ,    ):
       UpperCamelCase__	     =      self._read_tsv(__UpperCamelCase			)
       if skip_first_row:
           UpperCamelCase__	     =      lines[1:]
       UpperCamelCase__	     =      []
       UpperCamelCase__	     =      []
       UpperCamelCase__	     =      []
       for i, line in enumerate(__UpperCamelCase			):
           texts.append(line[column_text]			)
           labels.append(line[column_label]			)
           if column_id is not None:
               ids.append(line[column_id]			)
           else:
               UpperCamelCase__	     =      f'{split_name}-{i}' if split_name else str(__UpperCamelCase			)
               ids.append(__UpperCamelCase			)

       return self.add_examples(
           __UpperCamelCase  ,    __UpperCamelCase  ,    __UpperCamelCase  ,    overwrite_labels=__UpperCamelCase  ,    overwrite_examples=__UpperCamelCase			)


   def 						_UpperCamelCase							(	self  ,    __UpperCamelCase  ,    __UpperCamelCase=None  ,    __UpperCamelCase=None  ,    __UpperCamelCase=False  ,    __UpperCamelCase=False			):
       if labels is not None and len(__UpperCamelCase			) != len(__UpperCamelCase			):
           raise ValueError(
               f'Text and labels have mismatched lengths {len(__UpperCamelCase			)} and {len(__UpperCamelCase			)}'			)
       if ids is not None and len(__UpperCamelCase			) != len(__UpperCamelCase			):
           raise ValueError(f'Text and ids have mismatched lengths {len(__UpperCamelCase			)} and {len(__UpperCamelCase			)}'			)
       if ids is None:
           UpperCamelCase__	     =      [None] * len(__UpperCamelCase			)
       if labels is None:
           UpperCamelCase__	     =      [None] * len(__UpperCamelCase			)
       UpperCamelCase__	     =      []
       UpperCamelCase__	     =      set()
       for text_or_text_and_label, label, guid in zip(__UpperCamelCase  ,    __UpperCamelCase  ,    __UpperCamelCase			):
           if isinstance(__UpperCamelCase  ,    (tuple, list)			) and label is None:
               UpperCamelCase__     ,	UpperCamelCase__	     =      text_or_text_and_label
           else:
               UpperCamelCase__	     =      text_or_text_and_label
           added_labels.add(__UpperCamelCase			)
           examples.append(InputExample(guid=__UpperCamelCase  ,    text_a=__UpperCamelCase  ,    text_b=__UpperCamelCase  ,    label=__UpperCamelCase			)			)

       # Update examples
       if overwrite_examples:
           UpperCamelCase__	     =      examples
       else:
           self.examples.extend(__UpperCamelCase			)

       # Update labels
       if overwrite_labels:
           UpperCamelCase__	     =      list(__UpperCamelCase			)
       else:
           UpperCamelCase__	     =      list(set(self.labels			).union(__UpperCamelCase			)			)

       return self.examples







   def 						_UpperCamelCase							(	self  ,    __UpperCamelCase  ,    __UpperCamelCase=None  ,    __UpperCamelCase=False  ,    __UpperCamelCase=0  ,    __UpperCamelCase=True  ,    __UpperCamelCase=None  ,    ):
       if max_length is None:
           UpperCamelCase__	     =      tokenizer.max_len

       UpperCamelCase__	     =      {label: i for i, label in enumerate(self.labels			)}

       UpperCamelCase__	     =      []
       for ex_index, example in enumerate(self.examples			):
           if ex_index % 1_00_00 == 0:
               logger.info(f'Tokenizing example {ex_index}'			)

           UpperCamelCase__	     =      tokenizer.encode(
               example.text_a  ,    add_special_tokens=__UpperCamelCase  ,    max_length=min(__UpperCamelCase  ,    tokenizer.max_len			)  ,    )
           all_input_ids.append(__UpperCamelCase			)

       UpperCamelCase__	     =      max(len(__UpperCamelCase			) for input_ids in all_input_ids			)

       UpperCamelCase__	     =      []
       for ex_index, (input_ids, example) in enumerate(zip(__UpperCamelCase  ,    self.examples			)			):
           if ex_index % 1_00_00 == 0:
               logger.info(f'Writing example {ex_index}/{len(self.examples			)}'			)
           # The mask has 1 for real tokens and 0 for padding tokens. Only real
           # tokens are attended to.
           UpperCamelCase__	     =      [1 if mask_padding_with_zero else 0] * len(__UpperCamelCase			)

           # Zero-pad up to the sequence length.
           UpperCamelCase__	     =      batch_length - len(__UpperCamelCase			)
           if pad_on_left:
               UpperCamelCase__	     =      ([pad_token] * padding_length) + input_ids
               UpperCamelCase__	     =      ([0 if mask_padding_with_zero else 1] * padding_length) + attention_mask
           else:
               UpperCamelCase__	     =      input_ids + ([pad_token] * padding_length)
               UpperCamelCase__	     =      attention_mask + ([0 if mask_padding_with_zero else 1] * padding_length)

           if len(__UpperCamelCase			) != batch_length:
               raise ValueError(f'Error with input length {len(__UpperCamelCase			)} vs {batch_length}'			)
           if len(__UpperCamelCase			) != batch_length:
               raise ValueError(f'Error with input length {len(__UpperCamelCase			)} vs {batch_length}'			)

           if self.mode == "classification":
               UpperCamelCase__	     =      label_map[example.label]
           elif self.mode == "regression":
               UpperCamelCase__	     =      float(example.label			)
           else:
               raise ValueError(self.mode			)

           if ex_index < 5 and self.verbose:
               logger.info("*** Example ***"			)
               logger.info(f'guid: {example.guid}'			)
               logger.info(f'input_ids: {" ".join([str(__UpperCamelCase			) for x in input_ids]			)}'			)
               logger.info(f'attention_mask: {" ".join([str(__UpperCamelCase			) for x in attention_mask]			)}'			)
               logger.info(f'label: {example.label} (id = {label})'			)

           features.append(InputFeatures(input_ids=__UpperCamelCase  ,    attention_mask=__UpperCamelCase  ,    label=__UpperCamelCase			)			)

       if return_tensors is None:
           return features
       elif return_tensors == "tf":
           if not is_tf_available():
               raise RuntimeError("return_tensors set to 'tf' but TensorFlow 2.0 can't be imported"			)
           import tensorflow as tf

           def gen():
               for ex in features:
                   yield ({"input_ids": ex.input_ids, "attention_mask": ex.attention_mask}, ex.label)

           UpperCamelCase__	     =      tf.data.Dataset.from_generator(
               __UpperCamelCase  ,    ({"input_ids": tf.intaa, "attention_mask": tf.intaa}, tf.intaa)  ,    ({"input_ids": tf.TensorShape([None]			), "attention_mask": tf.TensorShape([None]			)}, tf.TensorShape([]			))  ,    )
           return dataset
       elif return_tensors == "pt":
           if not is_torch_available():
               raise RuntimeError("return_tensors set to 'pt' but PyTorch can't be imported"			)
           import torch
           from torch.utils.data import TensorDataset

           UpperCamelCase__	     =      torch.tensor([f.input_ids for f in features]  ,    dtype=torch.long			)
           UpperCamelCase__	     =      torch.tensor([f.attention_mask for f in features]  ,    dtype=torch.long			)
           if self.mode == "classification":
               UpperCamelCase__	     =      torch.tensor([f.label for f in features]  ,    dtype=torch.long			)
           elif self.mode == "regression":
               UpperCamelCase__	     =      torch.tensor([f.label for f in features]  ,    dtype=torch.float			)

           UpperCamelCase__	     =      TensorDataset(__UpperCamelCase  ,    __UpperCamelCase  ,    __UpperCamelCase			)
           return dataset
       else:
           raise ValueError("return_tensors should be one of 'tf' or 'pt'"			)




