code: def test_grover_model_overfit_finetune(tmpdir):
      from deepchem.models.torch_models.grover import GroverModel
      from deepchem.feat.vocabulary_builders import (
          GroverAtomVocabularyBuilder,
          GroverBondVocabularyBuilder,
      )
  
      # arranging test - preparing dataset
      import pandas as pd
  
      df = pd.DataFrame({"smiles": ["CC", "CCC"], "preds": [0, 0]})
  
      filepath = os.path.join(tmpdir, "example.csv")
      df.to_csv(filepath, index=False)
  
      dataset_path = os.path.join(filepath)
      loader = dc.data.CSVLoader(
          tasks=["preds"],
          featurizer=dc.feat.DummyFeaturizer(),
          feature_field=["smiles"],
      )
      dataset = loader.create_dataset(dataset_path)
  
      av = GroverAtomVocabularyBuilder()
      av.build(dataset)
  
      bv = GroverBondVocabularyBuilder()
      bv.build(dataset)
  
      fg = dc.feat.CircularFingerprint()
      loader2 = dc.data.CSVLoader(
          tasks=["preds"],
          featurizer=dc.feat.GroverFeaturizer(features_generator=fg),
          feature_field="smiles",
      )
      graph_data = loader2.create_dataset(dataset_path)
  
      # acting - tests
      model = GroverModel(
          node_fdim=151,
          edge_fdim=165,
          atom_vocab=av,
          bond_vocab=bv,
          features_dim=2048,
          hidden_size=128,
          functional_group_size=85,
          mode="regression",
          task="finetuning",
          model_dir="gm_ft",
          device=torch.device("cpu"),
      )
  
      loss = model.fit(graph_data, nb_epoch=200)
      scores = model.evaluate(
          graph_data,
          metrics=[
              dc.metrics.Metric(dc.metrics.mean_squared_error, np.mean)
          ],
      )
  
      # asserting
      assert loss < 0.01
      assert scores["mean-mean_squared_error"] < 0.01
  
file_path: deepchem/deepchem/models/torch_models/tests/test_grover.py
imports: import os
  import pytest
  import numpy
  import deepchem
label_desc: Use image node_id 7 for calling a global function with example usage: test_grover_model_overfit_finetune(tmpdir) without return types