pytorch-graphsage icon indicating copy to clipboard operation
pytorch-graphsage copied to clipboard

Running

Open milesgep opened this issue 6 years ago • 7 comments

How do you run train.py for ppi? What file is needed for the argument "--problem-path" so I can run it? Also for reddit because the h5 files are not working for running as well.

milesgep avatar Oct 26 '18 16:10 milesgep

There are scripts for converting data here: https://github.com/bkj/pytorch-graphsage/blob/master/utils/run-convert.sh And invocations of train here: https://github.com/bkj/pytorch-graphsage/blob/master/run.sh

You may find this repo helpful: https://github.com/bkj/graphsage-age-prediction That's a boiled down implementation of graphsage w/ instructions on running on a particular dataset.

~ Ben

bkj avatar Oct 26 '18 17:10 bkj

I am having an issue with running the run-convert.sh. I was having an assertion error with networkx so I updated it and the issue did not go away. I commented out the line causing the error and now I have this issue:

File "convert.py", line 165, in feats = np.vstack([feats[id2idx[str(id)]] for id in G.nodes()]) KeyError: '0'

Is there certain versions of packages I need for this to operate correctly?

milesgep avatar Oct 26 '18 18:10 milesgep

Yeah, likely you need an older version of pytorch. I can put a requirements.txt here later. If I don't do it in the next few days ping me here again to remind me

bkj avatar Oct 27 '18 00:10 bkj

I am making some progress now

Traceback (most recent call last): File "convert.py", line 202, in }, args.outpath) File "convert.py", line 56, in save_problem assert validate_problem(problem) File "convert.py", line 48, in validate_problem if not problem['sparse']: KeyError: 'sparse'

I am getting this error, is this line wanting to check if sparse is in the dictionary? I see prior to this that the dictionary is made with no key "sparse" so I am trying to figure out what you want to do with the line of code.

milesgep avatar Oct 27 '18 20:10 milesgep

I am having another issue where the function to_numpy(x) recursively calls itself until my program crashes. I was not having this issue earlier so I am not 100% what is causing it.

milesgep avatar Nov 01 '18 15:11 milesgep

That sounds like a pytorch version problem, I think this expectes 0.3.1, but I'll have to double check

bkj avatar Nov 01 '18 16:11 bkj

Hi,I have the same problem with you.(File "convert.py", line 48, in validate_problem if not problem['sparse']: KeyError: 'sparse') Did you solve this?

lannester666 avatar Nov 01 '22 02:11 lannester666