class_docstr: A wrapper for `seqio.Task` using a `seqio.TextLineDataSource`.
  
  Reads raw data from a text file.
  
  For backward compatibility with the original T5 task format, this task
  separates preprocessing into text and token stages, with optional caching in
  between.
  
  Requires a text_processor to be passed that takes a tf.data.Dataset of
  strings and returns a tf.data.Dataset of feature dictionaries.
  e.g. preprocessors.preprocess_tsv()
class_docstr_tok: ["A","wrapper","for","`","seqio.Task","`","using","a","`","seqio.TextLineDataSource","`",".","Reads","raw","data","from","a","text","file",".","For","backward","compatibility","with","the","original","T5","task","format",",","this","task","separates","preprocessing","into","text","and","token","stages",",","with","optional","caching","in","between",".","Requires","a","text_processor","to","be","passed","that","takes","a","tf.data.Dataset","of","strings","and","returns","a","tf.data.Dataset","of","feature","dictionaries",".","e.g",".","preprocessors.preprocess_tsv","(",")"]
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).
    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.
    skip_header_lines: int, number of header lines to skip in each source
      file.
    **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",")",".","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",".","skip_header_lines",":","int",",","number","of","header","lines","to","skip","in","each","source","file",".","*","*","task_kwargs",":","dict",",","additional","keyword","arguments","for","the","parent","`","Task","`","class","."]
code: def __init__(
      self,
      name,
      split_to_filepattern,
      text_preprocessor,
      metric_fns,
      skip_header_lines=0,
      **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).
        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.
        skip_header_lines: int, number of header lines to skip in each source
          file.
        **task_kwargs: dict, additional keyword arguments for the parent `Task`
          class.
      """
  
      super().__init__(
          name,
          source=seqio.TextLineDataSource(
              split_to_filepattern=split_to_filepattern,
              skip_header_lines=skip_header_lines,
              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 TextLineTask object from inherited base classes: FunctionTask with example: obj = TextLineTask(name, split_to_filepattern, text_preprocessor, metric_fns, skip_header_lines)