code: def test_dmpnn_model_reload():
      """
      Test DMPNNModel class for reloading the model
      """
      torch.manual_seed(0)
  
      # load sample dataset
      dir = os.path.dirname(os.path.abspath(__file__))
      input_file = os.path.join(dir, "assets/freesolv_sample_5.csv")
      loader = dc.data.CSVLoader(
          tasks=["y"],
          feature_field="smiles",
          featurizer=dc.feat.DMPNNFeaturizer(),
      )
      dataset = loader.create_dataset(input_file)
  
      # initialize the model
      from deepchem.models.torch_models.dmpnn import DMPNNModel
  
      model_dir = tempfile.mkdtemp()
      model = DMPNNModel(model_dir=model_dir, batch_size=2)
  
      # fit the model
      model.fit(dataset, nb_epoch=10)
  
      # reload the model
      reloaded_model = DMPNNModel(model_dir=model_dir, batch_size=2)
      reloaded_model.restore()
  
      orig_predict = model.predict(dataset)
      reloaded_predict = reloaded_model.predict(dataset)
      assert np.all(orig_predict == reloaded_predict)
  
file_path: deepchem/deepchem/models/tests/test_dmpnn.py
imports: import pytest
  import deepchem
  import tempfile
  import numpy
  import os
label_desc: Use image node_id 6 for calling a global function with example usage: test_dmpnn_model_reload() without return types