graph2vec icon indicating copy to clipboard operation
graph2vec copied to clipboard

No such file or directory: 'data/from.map'

Open cigrainger opened this issue 9 years ago • 2 comments

See the traceback below. This doesn't work on Ubuntu 14.04 (AWS GPU instance) running Python 2.7.6.

`In [4]: graph2vec.parse_graph('test.txt', extend_paths=2)

IOError Traceback (most recent call last) in () ----> 1 graph2vec.parse_graph('test.txt', extend_paths=2)

/usr/local/lib/python2.7/dist-packages/graph2vec/trainer.pyc in parse_graph(self, graph_path, data_dir, load_edges, extend_paths) 26 graph = parser.Graph(graph_path) 27 self.from_nodes, self.to_nodes = graph.get_mappings() ---> 28 graph.save_mappings(self.output_dir) 29 30 if load_edges:

/usr/local/lib/python2.7/dist-packages/graph2vec/parser.pyc in save_mappings(self, output_dir) 45 def save_mappings(self, output_dir): 46 ---> 47 with open(os.path.join(output_dir, 'from.map'), 'w') as from_map_file: 48 json.dump(self.from_nodes_mapping, from_map_file) 49 with open(os.path.join(output_dir, 'to.map'), 'w') as to_map_file:

IOError: [Errno 2] No such file or directory: 'data/from.map'`

cigrainger avatar Mar 06 '16 20:03 cigrainger

I ran into the same issue with Python 2.7.9 on Debian Jessie. I have no clue what is that 'data/from.map' file which must exist there.

usptact avatar Mar 23 '16 22:03 usptact

@cigrainger It looks like you need to create "data" directory and create two empty files:

  • from_to.mat
  • inverse_degrees.mat

usptact avatar Mar 23 '16 22:03 usptact