class_docstr: Base Problem for multi timeseries datasets.
class_docstr_tok: ["Base","Problem","for","multi","timeseries","datasets","."]
code: def generate_samples(self, data_dir, tmp_dir, dataset_split):
      del data_dir
      del tmp_dir
      del dataset_split
  
      series = self.timeseries_dataset()
      num_timestamps = len(series)
  
      # Generate samples with num_input_timestamps for "inputs" and
      # num_target_timestamps in the "targets".
      for split_index in range(
          self.num_input_timestamps,
          num_timestamps - self.num_target_timestamps + 1,
      ):
          inputs = series[
              split_index - self.num_input_timestamps : split_index, :
          ].tolist()
          targets = series[
              split_index : split_index + self.num_target_timestamps, :
          ].tolist()
          # We need to flatten the lists on disk for tf,Example to work.
          flat_inputs = [item for sublist in inputs for item in sublist]
          flat_targets = [
              item for sublist in targets for item in sublist
          ]
          if self.has_inputs:
              example_keys = ["inputs", "targets"]
              ex_dict = dict(
                  zip(example_keys, [flat_inputs, flat_targets])
              )
          else:
              example_keys = ["targets"]
              ex_dict = dict(zip(example_keys, [flat_targets]))
  
          yield ex_dict
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import timeseries_data_generator
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import metrics
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 15 for calling the TimeseriesProblem obj's underlying member method code with example usage: obj.generate_samples(data_dir, tmp_dir, dataset_split) without return types