njmarko / gnn-polypharmacy-ddi

Graph Neural Network (GNN) Transformer for predicting drug-drug interactions (ddi, polypharmacy) from drug molecules.
1 stars 0 forks source link

some questions #1

Open legendaryInnovation opened 1 year ago

legendaryInnovation commented 1 year ago

image how to solve it

njmarko commented 1 year ago

I will check what arguments I used, and I will respond here.

Also, I will try to update the repo as soon as I have enough time with that kind of information. I will also add deployment for this later.

legendaryInnovation commented 1 year ago

I will check what arguments I used, and I will respond here.

Also, I will try to update the repo as soon as I have enough time with that kind of information. I will also add deployment for this later.

Thank you

njmarko commented 1 year ago

The code for handling the dataset is from https://github.com/andreeadeac22/graph_coattention I will list the steps that worked for me on Windows 10 with PowerShell. I will add requirements.txt for this repo soon, so you can install them.

The first step is to download the dataset into the /data/decagon folder. cd .\data\ mkdir decagon cd .\decagon\

Download the dataset with wget (if it works, it has some problems if you are using Windows) wget http://snap.stanford.edu/decagon/bio-decagon-combo.tar.gz;

Or try to use curl curl http://snap.stanford.edu/decagon/bio-decagon-combo.tar.gz

If this doesn't work, just download the dataset manually by visiting the link http://snap.stanford.edu/decagon/bio-decagon-combo.tar.gz and chose the folder /data/decagon/ for the download location.

The next step is to unpack the data with tar tar -xvzf bio-decagon-combo.tar.gz;

After that, you can run the data_download.py script with the following arguments decagon -p decagon/

image

The progress bar doesn't seem to work in this case. Just wait until the script finishes executing. It will probably take around 10 minutes.

njmarko commented 1 year ago

The next step is to run data_preprocess.py with these arguments decagon -p ./

image

njmarko commented 1 year ago

Finally, run split_cv_data with these arguments decagon -p ./

image

njmarko commented 1 year ago

Executing split_cv_data.py takes around 20 to 30 minutes. I added requirements.txt to the repo for now. Also, there should be a folds directory in /data/decagon. I added a fix for that now, but you can also create it manually.

Let me know if these steps worked for you.

legendaryInnovation commented 1 year ago

I will try it right now. 

李培宁 @.***

 

------------------ 原始邮件 ------------------ 发件人: "Marko @.>; 发送时间: 2023年5月2日(星期二) 晚上6:10 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [njmarko/gnn-polypharmacy-ddi] some questions (Issue #1)

Executing split_cv_data.py takes around 20 to 30 minutes. I added requirements.txt to the repo for now. Also, there should be a folds directory in /data/decagon. I added a fix for that now, but you can also create it manually.

Let me know if these steps worked for you.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

legendaryInnovation commented 1 year ago

Executing split_cv_data.py takes around 20 to 30 minutes. I added requirements.txt to the repo for now. Also, there should be a folds directory in /data/decagon. I added a fix for that now, but you can also create it manually.

Let me know if these steps worked for you.

image Thank you. The previous ones are very normal. May I ask what the situation is

njmarko commented 1 year ago

Executing split_cv_data.py takes around 20 to 30 minutes. I added requirements.txt to the repo for now. Also, there should be a folds directory in /data/decagon. I added a fix for that now, but you can also create it manually. Let me know if these steps worked for you.

image Thank you. The previous ones are very normal. May I ask what the situation is

Just create a new folder named folds in the decagon folder. Structure should look something like this /data/decagon/folds/

njmarko commented 1 year ago

Also, remember to pull new changes from the repo. It should automatically create that folder now. And requirements.txt should be at the top level also. I don't see requirements.txt in your screenshot right now, so you may not have the newest version.

legendaryInnovation commented 1 year ago

Also, remember to pull new changes from the repo. It should automatically create that folder now. And requirements.txt should be at the top level also. I don't see requirements.txt in your screenshot right now, so you may not have the newest version. Thank you for your reply, but now I'm really sorry that I have a new question.

image

njmarko commented 1 year ago

Also, remember to pull new changes from the repo. It should automatically create that folder now. And requirements.txt should be at the top level also. I don't see requirements.txt in your screenshot right now, so you may not have the newest version. Thank you for your reply, but now I'm really sorry that I have a new question.

image

You should run the train.py with the following parameters, and maybe it will solve your issue -dataset decagon -input_data_path data/decagon/

legendaryInnovation commented 1 year ago

Thank you very much I want to know if this error means I need to reinstall Pytorch

AttributeError: module 'torch' has no attribute 'sparse_csc'

legendaryInnovation commented 1 year ago

Thank you very much I want to know if this error means I need to reinstall Pytorch

AttributeError: module 'torch' has no attribute 'sparse_csc'

njmarko commented 1 year ago

Thank you very much I want to know if this error means I need to reinstall Pytorch

AttributeError: module 'torch' has no attribute 'sparse_csc'

Maybe. Try creating a virtual environment, and then install the requirements that are located in the requirements.txt

legendaryInnovation commented 1 year ago

Thank you very much I want to know if this error means I need to reinstall Pytorch AttributeError: module 'torch' has no attribute 'sparse_csc'

Maybe. Try creating a virtual environment, and then install the requirements that are located in the requirements.txt

OK,I will try it at once.

njmarko commented 1 year ago

Since you are using PyCharm, you can do like this:

File > Settings > Project: gnn-polypharmacy-ddi > Python Interpreter > Add Interpreter > Add Local Interpreter > Virtualenv Environment

Then simply select a python version. I think I was using python 3.10

legendaryInnovation commented 1 year ago

Since you are using PyCharm, you can do like this:

File > Settings > Project: gnn-polypharmacy-ddi > Python Interpreter > Add Interpreter > Add Local Interpreter > Virtualenv Environment

Then simply select a python version. I think I was using python 3.10

I just reinstalled the environment, but there were more problems. Then, I used the previous environment again and displayed a new problem. May I ask what the problem is? Thank you. BrokenPipeError: [Errno 32] Broken pipe

njmarko commented 1 year ago

Since you are using PyCharm, you can do like this: File > Settings > Project: gnn-polypharmacy-ddi > Python Interpreter > Add Interpreter > Add Local Interpreter > Virtualenv Environment Then simply select a python version. I think I was using python 3.10

I just reinstalled the environment, but there were more problems. Then, I used the previous environment again and displayed a new problem. May I ask what the problem is? Thank you. BrokenPipeError: [Errno 32] Broken pipe

Not sure why that happens. Try to disable logging maybe, by commenting out wandb logging.