(benchmark_id)
return stream_of_inputs_targets_weights
Returns a GLUE data split prepared with the standard T5 preprocessor.
Returns a GLUE data split prepared with the standard T5 preprocessor.
Returns a GLUE data split prepared with the standard T5 preprocessor .
def _t5_glue_data_split_no_token(benchmark_id):
  """Returns a GLUE data split prepared with the standard T5 preprocessor."""
  benchmark, split = _t5_glue_benchmark_and_split(benchmark_id)
  dataset = tfds.load(name=f'glue/{benchmark}', split=split)
  processed_dataset = t5_data().preprocessors.glue(  # pylint: disable=g-long-lambda
      dataset,
      benchmark_name=benchmark,
      label_names=_GLUE_LABELS[benchmark])

  def stream_of_inputs_targets_weights(generator=None):
    del generator
    while True:
      for example in processed_dataset:
        input_values = example['inputs'].numpy()
        target_values = example['targets'].numpy()
        yield (input_values,
               target_values,
               jnp.array([1] * len(target_values)))

  return stream_of_inputs_targets_weights
def _t5_glue_data_split_no_token ( benchmark_id ) : benchmark , split = _t5_glue_benchmark_and_split ( benchmark_id ) dataset = tfds . load ( name = f'glue/{benchmark}' , split = split ) processed_dataset = t5_data ( ) . preprocessors . glue ( # pylint: disable=g-long-lambda dataset , benchmark_name = benchmark , label_names = _GLUE_LABELS [ benchmark ] ) def stream_of_inputs_targets_weights ( generator = None ) : del generator while True : for example in processed_dataset : input_values = example [ 'inputs' ] . numpy ( ) target_values = example [ 'targets' ] . numpy ( ) yield ( input_values , target_values , jnp . array ( [ 1 ] * len ( target_values ) ) ) return stream_of_inputs_targets_weights