class_docstr: DeepChem Lightning Dataset Module to be used with the DCLightningModule and a Lightning trainer.
  
  This module wraps over the the deepchem pytorch dataset and dataloader providing a generic interface to run training.
  https://pytorch-lightning.readthedocs.io/en/stable/extensions/datamodules.html
  
  Notes
  -----
  This class requires PyTorch to be installed.
docstr: Create a new DCLightningDatasetModule.
  
  Parameters
  ----------
  dataset: dc.data.Dataset
      A deepchem dataset.
  batch_size: int
      Batch size for the dataloader.
  collate_fn: Callable
      Method to collate instances across batch.
  num_workers: int
      Number of workers to load data
code: def __init__(
      self,
      dataset: dc.data.Dataset,
      batch_size: int,
      collate_fn: Callable = collate_dataset_wrapper,
      num_workers: int = 0,
  ):
      """Create a new DCLightningDatasetModule.
  
      Parameters
      ----------
      dataset: dc.data.Dataset
          A deepchem dataset.
      batch_size: int
          Batch size for the dataloader.
      collate_fn: Callable
          Method to collate instances across batch.
      num_workers: int
          Number of workers to load data
      """
      super().__init__()
      self._batch_size = batch_size
      self._dataset = dataset.make_pytorch_dataset(
          batch_size=self._batch_size
      )
      self.collate_fn = collate_fn
      self.num_workers = num_workers
  
file_path: deepchem/deepchem/models/lightning/dc_lightning_dataset_module.py
imports: from typing import Callable
  import deepchem
  import lightning
  import torch
label_desc: Use image node_id 1 to create a new DCLightningDatasetModule object from inherited base class: L with example: obj = DCLightningDatasetModule(dataset, batch_size, collate_fn, num_workers)