class_docstr: Handles loading/featurizing of data from disk.
  
  The main use of `DataLoader` and its child classes is to make it
  easier to load large datasets into `Dataset` objects.`
  
  `DataLoader` is an abstract superclass that provides a
  general framework for loading data into DeepChem. This class should
  never be instantiated directly.  To load your own type of data, make
  a subclass of `DataLoader` and provide your own implementation for
  the `create_dataset()` method.
  
  To construct a `Dataset` from input data, first instantiate a
  concrete data loader (that is, an object which is an instance of a
  subclass of `DataLoader`) with a given `Featurizer` object. Then
  call the data loader's `create_dataset()` method on a list of input
  files that hold the source data to process. Note that each subclass
  of `DataLoader` is specialized to handle one type of input data so
  you will have to pick the loader class suitable for your input data
  type.
  
  Note that it isn't necessary to use a data loader to process input
  data. You can directly use `Featurizer` objects to featurize
  provided input into numpy arrays, but note that this calculation
  will be performed in memory, so you will have to write generators
  that walk the source files and write featurized data to disk
  yourself. `DataLoader` and its subclasses make this process easier
  for you by performing this work under the hood.
class_docstr_tok: ["Handles","loading\/featurizing","of","data","from","disk",".","The","main","use","of","`","DataLoader","`","and","its","child","classes","is","to","make","it","easier","to","load","large","datasets","into","`","Dataset","`","objects.","`","`","DataLoader","`","is","an","abstract","superclass","that","provides","a","general","framework","for","loading","data","into","DeepChem",".","This","class","should","never","be","instantiated","directly",".","To","load","your","own","type","of","data",",","make","a","subclass","of","`","DataLoader","`","and","provide","your","own","implementation","for","the","`","create_dataset","(",")","`","method",".","To","construct","a","`","Dataset","`","from","input","data",",","first","instantiate","a","concrete","data","loader","(","that","is",",","an","object","which","is","an","instance","of","a","subclass","of","`","DataLoader","`",")","with","a","given","`","Featurizer","`","object",".","Then","call","the","data","loader","'s","`","create_dataset","(",")","`","method","on","a","list","of","input","files","that","hold","the","source","data","to","process",".","Note","that","each","subclass","of","`","DataLoader","`","is","specialized","to","handle","one","type","of","input","data","so","you","will","have","to","pick","the","loader","class","suitable","for","your","input","data","type",".","Note","that","it","is","n't","necessary","to","use","a","data","loader","to","process","input","data",".","You","can","directly","use","`","Featurizer","`","objects","to","featurize","provided","input","into","numpy","arrays",",","but","note","that","this","calculation","will","be","performed","in","memory",",","so","you","will","have","to","write","generators","that","walk","the","source","files","and","write","featurized","data","to","disk","yourself",".","`","DataLoader","`","and","its","subclasses","make","this","process","easier","for","you","by","performing","this","work","under","the","hood","."]
docstr: Construct a DataLoader object.
  
  This constructor is provided as a template mainly. You
  shouldn't ever call this constructor directly as a user.
  
  Parameters
  ----------
  tasks: List[str]
      List of task names
  featurizer: Featurizer
      Featurizer to use to process data.
  id_field: str, optional (default None)
      Name of field that holds sample identifier. Note that the
      meaning of "field" depends on the input data type and can have a
      different meaning in different subclasses. For example, a CSV
      file could have a field as a column, and an SDF file could have
      a field as molecular property.
  log_every_n: int, optional (default 1000)
      Writes a logging statement this often.
docstr_tok: ["Construct","a","DataLoader","object",".","This","constructor","is","provided","as","a","template","mainly",".","You","should","n't","ever","call","this","constructor","directly","as","a","user",".","Parameters","--","--","--","--","--","tasks",":","List","[","str","]","List","of","task","names","featurizer",":","Featurizer","Featurizer","to","use","to","process","data",".","id_field",":","str",",","optional","(","default","None",")","Name","of","field","that","holds","sample","identifier",".","Note","that","the","meaning","of","``","field","''","depends","on","the","input","data","type","and","can","have","a","different","meaning","in","different","subclasses",".","For","example",",","a","CSV","file","could","have","a","field","as","a","column",",","and","an","SDF","file","could","have","a","field","as","molecular","property",".","log_every_n",":","int",",","optional","(","default","1000",")","Writes","a","logging","statement","this","often","."]
code: def __init__(
      self,
      tasks: List[str],
      featurizer: Featurizer,
      id_field: Optional[str] = None,
      log_every_n: int = 1000,
  ):
      """Construct a DataLoader object.
  
      This constructor is provided as a template mainly. You
      shouldn't ever call this constructor directly as a user.
  
      Parameters
      ----------
      tasks: List[str]
          List of task names
      featurizer: Featurizer
          Featurizer to use to process data.
      id_field: str, optional (default None)
          Name of field that holds sample identifier. Note that the
          meaning of "field" depends on the input data type and can have a
          different meaning in different subclasses. For example, a CSV
          file could have a field as a column, and an SDF file could have
          a field as molecular property.
      log_every_n: int, optional (default 1000)
          Writes a logging statement this often.
      """
      if self.__class__ is DataLoader:
          raise ValueError(
              "DataLoader should never be instantiated directly. Use a subclass instead."
          )
      if not isinstance(tasks, list):
          raise ValueError("tasks must be a list.")
      self.tasks = tasks
      self.id_field = id_field
      self.user_specified_features = None
      if isinstance(featurizer, UserDefinedFeaturizer):
          self.user_specified_features = featurizer.feature_fields
      self.featurizer = featurizer
      self.log_every_n = log_every_n
  
imports: import os
  import tempfile
  import zipfile
  import time
  import logging
  import warnings
  from typing import List, Optional, Tuple, Any, Sequence, Union, Iterator
  import pandas
  import numpy
  from deepchem.utils.typing import OneOrMany
  from deepchem.utils.data_utils import load_image_files, load_csv_files, load_json_files, load_sdf_files, unzip_file
  from deepchem.feat import UserDefinedFeaturizer, Featurizer
  from deepchem.data import Dataset, DiskDataset, NumpyDataset, ImageDataset
  from deepchem.feat.molecule_featurizers import OneHotFeaturizer
  from deepchem.utils.genomics_utils import encode_bio_sequence
label_desc: Use image node_id 1 to create a new DataLoader object from inherited base classes: object with example: obj = DataLoader(tasks, featurizer, id_field, log_every_n)