superphy / prairiedog

next-gen pangenome graphs for predictive genomics
Other
0 stars 0 forks source link

run diffpool with an mmap of subgraphs? #45

Closed kevinkle closed 5 years ago

kevinkle commented 5 years ago
(venv) kevin@phac5021225:~/diffpool$ python -m train --bmname=ENZYMES --assign-ratio=0.1 --hidden-dim=30 --output-dim=30 --cuda=0 --num-classes=6 --method=soft-assign --benchmark-iterations=1
Remove existing log dir:  log/ENZYMES_soft-assign_l3x1_ar10_h30_o30
CUDA 0
Creating mmap array with len 600
Using node labels
Num training graphs:  0 ; Num validation graphs:  60
Number of graphs:  600
Number of edges:  37282
Max, avg, std of graph size:  125 , 32.46 , 14.87
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/kevin/diffpool/train.py", line 665, in <module>
    main()
  File "/home/kevin/diffpool/train.py", line 653, in main
    iterations=prog_args.benchmark_iterations)
  File "/home/kevin/diffpool/train.py", line 505, in benchmark_task_val
    cross_val.prepare_val_data(graphs, args, i, max_nodes=args.max_nodes)
  File "/home/kevin/diffpool/cross_val.py", line 34, in prepare_val_data
    features=args.feature_type)
  File "/home/kevin/diffpool/graph_sampler.py", line 23, in __init__
    self.feat_dim = G_list[0].node[0]['feat'].shape[0]
IndexError: index 0 is out of bounds for axis 0 with size 0
kevinkle commented 5 years ago

With some fudging, got it to run with numpy.memmap as of https://github.com/superphy/diffpool/commit/126622c7640904f1ec8460b01e44bb8cf9378d26

Will have to fix random.shuffle and cleaner split in cross_val

kevinkle commented 5 years ago

This isnt going to work, going with the #51 route