class_docstr: DataSource which loads data from TSV sources. Uses python's csv library.
class_docstr_tok: ["DataSource","which","loads","data","from","TSV","sources",".","Uses","python","'s","csv","library","."]
code: def from_config(
      cls, config: Config, schema: Dict[str, Type], **kwargs
  ):
      args = config._asdict()
      train_filename = args.pop("train_filename")
      test_filename = args.pop("test_filename")
      eval_filename = args.pop("eval_filename")
  
      train_file = (
          SafeFileWrapper(
              get_absolute_path(train_filename),
              encoding="utf-8",
              errors="replace",
          )
          if train_filename
          else None
      )
      test_file = (
          SafeFileWrapper(
              get_absolute_path(test_filename),
              encoding="utf-8",
              errors="replace",
          )
          if test_filename
          else None
      )
      eval_file = (
          SafeFileWrapper(
              get_absolute_path(eval_filename),
              encoding="utf-8",
              errors="replace",
          )
          if eval_filename
          else None
      )
      return cls(
          train_file=train_file,
          test_file=test_file,
          eval_file=eval_file,
          schema=schema,
          **args,
          **kwargs,
      )
  
imports: import csv
  import logging
  import sys
  import threading
  from typing import Dict, List, Optional, Type
  from pytext.utils.path import get_absolute_path
  from .data_source import generator_property, RootDataSource, SafeFileWrapper, ShardedDataSource
  from .session import SessionDataSource
label_desc: Use image node_id 1 for calling the TSVDataSource obj's underlying member method code with example usage: obj.from_config(cls, config, schema) and returns: cls