






"""simple docstring"""



import itertools
import random
import unittest

import numpy as np

from transformers import EncodecFeatureExtractor
from transformers.testing_utils import require_torch
from transformers.utils.import_utils import is_torch_available

from ...test_sequence_feature_extraction_common import SequenceFeatureExtractionTestMixin


if is_torch_available():
 import torch


a  :						Dict					       =							random.Random()




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE=1.0       ,	_SCREAMING_SNAKE_CASE=None       ,	_SCREAMING_SNAKE_CASE=None			)    ->Optional[Any]:
 if rng is None:
  UpperCAmelCase__ 						=				global_rng

 UpperCAmelCase__ 						=				[]
 for batch_idx in range(shape[0]			):
  values.append([]			)
  for _ in range(shape[1]			):
   values[-1].append(rng.random() * scale			)

 return values


@require_torch
class 	_UpperCamelCase ( unittest.TestCase							):



    '''simple docstring'''


    def __init__(      self   ,			__lowercase   ,			__lowercase=7   ,			__lowercase=400   ,			__lowercase=2000   ,			__lowercase=1   ,			__lowercase=0.0   ,			__lowercase=24000   ,			__lowercase=True   ,			):
     UpperCAmelCase__ 						=				parent
     UpperCAmelCase__ 						=				batch_size
     UpperCAmelCase__ 						=				min_seq_length
     UpperCAmelCase__ 						=				max_seq_length
     UpperCAmelCase__ 						=				(self.max_seq_length - self.min_seq_length) // (self.batch_size - 1)
     UpperCAmelCase__ 						=				feature_size
     UpperCAmelCase__ 						=				padding_value
     UpperCAmelCase__ 						=				sampling_rate
     UpperCAmelCase__ 						=				return_attention_mask


    def 		A__      (      self			):
     return {
         "feature_size": self.feature_size,
         "padding_value": self.padding_value,
         "sampling_rate": self.sampling_rate,
         "return_attention_mask": self.return_attention_mask,
     }






    def 		A__      (      self   ,			__lowercase=False   ,			__lowercase=False			):
     def _flatten(__lowercase			):
      return list(itertools.chain(*_snake_case			)			)

     if equal_length:
      UpperCAmelCase__ 						=				floats_list((self.batch_size, self.max_seq_length)			)
     else:
      # make sure that inputs increase in size
      UpperCAmelCase__ 						=				[
          _flatten(floats_list((x, self.feature_size)			)			)
          for x in range(self.min_seq_length   ,			self.max_seq_length   ,			self.seq_length_diff			)
      ]

     if numpify:
      UpperCAmelCase__ 						=				[np.asarray(_snake_case			) for x in audio_inputs]

     return audio_inputs



@require_torch
class 	_UpperCamelCase ( a_		,     unittest.TestCase							):



    '''simple docstring'''


    __lowercase    :   Optional[int]											=						EncodecFeatureExtractor


    def 		A__      (      self			):
     UpperCAmelCase__ 						=				EnCodecFeatureExtractionTester(self			)


    def 		A__      (      self			):
     # Tests that all call wrap to encode_plus and batch_encode_plus
     UpperCAmelCase__ 						=				self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()			)
     # create three inputs of length 800, 1000, and 1200
     UpperCAmelCase__ 						=				[floats_list((1, x)			)[0] for x in range(800   ,			1400   ,			200			)]
     UpperCAmelCase__ 						=				[np.asarray(_snake_case			) for audio_input in audio_inputs]

     # Test not batched input
     UpperCAmelCase__ 						=				feat_extract(audio_inputs[0]   ,			return_tensors="""np"""			).input_values
     UpperCAmelCase__ 						=				feat_extract(np_audio_inputs[0]   ,			return_tensors="""np"""			).input_values
     self.assertTrue(np.allclose(_snake_case   ,			_snake_case   ,			atol=1e-3			)			)

     # Test batched
     UpperCAmelCase__ 						=				feat_extract(_snake_case   ,			padding=_snake_case   ,			return_tensors="""np"""			).input_values
     UpperCAmelCase__ 						=				feat_extract(_snake_case   ,			padding=_snake_case   ,			return_tensors="""np"""			).input_values
     for enc_seq_a, enc_seq_a in zip(_snake_case   ,			_snake_case			):
      self.assertTrue(np.allclose(_snake_case   ,			_snake_case   ,			atol=1e-3			)			)


    def 		A__      (      self			):
     UpperCAmelCase__ 						=				self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()			)
     UpperCAmelCase__ 						=				np.random.rand(100			).astype(np.floataa			)
     UpperCAmelCase__ 						=				np_audio_inputs.tolist()

     for inputs in [py_audio_inputs, np_audio_inputs]:
      UpperCAmelCase__ 						=				feature_extractor.pad([{"""input_values""": inputs}]   ,			return_tensors="""np"""			)
      self.assertTrue(np_processed.input_values.dtype == np.floataa			)
      UpperCAmelCase__ 						=				feature_extractor.pad([{"""input_values""": inputs}]   ,			return_tensors="""pt"""			)
      self.assertTrue(pt_processed.input_values.dtype == torch.floataa			)


    def 		A__      (      self   ,			__lowercase			):
     from datasets import load_dataset

     UpperCAmelCase__ 						=				load_dataset("""hf-internal-testing/librispeech_asr_dummy"""   ,			"""clean"""   ,			split="""validation"""			)
     # automatic decoding with librispeech
     UpperCAmelCase__ 						=				ds.sort("""id"""			).select(range(_snake_case			)			)[:num_samples]['audio']

     return [x["array"] for x in audio_samples]


    def 		A__      (      self			):
     # fmt: off
     UpperCAmelCase__ 						=				torch.tensor(
         [2.3804e-03, 2.0752e-03, 1.9836e-03, 2.1057e-03, 1.6174e-03,
          3.0518e-04, 9.1553e-05, 3.3569e-04, 9.7656e-04, 1.8311e-03,
          2.0142e-03, 2.1057e-03, 1.7395e-03, 4.5776e-04, -3.9673e-04,
          4.5776e-04, 1.0071e-03, 9.1553e-05, 4.8828e-04, 1.1597e-03,
          7.3242e-04, 9.4604e-04, 1.8005e-03, 1.8311e-03, 8.8501e-04,
          4.2725e-04, 4.8828e-04, 7.3242e-04, 1.0986e-03, 2.1057e-03]			)
     # fmt: on
     UpperCAmelCase__ 						=				self._load_datasamples(1			)
     UpperCAmelCase__ 						=				EncodecFeatureExtractor()
     UpperCAmelCase__ 						=				feature_extractor(_snake_case   ,			return_tensors="""pt"""			).input_values
     self.assertEquals(input_values.shape   ,			(1, 1, 93680)			)
     self.assertTrue(torch.allclose(input_values[0, 0, :30]   ,			_snake_case   ,			atol=1e-6			)			)


    def 		A__      (      self			):
     # fmt: off
     UpperCAmelCase__ 						=				torch.tensor(
         [2.3804e-03, 2.0752e-03, 1.9836e-03, 2.1057e-03, 1.6174e-03,
          3.0518e-04, 9.1553e-05, 3.3569e-04, 9.7656e-04, 1.8311e-03,
          2.0142e-03, 2.1057e-03, 1.7395e-03, 4.5776e-04, -3.9673e-04,
          4.5776e-04, 1.0071e-03, 9.1553e-05, 4.8828e-04, 1.1597e-03,
          7.3242e-04, 9.4604e-04, 1.8005e-03, 1.8311e-03, 8.8501e-04,
          4.2725e-04, 4.8828e-04, 7.3242e-04, 1.0986e-03, 2.1057e-03]			)
     # fmt: on
     UpperCAmelCase__ 						=				self._load_datasamples(1			)
     UpperCAmelCase__ 						=				[np.tile(input_audio[0][None]   ,			reps=(2, 1)			)]
     input_audio[0][1] *= 0.5
     UpperCAmelCase__ 						=				EncodecFeatureExtractor(feature_size=2			)
     UpperCAmelCase__ 						=				feature_extractor(_snake_case   ,			return_tensors="""pt"""			).input_values
     self.assertEquals(input_values.shape   ,			(1, 2, 93680)			)
     self.assertTrue(torch.allclose(input_values[0, 0, :30]   ,			_snake_case   ,			atol=1e-6			)			)
     self.assertTrue(torch.allclose(input_values[0, 1, :30]   ,			EXPECTED_INPUT_VALUES * 0.5   ,			atol=1e-6			)			)






    def 		A__      (      self			):
     UpperCAmelCase__ 						=				self._load_datasamples(2			)
     # would be easier if the stride was like
     UpperCAmelCase__ 						=				EncodecFeatureExtractor(feature_size=1   ,			chunk_length_s=1   ,			overlap=0.01			)

     # pad and trunc raise an error ?
     with self.assertRaisesRegex(
         _snake_case   ,			"""^Both padding and truncation were set. Make sure you only set one.$"""   ,			):
      UpperCAmelCase__ 						=				feature_extractor(
          _snake_case   ,			padding="""max_length"""   ,			truncation=_snake_case   ,			return_tensors="""pt"""			).input_values

     # truncate to chunk
     UpperCAmelCase__ 						=				feature_extractor(_snake_case   ,			truncation=_snake_case   ,			return_tensors="""pt"""			).input_values
     self.assertEquals(truncated_outputs.shape   ,			(2, 1, 71520)			)  # 2 chunks

     # force truncate to max_length
     UpperCAmelCase__ 						=				feature_extractor(
         _snake_case   ,			truncation=_snake_case   ,			max_length=48000   ,			return_tensors="""pt"""			).input_values
     self.assertEquals(truncated_outputs.shape   ,			(2, 1, 48000)			)

     # pad to chunk
     UpperCAmelCase__ 						=				feature_extractor(_snake_case   ,			padding=_snake_case   ,			return_tensors="""pt"""			).input_values
     self.assertEquals(padded_outputs.shape   ,			(2, 1, 95280)			)

     # pad to chunk
     UpperCAmelCase__ 						=				feature_extractor(_snake_case   ,			return_tensors="""pt"""			).input_values
     self.assertEquals(truncated_outputs.shape   ,			(2, 1, 95280)			)

     # force pad to max length
     UpperCAmelCase__ 						=				feature_extractor(
         _snake_case   ,			padding="""max_length"""   ,			max_length=100000   ,			return_tensors="""pt"""			).input_values
     self.assertEquals(truncated_outputs.shape   ,			(2, 1, 100000)			)

     # force no pad
     with self.assertRaisesRegex(
         _snake_case   ,			"""^Unable to create tensor, you should probably activate padding with \'padding=True\' to have batched tensors with the same length.$"""   ,			):
      UpperCAmelCase__ 						=				feature_extractor(_snake_case   ,			padding=_snake_case   ,			return_tensors="""pt"""			).input_values

     UpperCAmelCase__ 						=				feature_extractor(input_audio[0]   ,			padding=_snake_case   ,			return_tensors="""pt"""			).input_values
     self.assertEquals(truncated_outputs.shape   ,			(1, 1, 93680)			)

     # no pad if no chunk_length_s
     UpperCAmelCase__ 						=				None
     with self.assertRaisesRegex(
         _snake_case   ,			"""^Unable to create tensor, you should probably activate padding with \'padding=True\' to have batched tensors with the same length.$"""   ,			):
      UpperCAmelCase__ 						=				feature_extractor(_snake_case   ,			padding=_snake_case   ,			return_tensors="""pt"""			).input_values

     UpperCAmelCase__ 						=				feature_extractor(input_audio[0]   ,			padding=_snake_case   ,			return_tensors="""pt"""			).input_values
     self.assertEquals(truncated_outputs.shape   ,			(1, 1, 93680)			)

     # no pad if no overlap
     UpperCAmelCase__ 						=				2
     UpperCAmelCase__ 						=				None
     with self.assertRaisesRegex(
         _snake_case   ,			"""^Unable to create tensor, you should probably activate padding with \'padding=True\' to have batched tensors with the same length.$"""   ,			):
      UpperCAmelCase__ 						=				feature_extractor(_snake_case   ,			padding=_snake_case   ,			return_tensors="""pt"""			).input_values

     UpperCAmelCase__ 						=				feature_extractor(input_audio[0]   ,			padding=_snake_case   ,			return_tensors="""pt"""			).input_values
     self.assertEquals(truncated_outputs.shape   ,			(1, 1, 93680)			)






'''simple docstring'''


import math
from dataclasses import dataclass
from typing import List, Optional, Tuple, Union

import numpy as np
import torch

from ..configuration_utils import ConfigMixin, register_to_config
from ..utils import BaseOutput, logging, randn_tensor
from .scheduling_utils import KarrasDiffusionSchedulers, SchedulerMixin


lowerCAmelCase__      				=			logging.get_logger(__name__)  # pylint: disable=invalid-name



@dataclass
# Copied from diffusers.schedulers.scheduling_ddpm.DDPMSchedulerOutput with DDPM->EulerAncestralDiscrete
class        lowercase    (	a_			):
							_lowerCamelCase		:   torch.FloatTensor
							_lowerCamelCase		:   Optional[torch.FloatTensor]= None







def     SCREAMING_SNAKE_CASE(	UpperCamelCase ,UpperCamelCase=0.999 ,UpperCamelCase="cosine" ,)     ->     List[str]:
	if alpha_transform_type == "cosine":

		def alpha_bar_fn(UpperCamelCase	):
			return math.cos((t + 0.008) / 1.008 * math.pi / 2	) ** 2

	elif alpha_transform_type == "exp":

		def alpha_bar_fn(UpperCamelCase	):
			return math.exp(t * -12.0	)

	else:
		raise ValueError(f"""Unsupported alpha_tranform_type: {alpha_transform_type}"""	)

	UpperCAmelCase_		:   Optional[int]													=       []
	for i in range(UpperCamelCase	):
		UpperCAmelCase_		:   Optional[Any]													=       i / num_diffusion_timesteps
		UpperCAmelCase_		:   Any													=       (i + 1) / num_diffusion_timesteps
		betas.append(min(1 - alpha_bar_fn(UpperCamelCase	) / alpha_bar_fn(UpperCamelCase	) ,UpperCamelCase	)	)
	return torch.tensor(UpperCamelCase ,dtype=torch.floataa	)







class        lowercase    (	a_,       a_			):
							_lowerCamelCase		:   List[str]= [e.name for e in KarrasDiffusionSchedulers]
							_lowerCamelCase		:   Optional[int]= 1


							@register_to_config
							def __init__(      self     ,      _snake_case = 1000     ,      _snake_case = 0.0_001     ,      _snake_case = 0.02     ,      _snake_case = "linear"     ,      _snake_case = None     ,      _snake_case = "epsilon"     ,      _snake_case = "linspace"     ,      _snake_case = 0     ,      )				->					List[str]:
								if trained_betas is not None:
									UpperCAmelCase_		:   List[str]													=       torch.tensor(_snake_case     ,      dtype=torch.floataa)
								elif beta_schedule == "linear":
									UpperCAmelCase_		:   List[Any]													=       torch.linspace(_snake_case     ,      _snake_case     ,      _snake_case     ,      dtype=torch.floataa)
								elif beta_schedule == "scaled_linear":
									# this schedule is very specific to the latent diffusion model.
									UpperCAmelCase_		:   List[Any]													=       (
									    torch.linspace(beta_start**0.5     ,      beta_end**0.5     ,      _snake_case     ,      dtype=torch.floataa) ** 2
									)
								elif beta_schedule == "squaredcos_cap_v2":
									# Glide cosine schedule
									UpperCAmelCase_		:   int													=       betas_for_alpha_bar(_snake_case)
								else:
									raise NotImplementedError(F"""{beta_schedule} does is not implemented for {self.__class__}""")

								UpperCAmelCase_		:   List[Any]													=       1.0 - self.betas
								UpperCAmelCase_		:   Union[str, Any]													=       torch.cumprod(self.alphas     ,      dim=0)

								UpperCAmelCase_		:   Union[str, Any]													=       np.array(((1 - self.alphas_cumprod) / self.alphas_cumprod) ** 0.5)
								UpperCAmelCase_		:   int													=       np.concatenate([sigmas[::-1], [0.0]]).astype(np.floataa)
								UpperCAmelCase_		:   int													=       torch.from_numpy(_snake_case)

								# setable values
								UpperCAmelCase_		:   List[str]													=       None
								UpperCAmelCase_		:   Union[str, Any]													=       np.linspace(0     ,      num_train_timesteps - 1     ,      _snake_case     ,      dtype=_snake_case)[::-1].copy()
								UpperCAmelCase_		:   Optional[int]													=       torch.from_numpy(_snake_case)
								UpperCAmelCase_		:   Optional[int]													=       False


							@property
							def     _snake_case				(      self)				->					Optional[Any]:
								# standard deviation of the initial noise distribution
								if self.config.timestep_spacing in ["linspace", "trailing"]:
									return self.sigmas.max()

								return (self.sigmas.max() ** 2 + 1) ** 0.5


							def     _snake_case				(      self     ,      _snake_case     ,      _snake_case)				->					torch.FloatTensor:
								if isinstance(_snake_case     ,      torch.Tensor):
									UpperCAmelCase_		:   List[Any]													=       timestep.to(self.timesteps.device)
								UpperCAmelCase_		:   int													=       (self.timesteps == timestep).nonzero().item()
								UpperCAmelCase_		:   Union[str, Any]													=       self.sigmas[step_index]
								UpperCAmelCase_		:   Union[str, Any]													=       sample / ((sigma**2 + 1) ** 0.5)
								UpperCAmelCase_		:   Optional[Any]													=       True
								return sample


							def     _snake_case				(      self     ,      _snake_case     ,      _snake_case = None)				->					Optional[Any]:
								UpperCAmelCase_		:   Optional[int]													=       num_inference_steps

								# "linspace", "leading", "trailing" corresponds to annotation of Table 2. of https://arxiv.org/abs/2305.08891
								if self.config.timestep_spacing == "linspace":
									UpperCAmelCase_		:   List[Any]													=       np.linspace(0     ,      self.config.num_train_timesteps - 1     ,      _snake_case     ,      dtype=_snake_case)[
									    ::-1
									].copy()
								elif self.config.timestep_spacing == "leading":
									UpperCAmelCase_		:   Any													=       self.config.num_train_timesteps // self.num_inference_steps
									# creates integer timesteps by multiplying by ratio
									# casting to int to avoid issues when num_inference_step is power of 3
									UpperCAmelCase_		:   List[Any]													=       (np.arange(0     ,      _snake_case) * step_ratio).round()[::-1].copy().astype(_snake_case)
									timesteps += self.config.steps_offset
								elif self.config.timestep_spacing == "trailing":
									UpperCAmelCase_		:   List[Any]													=       self.config.num_train_timesteps / self.num_inference_steps
									# creates integer timesteps by multiplying by ratio
									# casting to int to avoid issues when num_inference_step is power of 3
									UpperCAmelCase_		:   Any													=       (np.arange(self.config.num_train_timesteps     ,      0     ,      -step_ratio)).round().copy().astype(_snake_case)
									timesteps -= 1
								else:
									raise ValueError(
									    F"""{self.config.timestep_spacing} is not supported. Please make sure to choose one of 'linspace', 'leading' or 'trailing'.""")

								UpperCAmelCase_		:   Any													=       np.array(((1 - self.alphas_cumprod) / self.alphas_cumprod) ** 0.5)
								UpperCAmelCase_		:   Dict													=       np.interp(_snake_case     ,      np.arange(0     ,      len(_snake_case))     ,      _snake_case)
								UpperCAmelCase_		:   Optional[int]													=       np.concatenate([sigmas, [0.0]]).astype(np.floataa)
								UpperCAmelCase_		:   int													=       torch.from_numpy(_snake_case).to(device=_snake_case)
								if str(_snake_case).startswith('mps'):
									# mps does not support float64
									UpperCAmelCase_		:   Optional[int]													=       torch.from_numpy(_snake_case).to(_snake_case     ,      dtype=torch.floataa)
								else:
									UpperCAmelCase_		:   List[Any]													=       torch.from_numpy(_snake_case).to(device=_snake_case)


							def     _snake_case				(      self     ,      _snake_case     ,      _snake_case     ,      _snake_case     ,      _snake_case = None     ,      _snake_case = True     ,      )				->					Union[EulerAncestralDiscreteSchedulerOutput, Tuple]:

								if (
								    isinstance(_snake_case     ,      _snake_case)
								    or isinstance(_snake_case     ,      torch.IntTensor)
								    or isinstance(_snake_case     ,      torch.LongTensor)
								):
									raise ValueError(
									    (
									        'Passing integer indices (e.g. from `enumerate(timesteps)`) as timesteps to'
									        ' `EulerDiscreteScheduler.step()` is not supported. Make sure to pass'
									        ' one of the `scheduler.timesteps` as a timestep.'
									    )     ,      )

								if not self.is_scale_input_called:
									logger.warning(
									    'The `scale_model_input` function should be called before `step` to ensure correct denoising. '
									    'See `StableDiffusionPipeline` for a usage example.')

								if isinstance(_snake_case     ,      torch.Tensor):
									UpperCAmelCase_		:   Optional[int]													=       timestep.to(self.timesteps.device)

								UpperCAmelCase_		:   List[Any]													=       (self.timesteps == timestep).nonzero().item()
								UpperCAmelCase_		:   int													=       self.sigmas[step_index]

								# 1. compute predicted original sample (x_0) from sigma-scaled predicted noise
								if self.config.prediction_type == "epsilon":
									UpperCAmelCase_		:   Tuple													=       sample - sigma * model_output
								elif self.config.prediction_type == "v_prediction":
									# * c_out + input * c_skip
									UpperCAmelCase_		:   str													=       model_output * (-sigma / (sigma**2 + 1) ** 0.5) + (sample / (sigma**2 + 1))
								elif self.config.prediction_type == "sample":
									raise NotImplementedError('prediction_type not implemented yet: sample')
								else:
									raise ValueError(
									    F"""prediction_type given as {self.config.prediction_type} must be one of `epsilon`, or `v_prediction`""")

								UpperCAmelCase_		:   Dict													=       self.sigmas[step_index]
								UpperCAmelCase_		:   Union[str, Any]													=       self.sigmas[step_index + 1]
								UpperCAmelCase_		:   str													=       (sigma_to**2 * (sigma_from**2 - sigma_to**2) / sigma_from**2) ** 0.5
								UpperCAmelCase_		:   Any													=       (sigma_to**2 - sigma_up**2) ** 0.5

								# 2. Convert to an ODE derivative
								UpperCAmelCase_		:   Dict													=       (sample - pred_original_sample) / sigma

								UpperCAmelCase_		:   Tuple													=       sigma_down - sigma

								UpperCAmelCase_		:   List[str]													=       sample + derivative * dt

								UpperCAmelCase_		:   Any													=       model_output.device
								UpperCAmelCase_		:   List[Any]													=       randn_tensor(model_output.shape     ,      dtype=model_output.dtype     ,      device=_snake_case     ,      generator=_snake_case)

								UpperCAmelCase_		:   Union[str, Any]													=       prev_sample + noise * sigma_up

								if not return_dict:
									return (prev_sample,)

								return EulerAncestralDiscreteSchedulerOutput(
								    prev_sample=_snake_case     ,      pred_original_sample=_snake_case)


							def     _snake_case				(      self     ,      _snake_case     ,      _snake_case     ,      _snake_case     ,      )				->					torch.FloatTensor:
								# Make sure sigmas and timesteps have the same device and dtype as original_samples
								UpperCAmelCase_		:   List[str]													=       self.sigmas.to(device=original_samples.device     ,      dtype=original_samples.dtype)
								if original_samples.device.type == "mps" and torch.is_floating_point(_snake_case):
									# mps does not support float64
									UpperCAmelCase_		:   str													=       self.timesteps.to(original_samples.device     ,      dtype=torch.floataa)
									UpperCAmelCase_		:   List[Any]													=       timesteps.to(original_samples.device     ,      dtype=torch.floataa)
								else:
									UpperCAmelCase_		:   List[Any]													=       self.timesteps.to(original_samples.device)
									UpperCAmelCase_		:   str													=       timesteps.to(original_samples.device)

								UpperCAmelCase_		:   Optional[Any]													=       [(schedule_timesteps == t).nonzero().item() for t in timesteps]

								UpperCAmelCase_		:   Any													=       sigmas[step_indices].flatten()
								while len(sigma.shape) < len(original_samples.shape):
									UpperCAmelCase_		:   Union[str, Any]													=       sigma.unsqueeze(-1)

								UpperCAmelCase_		:   int													=       original_samples + noise * sigma
								return noisy_samples





							def __len__(      self)				->					Optional[Any]:
								return self.config.num_train_timesteps






