alelab-upenn / graph-neural-networks

Library to implement graph neural networks in PyTorch
GNU General Public License v3.0
243 stars 61 forks source link

Broken package namespacing #3

Open arpieb opened 3 years ago

arpieb commented 3 years ago

Tested the install via pip per #2 and worked fine. However, working through the tutorials and noticed:

  1. The tutorial import statements have not been updated to reflect the pypi packaged namespace
  2. Getting errors in alegnn/modules/architectures.py where incorrect module namespaces are used in evals
NameError                                 Traceback (most recent call last)
<ipython-input-45-e62203175260> in <module>
      2 
      3 #\\\ Architecture
----> 4 thisArchit = archit.AggregationGNN(# Linear
      5                                    hParamsAggGNN['F'],
      6                                    hParamsAggGNN['K'],

~/src/pytorch-learn/ENV/lib/python3.9/site-packages/alegnn/modules/architectures.py in __init__(self, dimFeatures, nFilterTaps, bias, nonlinearity, poolingFunction, poolingSize, dimLayersMLP, GSO, order, maxN, nNodes, dimLayersAggMLP)
   3031             # We need to be sure that the function 'perm' + self.reorder
   3032             # is available in the Utils.graphTools module.
-> 3033             self.permFunction = eval('Utils.graphTools.perm' + order)
   3034         else:
   3035             self.permFunction = alegnn.utils.graphTools.permIdentity

~/src/pytorch-learn/ENV/lib/python3.9/site-packages/alegnn/modules/architectures.py in <module>

NameError: name 'Utils' is not defined
Damowerko commented 3 years ago

Nice catch! Did correcting the eval fix the issue?

arpieb commented 3 years ago

I honestly got to a certain depth trying to, but there were so many I just stopped and opened the issue

Damowerko commented 3 years ago

I temporarily reverted all the changes since b32984, where this worked before. The new branch pip contains these commits now. I will update the tutorials as well.