question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No module named 'deepchem.models.tensorgraph.models.graph_models'

See original GitHub issue

Description:

Hi, I have installed deepchem by source. To start with, I want to run Graph Convolutional Networks tutorial. However, I fail to import deepchem.models.tensorgraph.models.graph_models:

$ cat GraphConv_Test.py 
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
import tensorflow as tf
import deepchem as dc
from deepchem.models.tensorgraph.models.graph_models import GraphConvModel
# Load Tox21 dataset
tox21_tasks, tox21_datasets, transformers = dc.molnet.load_tox21(featurizer='GraphConv')

$ python GraphConv_Test.py 
Traceback (most recent call last):
  File "GraphConv_Test.py", line 8, in <module>
    from deepchem.models.tensorgraph.models.graph_models import GraphConvModel
ImportError: No module named 'deepchem.models.tensorgraph.models.graph_models'
  • Commit: ‘4f4a67491176f7bdfde6229391dee3223fcbf8d2’
  • DeepChem Version: ‘2.1.1’
  • Platform: MacOS (version 10.14.6)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
peastmancommented, Aug 28, 2019

The class has moved in the latest source code. Change the import to

from deepchem.models import GraphConvModel

I’m in the middle of updating the examples right now. I should have a PR with the changes in the next few days.

1reaction
vsomnathcommented, Aug 29, 2019

I was not able to reproduce the above error. The error is because a metadata.joblib file is missing.

I suspect this error is happening because the DiskDataset creation process was stopped midway and while directories were created, the files were not. You could try clearing out the tox21-featurized directory and retry. If it still fails, I’ll also have a look at it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

deepchem/Lobby - Gitter
But the tutorials on the deepchem (not github) website are not update to date for the ... No module named 'deepchem.models.tensorgraph.models.graph_models'.
Read more >
Model Classes — deepchem 2.6.2.dev documentation
Model Classes¶. DeepChem maintains an extensive collection of models for scientific applications. DeepChem's focus is on facilitating scientific ...
Read more >
Keras modeling and groundwork for TensorFlow 2 - DeepChem
Unfortunately, TensorFlow had no standard modeling API. ... to build models, mostly found in the deepchem.models.tensorgraph.layers module.
Read more >
deepchem Changelog - pyup.io
DeepChem adds support for new models including DMPNNs, and MEGNet ... Retrieving shape of disk dataset when task names are not specified
Read more >
Tutorial Part 4: Introduction to Graph Convolutions
Cause: module 'gast' has no attribute 'Num' WARNING:tensorflow:From /root/miniconda/lib/python3.6/site-packages/deepchem/models/layers.py:194: The name ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found