-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems while running the threedgraph.ipynb - AttributeError #49
Comments
Hi, Thanks for your interest in our library! I can reproduce this issue. Please try 'pip install sympy' to install sympy firstly. Thanks |
I have installed sympy via pip and the same error message appears, I've also tried import sympy as sym, and from sympy import *, and just simply import sympy. |
I just realized an error I made earlier, I am not on pytorch 1.8, but rather 1.7.1 since I have CUDA 10.1 Other than that the system info is accurate. |
Hi, Could you please provide all your package? Thanks |
Hi, I can reproduce this issue on PyTorch 1.7.1 and solve it by installing sympy. And I think if you have PyTorch < 1.8.0, you need to install torch-geometric via Pip Wheels or from source. Here is my package list on Pytorch 1.7.1, Python 3.6, torch-geometric 2.0.1:
Thanks |
Hi @smoes-prime, Are you still having this issue? Thanks |
I solved it by simply updating my pytorch and PyG version when my sysadmin updated my pod. |
I installed DIG and then cloned the repo locally, I tried to run the three3graph.ipynb tutorial as is, but it threw an error on line 4, which reads as follows
model = SphereNet(energy_and_force=False, cutoff=5.0, num_layers=4, hidden_channels=128, out_channels=1, int_emb_size=64, basis_emb_size_dist=8, basis_emb_size_angle=8, basis_emb_size_torsion=8, out_emb_channels=256, num_spherical=3, num_radial=6, envelope_exponent=5, num_before_skip=1, num_after_skip=2, num_output_layers=3, use_node_features=True ) loss_func = torch.nn.L1Loss() evaluation = ThreeDEvaluator()
the error I get is:
AttributeError Traceback (most recent call last)
in
4 num_spherical=3, num_radial=6, envelope_exponent=5,
5 num_before_skip=1, num_after_skip=2, num_output_layers=3,
----> 6 use_node_features=True
7 )
8 loss_func = torch.nn.L1Loss()
~/.local/lib/python3.6/site-packages/dig/threedgraph/method/spherenet/spherenet.py in init(self, energy_and_force, cutoff, num_layers, hidden_channels, out_channels, int_emb_size, basis_emb_size_dist, basis_emb_size_angle, basis_emb_size_torsion, out_emb_channels, num_spherical, num_radial, envelope_exponent, num_before_skip, num_after_skip, num_output_layers, act, output_init, use_node_features)
263 self.init_v = update_v(hidden_channels, out_emb_channels, out_channels, num_output_layers, act, output_init)
264 self.init_u = update_u()
--> 265 self.emb = emb(num_spherical, num_radial, self.cutoff, envelope_exponent)
266
267 self.update_vs = torch.nn.ModuleList([
~/.local/lib/python3.6/site-packages/dig/threedgraph/method/spherenet/spherenet.py in init(self, num_spherical, num_radial, cutoff, envelope_exponent)
22 super(emb, self).init()
23 self.dist_emb = dist_emb(num_radial, cutoff, envelope_exponent)
---> 24 self.angle_emb = angle_emb(num_spherical, num_radial, cutoff, envelope_exponent)
25 self.torsion_emb = torsion_emb(num_spherical, num_radial, cutoff, envelope_exponent)
26 self.reset_parameters()
~/.local/lib/python3.6/site-packages/dig/threedgraph/method/spherenet/features.py in init(self, num_spherical, num_radial, cutoff, envelope_exponent)
196 # self.envelope = Envelope(envelope_exponent)
197
--> 198 bessel_forms = bessel_basis(num_spherical, num_radial)
199 sph_harm_forms = real_sph_harm(num_spherical)
200 self.sph_funcs = []
~/.local/lib/python3.6/site-packages/dig/threedgraph/method/spherenet/features.py in bessel_basis(n, k)
56 normalizer += [normalizer_tmp]
57
---> 58 f = spherical_bessel_formulas(n)
59 x = sym.Symbol('x')
60 bess_basis = []
~/.local/lib/python3.6/site-packages/dig/threedgraph/method/spherenet/features.py in spherical_bessel_formulas(n)
35
36 def spherical_bessel_formulas(n):
---> 37 x = sym.Symbol('x')
38
39 f = [sym.sin(x) / x]
AttributeError: 'NoneType' object has no attribute 'symbols'
Now I did try a solution which was changing the sym.symbols('x') to sym.Symbol('x'), which is the correct usage according to the SymPy page. However this doesn't solve the problem and gives the exact same error on the same line.
I'm running on a linux pod using docker and kubernetes, other notebooks from the DIG tutorials have worked.
Pytorch 1.8.0
Python 3.6
PyG 2.0.1
#91-Ubuntu SMP
5.4.0-81-generic
The text was updated successfully, but these errors were encountered: