'DGLHeteroGraph' object has no attribute 'iterbatches'

Currently I am working on pytorch ligthining implementation project of gsoc 2021. I didn’t use on deepchem models previously therefore I am facing some problems.
I imported GraphData from deepchem.feat.graph_data to create dataset to train LCNN pytorch model but shows ‘DGLHeteroGraph’ object has no attribute ‘iterbatches’.

Please suggest how should i used pre-built graph dataset to train LCNN pytorch model.
Here i tried to train the LCNN model ->

I’m still working on a tutorial for building models on crystal graphs and LCNN included in it. I would suggest try using, the CGCNN or GCN model as building the dataset for it is fairly simpler.

Could you fix the imports with LCNNlit as unable to reproduce the error,
Screenshot from 2021-03-28 22-55-18

ModuleNotFoundError: No module named 'lcnnlit'

Here is my suggested fix -

  • LCNNModel inherited from the TorchModel API requires a DeepChem Dataset object. I can’t say much without seeing the code for LCNNModel imported from your built( LightingModel API) but you could try using LCNN class(here), which is a direct Pytorch Model. You can directly pass a featurized DGL graph into it.

Thanks @VIGNESHinZONE for resolving my issue. Actually Iccnlit.py is the recreation of pytorch in pytorch ligthining , i was testing my implementation.

1 Like