Closed rougier closed 6 years ago
Yes, I had initially set the path to "gem/data/karate.edgelist" assuming that the code will be run from GEM but modified it to "karate.edgelist" so that the user can install the package and run the code from any directory with input file.
The above error was due to inconsistency between readme and test and has been fixed. The graphreconstruction was modified to return mean square error along with MAP and precision.
Some progress (I got some pictures) but still some issues:
Num nodes: 34, num edges: 77
[Errno 2] No such file or directory: 'node2vec': 'node2vec'
Traceback (most recent call last):
File "/Users/rougier/tmp/GEM/gem/embedding/node2vec.py", line 80, in learn_embedding
call(args)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 304, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1499, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'node2vec': 'node2vec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 48, in <module>
Y, t = embedding.learn_embedding(graph=G, edge_f=None, is_weighted=True, no_python=True)
File "/Users/rougier/tmp/GEM/gem/embedding/node2vec.py", line 83, in learn_embedding
raise Exception('./node2vec not found. Please compile snap, place node2vec in the system path and grant executable permission')
Exception: ./node2vec not found. Please compile snap, place node2vec in the system path and grant executable permission
In any case, I'm totally clueless about the output (I don't know what I'm supposed to see and what is actually computed).
In the installation instructions, there is a special installation for node2vec (To install node2vec as part of the package, recompile from https://github.com/snap-stanford/snap and add node2vec executable to system path. To grant executable permission, run: chmod +x node2vec).
You can also test the rest of the methods by commenting out line 38 in test.py which loads node2vec model. But otherwise, node2vec installation is required.
For the output, I will add a toy example by the end of the day. Just to make it clear for now, test.py outputs the evaluation of graph reconstruction and network visualization on Karate dataset for all the models in the package, hence comparing them.
Continuing the thread from the JOSS review:
I think the path to
karate.edgelist
needs to be specified in the test script. Now I get: