Code Monkey home page Code Monkey logo

graph-neural-networks's People

Contributors

arbaazkhan2 avatar damowerko avatar fgfgama avatar luanaruiz9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graph-neural-networks's Issues

Broken package namespacing

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

GCAT/GAT - AttributeError: 'ReLU' object has no attribute 'shape'

#######################################

/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in getattr(self, name)
1129 return modules[name]
1130 raise AttributeError("'{}' object has no attribute '{}'".format(
-> 1131 type(self).name, name))
1132
1133 def setattr(self, name: str, value: Union[Tensor, 'Module']) -> None:

AttributeError: 'ReLU' object has no attribute 'shape'

#######################################
Hi!

The error inmediately appears when I start training a GAT or GCAT model. Not happening with LocalGNN model, which I can train and test without invonvenients.

Do you have any idea of what is causing it and how can I fix it? I'm working with recommender systems, so GAT or GCAT models are interesting to experiment with.

Thanks!

Best regards,
Andrés

Process finished with exit code 137 (interrupted by signal 9: SIGKILL)

Was trying to run movieGNN.py. Got the error below:

Device selected: cpu
Loading data for split 1... OK
Setting up the graph... OK
Model initialization...
	Initializing SelGNNdegG00... OK
	Initializing SelGNNedsG00... OK
	Initializing SelGNNsprG00... OK
	Initializing SelGNNcrsG00... OK
	Initializing SpctrlGNNG00... /Users/Nsherv/graph-neural-networks/Utils/graphML.py:1333: ComplexWarning: Casting complex values to real discards the imaginary part
  Lambda[e,:], V[e,:,:] = np.linalg.eig(Snp[e,:,:])
OK
Model initialization... COMPLETE

Process finished with exit code 137 (interrupted by signal 9: SIGKILL)

float32 and compatibility MPS

when running through the tutorial.ipynb configuring device='mps' as follows

if useGPU and torch.cuda.is_available():
    device = 'cuda:0'
    torch.cuda.empty_cache()
if useGPU and torch.backends.mps.is_available():
    device = 'mps'
else:
    device = 'cpu'
# Notify:
print("Device selected: %s" % device)

the cell:

thisName = hParamsAggGNN['name']

#\\\ Architecture
thisArchit = archit.AggregationGNN(# Linear
                                   hParamsAggGNN['F'],
                                   hParamsAggGNN['K'],
                                   hParamsAggGNN['bias'],
                                   # Nonlinearity
                                   hParamsAggGNN['sigma'],
                                   # Pooling
                                   hParamsAggGNN['rho'],
                                   hParamsAggGNN['alpha'],
                                   # MLP in the end
                                   hParamsAggGNN['dimLayersMLP'],
                                   # Structure
                                   G.S/np.max(np.diag(G.E)), # Normalize the adjacency matrix
                                   order = hParamsAggGNN['order'],
                                   maxN = hParamsAggGNN['Nmax'],
                                   nNodes = hParamsAggGNN['nNodes'])

#\\\ Optimizer
thisOptim = optim.Adam(thisArchit.parameters(), lr = learningRate, betas = (beta1,beta2))

#\\\ Model
AggGNN = model.Model(thisArchit,
                     lossFunction(),
                     thisOptim,
                     trainer,
                     evaluator,
                     device,
                     thisName,
                     saveDir)

#\\\ Add model to the dictionary
modelsGNN[thisName] = AggGNN

raises the error: TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

I believe MPS (apple M1 GPU) is not currently compatible with float64 and every tensor needs to be converted to float32. I'm wondering if an precision option could be added to the setup?

Broken setup.py

When trying to pip install the package, I get the following error:

ERROR: Command errored out with exit status 1:                                                                       
     command: /home/user/anaconda3/envs/mine/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tm
p/pip-req-build-wl4f41q2/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-wl4f41q2/setup.py'"'"';f=getattr(tokenize, '"'"'
open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'
"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-re0b057i                                                        
         cwd: /tmp/pip-req-build-wl4f41q2/                                                                               
    Complete output (5 lines):                                                                                           
    Traceback (most recent call last):                                                                                   
      File "<string>", line 1, in <module>                                                                               
      File "/tmp/pip-req-build-wl4f41q2/setup.py", line 3, in <module>                                                   
        with open("../README.md", "r", encoding="utf-8") as fh:                                                          
    FileNotFoundError: [Errno 2] No such file or directory: '../README.md'                                               
    ----------------------------------------
WARNING: Discarding file:///home/user/graph-neural-networks. Command errored out with exit status 1: python setup.py eg
g_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 

This is caused by the line 3 of setup.py.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.