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