class_docstr: The class provides common functionality used by many molnet loader functions.
  It is an abstract class.  Subclasses implement loading of particular datasets.
class_docstr_tok: ["The","class","provides","common","functionality","used","by","many","molnet","loader","functions",".","It","is","an","abstract","class",".","Subclasses","implement","loading","of","particular","datasets","."]
docstr: Load the dataset.
  
  Parameters
  ----------
  name: str
      the name of the dataset, used to identify the directory on disk
  reload: bool
      if True, the first call for a particular featurizer and splitter will cache
      the datasets to disk, and subsequent calls will reload the cached datasets.
docstr_tok: ["Load","the","dataset",".","Parameters","--","--","--","--","--","name",":","str","the","name","of","the","dataset",",","used","to","identify","the","directory","on","disk","reload",":","bool","if","True",",","the","first","call","for","a","particular","featurizer","and","splitter","will","cache","the","datasets","to","disk",",","and","subsequent","calls","will","reload","the","cached","datasets","."]
code: def load_dataset(
      self, name: str, reload: bool
  ) -> Tuple[
      List[str], Tuple[Dataset, ...], List[dc.trans.Transformer]
  ]:
      """Load the dataset.
  
      Parameters
      ----------
      name: str
          the name of the dataset, used to identify the directory on disk
      reload: bool
          if True, the first call for a particular featurizer and splitter will cache
          the datasets to disk, and subsequent calls will reload the cached datasets.
      """
      # Build the path to the dataset on disk.
  
      featurizer_name = str(self.featurizer)
      splitter_name = (
          "None" if self.splitter is None else str(self.splitter)
      )
      save_folder = os.path.join(
          self.save_dir,
          name + "-featurized",
          featurizer_name,
          splitter_name,
      )
      if len(self.transformers) > 0:
          transformer_name = "_".join(
              t.get_directory_name() for t in self.transformers
          )
          save_folder = os.path.join(save_folder, transformer_name)
  
      # Try to reload cached datasets.
  
      if reload:
          if self.splitter is None:
              if os.path.exists(save_folder):
                  transformers = dc.utils.data_utils.load_transformers(
                      save_folder
                  )
                  return (
                      self.tasks,
                      (DiskDataset(save_folder),),
                      transformers,
                  )
          else:
              (
                  loaded,
                  all_dataset,
                  transformers,
              ) = dc.utils.data_utils.load_dataset_from_disk(
                  save_folder
              )
              if all_dataset is not None:
                  return self.tasks, all_dataset, transformers
  
      # Create the dataset
  
      logger.info("About to featurize %s dataset." % name)
      dataset = self.create_dataset()
  
      # Split and transform the dataset.
  
      if self.splitter is None:
          transformer_dataset: Dataset = dataset
      else:
          logger.info(
              "About to split dataset with {} splitter.".format(
                  self.splitter.__class__.__name__
              )
          )
          train, valid, test = self.splitter.train_valid_test_split(
              dataset
          )
          transformer_dataset = train
      transformers = [
          t.create_transformer(transformer_dataset)
          for t in self.transformers
      ]
      logger.info("About to transform data.")
      if self.splitter is None:
          for transformer in transformers:
              dataset = transformer.transform(dataset)
          if reload and isinstance(dataset, DiskDataset):
              dataset.move(save_folder)
              dc.utils.data_utils.save_transformers(
                  save_folder, transformers
              )
          return self.tasks, (dataset,), transformers
  
      for transformer in transformers:
          train = transformer.transform(train)
          valid = transformer.transform(valid)
          test = transformer.transform(test)
      if (
          reload
          and isinstance(train, DiskDataset)
          and isinstance(valid, DiskDataset)
          and isinstance(test, DiskDataset)
      ):
          dc.utils.data_utils.save_dataset_to_disk(
              save_folder, train, valid, test, transformers
          )
      return self.tasks, (train, valid, test), transformers
  
file_path: deepchem/deepchem/molnet/load_function/molnet_loader.py
imports: import os
  import logging
  import deepchem
  from deepchem.data import Dataset, DiskDataset
  from typing import List, Optional, Tuple, Type, Union
label_desc: Use image node_id 2 for calling the _MolnetLoader obj's underlying member method code with example usage: obj.load_dataset(name, reload) and returns: self,  train,  valid,  test,  transformers, self,  dataset,  transformers, self,  DiskDataset,  transformers, self,  all_dataset,  transformers