class_docstr: A wrapper for `seqio.Task` using a `seqio.TFExampleDataSource`.
  
  Reads raw data from a file of tf.train.Example protos.
  
  For backward compatibility with the original T5 task format, this task
  separates preprocessing into text and token stages, with optional caching in
  between.
class_docstr_tok: ["A","wrapper","for","`","seqio.Task","`","using","a","`","seqio.TFExampleDataSource","`",".","Reads","raw","data","from","a","file","of","tf.train.Example","protos",".","For","backward","compatibility","with","the","original","T5","task","format",",","this","task","separates","preprocessing","into","text","and","token","stages",",","with","optional","caching","in","between","."]
docstr: TextLineTask constructor.
  
  Args:
    name: string, a unique name for the Task. A ValueError will be raised if
      another task with this name is already registered.
    split_to_filepattern: dict of string (split name) to string (filename or
      filepattern).
    feature_description: dict, a mapping of string feature keys to
      `tf.io.FixedLenFeature` or `tf.io.VarLenFeature` values.
    text_preprocessor: a function (or list of functions) that (each) takes in
      a tf.data.Dataset of string features and returns a tf.data.Dataset of
      string features. Can be set to None as a no-op. If a list is given, they
      will be executed sequentially.
    metric_fns: list(callable), list of metric functions with the signature
      metric_fn(targets, predictions) to use during evaluation.
    reader: `tf.data.Dataset`, a dataset class to read the input files.
    **task_kwargs: dict, additional keyword arguments for the parent `Task`
      class.
docstr_tok: ["TextLineTask","constructor",".","Args",":","name",":","string",",","a","unique","name","for","the","Task",".","A","ValueError","will","be","raised","if","another","task","with","this","name","is","already","registered",".","split_to_filepattern",":","dict","of","string","(","split","name",")","to","string","(","filename","or","filepattern",")",".","feature_description",":","dict",",","a","mapping","of","string","feature","keys","to","`","tf.io.FixedLenFeature","`","or","`","tf.io.VarLenFeature","`","values",".","text_preprocessor",":","a","function","(","or","list","of","functions",")","that","(","each",")","takes","in","a","tf.data.Dataset","of","string","features","and","returns","a","tf.data.Dataset","of","string","features",".","Can","be","set","to","None","as","a","no-op",".","If","a","list","is","given",",","they","will","be","executed","sequentially",".","metric_fns",":","list","(","callable",")",",","list","of","metric","functions","with","the","signature","metric_fn","(","targets",",","predictions",")","to","use","during","evaluation",".","reader",":","`","tf.data.Dataset","`",",","a","dataset","class","to","read","the","input","files",".","*","*","task_kwargs",":","dict",",","additional","keyword","arguments","for","the","parent","`","Task","`","class","."]
code: def __init__(
      self,
      name,
      split_to_filepattern,
      feature_description,
      text_preprocessor,
      metric_fns,
      reader=tf.data.TFRecordDataset,
      **task_kwargs,
  ):
      """TextLineTask constructor.
  
      Args:
        name: string, a unique name for the Task. A ValueError will be raised if
          another task with this name is already registered.
        split_to_filepattern: dict of string (split name) to string (filename or
          filepattern).
        feature_description: dict, a mapping of string feature keys to
          `tf.io.FixedLenFeature` or `tf.io.VarLenFeature` values.
        text_preprocessor: a function (or list of functions) that (each) takes in
          a tf.data.Dataset of string features and returns a tf.data.Dataset of
          string features. Can be set to None as a no-op. If a list is given, they
          will be executed sequentially.
        metric_fns: list(callable), list of metric functions with the signature
          metric_fn(targets, predictions) to use during evaluation.
        reader: `tf.data.Dataset`, a dataset class to read the input files.
        **task_kwargs: dict, additional keyword arguments for the parent `Task`
          class.
      """
  
      super().__init__(
          name,
          source=seqio.TFExampleDataSource(
              split_to_filepattern=split_to_filepattern,
              feature_description=feature_description,
              reader_cls=reader,
              num_input_examples=task_kwargs.pop(
                  "num_input_examples", None
              ),
          ),
          text_preprocessor=text_preprocessor,
          metric_fns=metric_fns,
          dataset_fn=None,
          splits=None,
          **task_kwargs,
      )
  
imports: from collections.abc import Mapping
  import re
  import seqio
  from t5.data import utils
  import tensorflow.compat.v2
label_desc: Use image node_id 1 to create a new TFExampleTask object from inherited base classes: FunctionTask with example: obj = TFExampleTask(name, split_to_filepattern, feature_description, text_preprocessor, metric_fns, reader)