'''simple docstring'''




import argparse
import glob
import logging
import os
import sys
import time
from collections import defaultdict
from pathlib import Path
from typing import Dict, List, Tuple

import numpy as np
import pytorch_lightning as pl
import torch
from callbacks import SeqaSeqLoggingCallback, get_checkpoint_callback, get_early_stopping_callback
from torch import nn
from torch.utils.data import DataLoader

from transformers import MBartTokenizer, TaForConditionalGeneration
from transformers.models.bart.modeling_bart import shift_tokens_right
from utils import (
    ROUGE_KEYS,
    LegacySeqaSeqDataset,
    SeqaSeqDataset,
    assert_all_frozen,
    calculate_bleu,
    calculate_rouge,
    check_output_dir,
    flatten_list,
    freeze_embeds,
    freeze_params,
    get_git_info,
    label_smoothed_nll_loss,
    lmap,
    pickle_save,
    save_git_info,
    save_json,
    use_task_specific_params,
)


# need the parent dir module
sys.path.insert(2, str(Path(__file__).resolve().parents[1]))
from lightning_base import BaseTransformer, add_generic_args, generic_train  # noqa


_lowercase						: Optional[Any]						=						logging.getLogger(__name__)





class     __magic_name__						(    _UpperCAmelCase):
			UpperCamelCase__				=       '''summarization'''
			UpperCamelCase__				=       ['''loss''']
			UpperCamelCase__				=       ROUGE_KEYS
			UpperCamelCase__				=       '''rouge2'''







			def __init__(	self				:  int				,			lowercase_				:  Tuple				,			**lowercase_				:  Tuple    ):
										if hparams.sortish_sampler and hparams.gpus > 1:
																	lowercase_					:			Tuple										=       False
										elif hparams.max_tokens_per_batch is not None:
																	if hparams.gpus > 1:
																								raise NotImplementedError("""Dynamic Batch size does not work for multi-gpu training"""    )
																	if hparams.sortish_sampler:
																								raise ValueError("""--sortish_sampler and --max_tokens_per_batch may not be used simultaneously"""    )

										super().__init__(lowercase_				,			num_labels=lowercase_				,			mode=self.mode				,			**lowercase_    )
										use_task_specific_params(self.model				,			"""summarization"""    )
										save_git_info(self.hparams.output_dir    )
										lowercase_					:			Optional[int]										=       Path(self.output_dir    ) / """metrics.json"""
										lowercase_					:			Any										=       Path(self.output_dir    ) / """hparams.pkl"""
										pickle_save(self.hparams				,			self.hparams_save_path    )
										lowercase_					:			List[Any]										=       0
										lowercase_					:			str										=       defaultdict(lowercase_    )
										lowercase_					:			List[Any]										=       self.config.model_type
										lowercase_					:			Optional[int]										=       self.config.tgt_vocab_size if self.model_type == """fsmt""" else self.config.vocab_size

										lowercase_					:			dict										=       {
										    "data_dir": self.hparams.data_dir,
										    "max_source_length": self.hparams.max_source_length,
										    "prefix": self.model.config.prefix or "",
										}
										lowercase_					:			Tuple										=       {
										    """train""": self.hparams.n_train,
										    """val""": self.hparams.n_val,
										    """test""": self.hparams.n_test,
										}
										lowercase_					:			Dict										=       {k: v if v >= 0 else None for k, v in n_observations_per_split.items()}

										lowercase_					:			Union[str, Any]										=       {
										    """train""": self.hparams.max_target_length,
										    """val""": self.hparams.val_max_target_length,
										    """test""": self.hparams.test_max_target_length,
										}
										assert self.target_lens["train"] <= self.target_lens["val"], f'''target_lens: {self.target_lens}'''
										assert self.target_lens["train"] <= self.target_lens["test"], f'''target_lens: {self.target_lens}'''
										if self.hparams.freeze_embeds:
																	freeze_embeds(self.model    )
										if self.hparams.freeze_encoder:
																	freeze_params(self.model.get_encoder()    )
																	assert_all_frozen(self.model.get_encoder()    )

										lowercase_					:			List[Any]										=       get_git_info()["""repo_sha"""]
										lowercase_					:			List[Any]										=       hparams.num_workers
										lowercase_					:			List[Any]										=       None  # default to config
										if self.model.config.decoder_start_token_id is None and isinstance(self.tokenizer				,			lowercase_    ):
																	lowercase_					:			Optional[Any]										=       self.tokenizer.lang_code_to_id[hparams.tgt_lang]
																	lowercase_					:			int										=       self.decoder_start_token_id
										lowercase_					:			int										=       (
										    SeqaSeqDataset if hasattr(self.tokenizer				,			"""prepare_seq2seq_batch"""    ) else LegacySeqaSeqDataset
										)
										lowercase_					:			Any										=       False
										lowercase_					:			Union[str, Any]										=       self.model.config.num_beams if self.hparams.eval_beams is None else self.hparams.eval_beams
										if self.hparams.eval_max_gen_length is not None:
																	lowercase_					:			Dict										=       self.hparams.eval_max_gen_length
										else:
																	lowercase_					:			str										=       self.model.config.max_length
										lowercase_					:			List[Any]										=       self.default_val_metric if self.hparams.val_metric is None else self.hparams.val_metric







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Dict				,			lowercase_				:  Dict[str, torch.Tensor]    ):
										lowercase_					:			Any										=       {
										    k: self.tokenizer.batch_decode(v.tolist()    ) if """mask""" not in k else v.shape for k, v in batch.items()
										}
										save_json(lowercase_				,			Path(self.output_dir    ) / """text_batch.json"""    )
										save_json({k: v.tolist() for k, v in batch.items()}				,			Path(self.output_dir    ) / """tok_batch.json"""    )

										lowercase_					:			Tuple										=       True
										return readable_batch







			def 	SCREAMING_SNAKE_CASE_     (	self				:  int				,			lowercase_				:  Tuple				,			**lowercase_				:  Optional[int]    ):
										return self.model(lowercase_				,			**lowercase_    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Optional[int]				,			lowercase_				:  List[int]    ):
										lowercase_					:			int										=       self.tokenizer.batch_decode(
										    lowercase_				,			skip_special_tokens=lowercase_				,			clean_up_tokenization_spaces=lowercase_    )
										return lmap(str.strip				,			lowercase_    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  List[str]				,			lowercase_				:  dict    ):
										lowercase_					:			Union[str, Any]										=       self.tokenizer.pad_token_id
										lowercase_						,						lowercase_					:			Optional[Any]										=       batch["""input_ids"""], batch["""attention_mask"""]
										lowercase_					:			List[str]										=       batch["""labels"""]
										if isinstance(self.model				,			lowercase_    ):
																	lowercase_					:			List[Any]										=       self.model._shift_right(lowercase_    )
										else:
																	lowercase_					:			List[Any]										=       shift_tokens_right(lowercase_				,			lowercase_    )
										if not self.already_saved_batch:  # This would be slightly better if it only happened on rank zero
																	lowercase_					:			Dict										=       decoder_input_ids
																	self.save_readable_batch(lowercase_    )

										lowercase_					:			List[Any]										=       self(lowercase_				,			attention_mask=lowercase_				,			decoder_input_ids=lowercase_				,			use_cache=lowercase_    )
										lowercase_					:			int										=       outputs["""logits"""]
										if self.hparams.label_smoothing == 0:
																	# Same behavior as modeling_bart.py, besides ignoring pad_token_id
																	lowercase_					:			Optional[int]										=       nn.CrossEntropyLoss(ignore_index=lowercase_    )

																	assert lm_logits.shape[-1] == self.vocab_size
																	lowercase_					:			Tuple										=       ce_loss_fct(lm_logits.view(-1				,			lm_logits.shape[-1]    )				,			tgt_ids.view(-1    )    )
										else:
																	lowercase_					:			Dict										=       nn.functional.log_softmax(lowercase_				,			dim=-1    )
																	lowercase_						,						lowercase_					:			Optional[int]										=       label_smoothed_nll_loss(
																	    lowercase_				,			lowercase_				,			self.hparams.label_smoothing				,			ignore_index=lowercase_    )
										return (loss,)







			@property
			def 	SCREAMING_SNAKE_CASE_     (	self				:  Any    ):
										return self.tokenizer.pad_token_id







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Optional[int]				,			lowercase_				:  Dict				,			lowercase_				:  List[Any]    ):
										lowercase_					:			List[Any]										=       self._step(lowercase_    )

										lowercase_					:			int										=       dict(zip(self.loss_names				,			lowercase_    )    )
										# tokens per batch
										lowercase_					:			Optional[int]										=       batch["""input_ids"""].ne(self.pad    ).sum() + batch["""labels"""].ne(self.pad    ).sum()
										lowercase_					:			str										=       batch["""input_ids"""].shape[0]
										lowercase_					:			Tuple										=       batch["""input_ids"""].eq(self.pad    ).sum()
										lowercase_					:			int										=       batch["""input_ids"""].eq(self.pad    ).float().mean()
										# TODO(SS): make a wandb summary metric for this
										return {"loss": loss_tensors[0], "log": logs}







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Union[str, Any]				,			lowercase_				:  str				,			lowercase_				:  Tuple    ):
										return self._generative_step(lowercase_    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Union[str, Any]				,			lowercase_				:  Dict				,			lowercase_				:  int="val"    ):
										self.step_count += 1
										lowercase_					:			List[str]										=       {k: torch.stack([x[k] for x in outputs]    ).mean() for k in self.loss_names}
										lowercase_					:			List[Any]										=       losses["""loss"""]
										lowercase_					:			List[Any]										=       {
										    k: np.array([x[k] for x in outputs]    ).mean() for k in self.metric_names + ["""gen_time""", """gen_len"""]
										}
										lowercase_					:			Union[str, Any]										=       (
										    generative_metrics[self.val_metric] if self.val_metric in generative_metrics else losses[self.val_metric]
										)
										lowercase_					:			torch.FloatTensor										=       torch.tensor(lowercase_    ).type_as(lowercase_    )
										generative_metrics.update({k: v.item() for k, v in losses.items()}    )
										losses.update(lowercase_    )
										lowercase_					:			int										=       {f'''{prefix}_avg_{k}''': x for k, x in losses.items()}
										lowercase_					:			int										=       self.step_count
										self.metrics[prefix].append(lowercase_    )  # callback writes this to self.metrics_save_path
										lowercase_					:			Optional[Any]										=       flatten_list([x["""preds"""] for x in outputs]    )
										return {
										    "log": all_metrics,
										    "preds": preds,
										    f'''{prefix}_loss''': loss,
										    f'''{prefix}_{self.val_metric}''': metric_tensor,
										}







			def 	SCREAMING_SNAKE_CASE_     (	self				:  List[str]				,			lowercase_				:  List[str]				,			lowercase_				:  Optional[int]    ):
										return calculate_rouge(lowercase_				,			lowercase_    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Optional[int]				,			lowercase_				:  dict    ):
										lowercase_					:			Tuple										=       time.time()

										# parser.add_argument('--eval_max_gen_length', type=int, default=None, help='never generate more than n tokens')
										lowercase_					:			Dict										=       self.model.generate(
										    batch["""input_ids"""]				,			attention_mask=batch["""attention_mask"""]				,			use_cache=lowercase_				,			decoder_start_token_id=self.decoder_start_token_id				,			num_beams=self.eval_beams				,			max_length=self.eval_max_length				,			)
										lowercase_					:			str										=       (time.time() - ta) / batch["""input_ids"""].shape[0]
										lowercase_					:			List[str]										=       self.ids_to_clean_text(lowercase_    )
										lowercase_					:			List[str]										=       self.ids_to_clean_text(batch["""labels"""]    )
										lowercase_					:			str										=       self._step(lowercase_    )
										lowercase_					:			Optional[Any]										=       dict(zip(self.loss_names				,			lowercase_    )    )
										lowercase_					:			Dict										=       self.calc_generative_metrics(lowercase_				,			lowercase_    )
										lowercase_					:			List[str]										=       np.mean(lmap(lowercase_				,			lowercase_    )    )
										base_metrics.update(gen_time=lowercase_				,			gen_len=lowercase_				,			preds=lowercase_				,			target=lowercase_				,			**lowercase_    )
										return base_metrics







			def 	SCREAMING_SNAKE_CASE_     (	self				:  List[Any]				,			lowercase_				:  Dict				,			lowercase_				:  List[Any]    ):
										return self._generative_step(lowercase_    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Optional[Any]				,			lowercase_				:  List[str]    ):
										return self.validation_epoch_end(lowercase_				,			prefix="""test"""    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Tuple				,			lowercase_				:  Dict    ):
										lowercase_					:			Optional[Any]										=       self.n_obs[type_path]
										lowercase_					:			Union[str, Any]										=       self.target_lens[type_path]
										lowercase_					:			Union[str, Any]										=       self.dataset_class(
										    self.tokenizer				,			type_path=lowercase_				,			n_obs=lowercase_				,			max_target_length=lowercase_				,			**self.dataset_kwargs				,			)
										return dataset







			def 	SCREAMING_SNAKE_CASE_     (	self				:  int				,			lowercase_				:  str				,			lowercase_				:  int				,			lowercase_				:  bool = False    ):
										lowercase_					:			Optional[Any]										=       self.get_dataset(lowercase_    )

										if self.hparams.sortish_sampler and type_path != "test" and type_path != "val":
																	lowercase_					:			Tuple										=       dataset.make_sortish_sampler(lowercase_				,			distributed=self.hparams.gpus > 1    )
																	return DataLoader(
																	    lowercase_				,			batch_size=lowercase_				,			collate_fn=dataset.collate_fn				,			shuffle=lowercase_				,			num_workers=self.num_workers				,			sampler=lowercase_				,			)

										elif self.hparams.max_tokens_per_batch is not None and type_path != "test" and type_path != "val":
																	lowercase_					:			Any										=       dataset.make_dynamic_sampler(
																	    self.hparams.max_tokens_per_batch				,			distributed=self.hparams.gpus > 1    )
																	return DataLoader(
																	    lowercase_				,			batch_sampler=lowercase_				,			collate_fn=dataset.collate_fn				,			num_workers=self.num_workers				,			)
										else:
																	return DataLoader(
																	    lowercase_				,			batch_size=lowercase_				,			collate_fn=dataset.collate_fn				,			shuffle=lowercase_				,			num_workers=self.num_workers				,			sampler=lowercase_				,			)







			def 	SCREAMING_SNAKE_CASE_     (	self				:  str    ):
										lowercase_					:			List[Any]										=       self.get_dataloader("""train"""				,			batch_size=self.hparams.train_batch_size				,			shuffle=lowercase_    )
										return dataloader







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Optional[Any]    ):
										return self.get_dataloader("""val"""				,			batch_size=self.hparams.eval_batch_size    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Optional[int]    ):
										return self.get_dataloader("""test"""				,			batch_size=self.hparams.eval_batch_size    )







			@staticmethod
			def 	SCREAMING_SNAKE_CASE_     (	lowercase_				:  Any				,			lowercase_				:  Any    ):
										BaseTransformer.add_model_specific_args(lowercase_				,			lowercase_    )
										add_generic_args(lowercase_				,			lowercase_    )
										parser.add_argument(
										    """--max_source_length"""				,			default=1024				,			type=lowercase_				,			help=(
										        """The maximum total input sequence length after tokenization. Sequences longer """
										        """than this will be truncated, sequences shorter will be padded."""
										    )				,			)
										parser.add_argument(
										    """--max_target_length"""				,			default=56				,			type=lowercase_				,			help=(
										        """The maximum total input sequence length after tokenization. Sequences longer """
										        """than this will be truncated, sequences shorter will be padded."""
										    )				,			)
										parser.add_argument(
										    """--val_max_target_length"""				,			default=142				,			type=lowercase_				,			help=(
										        """The maximum total input sequence length after tokenization. Sequences longer """
										        """than this will be truncated, sequences shorter will be padded."""
										    )				,			)
										parser.add_argument(
										    """--test_max_target_length"""				,			default=142				,			type=lowercase_				,			help=(
										        """The maximum total input sequence length after tokenization. Sequences longer """
										        """than this will be truncated, sequences shorter will be padded."""
										    )				,			)
										parser.add_argument("""--freeze_encoder"""				,			action="""store_true"""    )
										parser.add_argument("""--freeze_embeds"""				,			action="""store_true"""    )
										parser.add_argument("""--sortish_sampler"""				,			action="""store_true"""				,			default=lowercase_    )
										parser.add_argument("""--overwrite_output_dir"""				,			action="""store_true"""				,			default=lowercase_    )
										parser.add_argument("""--max_tokens_per_batch"""				,			type=lowercase_				,			default=lowercase_    )
										parser.add_argument("""--logger_name"""				,			type=lowercase_				,			choices=["""default""", """wandb""", """wandb_shared"""]				,			default="""default"""    )
										parser.add_argument("""--n_train"""				,			type=lowercase_				,			default=-1				,			required=lowercase_				,			help="""# examples. -1 means use all."""    )
										parser.add_argument("""--n_val"""				,			type=lowercase_				,			default=500				,			required=lowercase_				,			help="""# examples. -1 means use all."""    )
										parser.add_argument("""--n_test"""				,			type=lowercase_				,			default=-1				,			required=lowercase_				,			help="""# examples. -1 means use all."""    )
										parser.add_argument(
										    """--task"""				,			type=lowercase_				,			default="""summarization"""				,			required=lowercase_				,			help="""# examples. -1 means use all."""    )
										parser.add_argument("""--label_smoothing"""				,			type=lowercase_				,			default=0.0				,			required=lowercase_    )
										parser.add_argument("""--src_lang"""				,			type=lowercase_				,			default=""""""				,			required=lowercase_    )
										parser.add_argument("""--tgt_lang"""				,			type=lowercase_				,			default=""""""				,			required=lowercase_    )
										parser.add_argument("""--eval_beams"""				,			type=lowercase_				,			default=lowercase_				,			required=lowercase_    )
										parser.add_argument(
										    """--val_metric"""				,			type=lowercase_				,			default=lowercase_				,			required=lowercase_				,			choices=["""bleu""", """rouge2""", """loss""", None]    )
										parser.add_argument("""--eval_max_gen_length"""				,			type=lowercase_				,			default=lowercase_				,			help="""never generate more than n tokens"""    )
										parser.add_argument("""--save_top_k"""				,			type=lowercase_				,			default=1				,			required=lowercase_				,			help="""How many checkpoints to save"""    )
										parser.add_argument(
										    """--early_stopping_patience"""				,			type=lowercase_				,			default=-1				,			required=lowercase_				,			help=(
										        """-1 means never early stop. early_stopping_patience is measured in validation checks, not epochs. So"""
										        """ val_check_interval will effect it."""
										    )				,			)
										return parser





class     __magic_name__						(    _UpperCAmelCase):
			UpperCamelCase__				=       '''translation'''
			UpperCamelCase__				=       ['''loss''']
			UpperCamelCase__				=       ['''bleu''']
			UpperCamelCase__				=       '''bleu'''







			def __init__(	self				:  List[str]				,			lowercase_				:  str				,			**lowercase_				:  int    ):
										super().__init__(lowercase_				,			**lowercase_    )
										lowercase_					:			Union[str, Any]										=       hparams.src_lang
										lowercase_					:			List[Any]										=       hparams.tgt_lang







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Dict				,			lowercase_				:  List[Any]				,			lowercase_				:  int    ):
										return calculate_bleu(lowercase_				,			lowercase_    )




def 							lowerCamelCase	(      UpperCAmelCase__       :					List[Any]      ,      UpperCAmelCase__       :					Union[str, Any]=None )			->      SummarizationModule:
							Path(args.output_dir ).mkdir(exist_ok=UpperCAmelCase__ )
							check_output_dir(UpperCAmelCase__      ,      expected_items=3 )

							if model is None:
														if "summarization" in args.task:
																					lowercase_					:			SummarizationModule										=       SummarizationModule(UpperCAmelCase__ )
														else:
																					lowercase_					:			SummarizationModule										=       TranslationModule(UpperCAmelCase__ )
							lowercase_					:			int										=       Path(args.data_dir ).name
							if (
							    args.logger_name == "default"
							    or args.fast_dev_run
							    or str(args.output_dir ).startswith("""/tmp""" )
							    or str(args.output_dir ).startswith("""/var""" )
							):
														lowercase_					:			Dict										=       True  # don't pollute wandb logs unnecessarily
							elif args.logger_name == "wandb":
														from pytorch_lightning.loggers import WandbLogger

														lowercase_					:			Dict										=       os.environ.get("""WANDB_PROJECT"""      ,      UpperCAmelCase__ )
														lowercase_					:			Tuple										=       WandbLogger(name=model.output_dir.name      ,      project=UpperCAmelCase__ )

							elif args.logger_name == "wandb_shared":
														from pytorch_lightning.loggers import WandbLogger

														lowercase_					:			List[Any]										=       WandbLogger(name=model.output_dir.name      ,      project=F'''hf_{dataset}''' )

							if args.early_stopping_patience >= 0:
														lowercase_					:			Tuple										=       get_early_stopping_callback(model.val_metric      ,      args.early_stopping_patience )
							else:
														lowercase_					:			int										=       False

							lowercase_					:			Any										=       args.val_metric == """loss"""
							lowercase_					:			pl.Trainer										=       generic_train(
							    UpperCAmelCase__      ,      UpperCAmelCase__      ,      logging_callback=SeqaSeqLoggingCallback()      ,      checkpoint_callback=get_checkpoint_callback(
							        args.output_dir      ,      model.val_metric      ,      args.save_top_k      ,      UpperCAmelCase__ )      ,      early_stopping_callback=UpperCAmelCase__      ,      logger=UpperCAmelCase__      ,      )
							pickle_save(model.hparams      ,      model.output_dir / """hparams.pkl""" )
							if not args.do_predict:
														return model

							lowercase_					:			Optional[int]										=       """"""
							lowercase_					:			int										=       sorted(glob.glob(os.path.join(args.output_dir      ,      """*.ckpt""" )      ,      recursive=UpperCAmelCase__ ) )
							if checkpoints:
														lowercase_					:			Optional[Any]										=       checkpoints[-1]
														lowercase_					:			int										=       checkpoints[-1]
							trainer.logger.log_hyperparams(model.hparams )

							# test() without a model tests using the best checkpoint automatically
							trainer.test()
							return model


if __name__ == "__main__":
						_lowercase						: Tuple						=						argparse.ArgumentParser()
						_lowercase						: str						=						pl.Trainer.add_argparse_args(parser)
						_lowercase						: Tuple						=						SummarizationModule.add_model_specific_args(parser, os.getcwd())

						_lowercase						: Optional[int]						=						parser.parse_args()

						main(args)






'''simple docstring'''




import unittest

from transformers import load_tool
from transformers.utils import is_torch_available


if is_torch_available():
						import torch

from transformers.testing_utils import require_torch

from .test_tools_common import ToolTesterMixin





@require_torch
class     __magic_name__						(    unittest.TestCase,     _UpperCAmelCase):







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Optional[Any]    ):
										lowercase_					:			List[str]										=       load_tool("""text-to-speech"""    )
										self.tool.setup()







			def 	SCREAMING_SNAKE_CASE_     (	self				:  List[Any]    ):
										# SpeechT5 isn't deterministic
										torch.manual_seed(0    )
										lowercase_					:			List[str]										=       self.tool("""hey"""    )
										lowercase_					:			Optional[int]										=       result.to_raw()
										self.assertTrue(
										    torch.allclose(
										        resulting_tensor[:3]				,			torch.tensor([-0.0_00_59_66_66_88_32_11_58_29, -0.0_00_36_57_64_01_90_79_50_64, -0.00_01_34_39_50_27_99_88_34_85]    )				,			)    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  List[Any]    ):
										# SpeechT5 isn't deterministic
										torch.manual_seed(0    )
										lowercase_					:			Union[str, Any]										=       self.tool("""hey"""    )
										lowercase_					:			int										=       result.to_raw()
										self.assertTrue(
										    torch.allclose(
										        resulting_tensor[:3]				,			torch.tensor([-0.0_00_59_66_66_88_32_11_58_29, -0.0_00_36_57_64_01_90_79_50_64, -0.00_01_34_39_50_27_99_88_34_85]    )				,			)    )





