hkmztrk / DeepDTA

215 stars 107 forks source link

I’ve tested on my mac #2

Closed yuanjun closed 5 years ago

yuanjun commented 5 years ago

Hi, I've tried to run your code on my Mac, after I input the command the terminal just looks like this. Would you take a look, and see if this is normal?

_YJMacAir:source yuanjun$ sudo python3 run_experiments.py --num_windows 32 --seq_window_lengths 8 12 --smi_window_lengths 4 8 --batch_size 256 --num_epoch 100 --max_seq_len 1000 --max_smi_len 100 --dataset_path 'data/kiba/‘ --problem_type 1 --log_dir 'logs'

hkmztrk commented 5 years ago

Hi @yuanjun, first of all, I couldn't run the code on Windows environment, since I couldn't find a proper Windows machine, so yeah, it'd be safer if you run it on a Linux-based os.

So what exactly is the problem on Mac? I'm adding you the screenshot of my run here on OpenSuse. You should see some Tensorflow related messages and then, messages from the code stating the process.

screenshot1

You can also just add the command to a sh file and use "bash go.sh" which I actually included in source folder just now.

yuanjun commented 5 years ago

Hi @hkmztrk thanks for your prompt reply, I've followed your suggestion and run bash file again. seems the code is running for a while, and on one stage there is another new error info showed as below.

Are pydot and Graphviz necessary for this code?

================================================ Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pydot.py", line 1861, in create stderr=subprocess.PIPE, stdout=subprocess.PIPE) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 709, in init restore_signals, start_new_session) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1344, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'dot': 'dot'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 26, in _check_pydot pydot.Dot.create(pydot.Dot()) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pydot.py", line 1867, in create raise OSError(*args) FileNotFoundError: [Errno 2] "dot" not found in path.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "run_experiments.py", line 547, in run_regression( FLAGS ) File "run_experiments.py", line 534, in run_regression experiment(FLAGS, perfmeasure, deepmethod) File "run_experiments.py", line 520, in experiment perfmeasure, deepmethod, FLAGS, dataset) File "run_experiments.py", line 269, in nfold_1_2_3_setting_sample measure, runmethod, FLAGS, train_sets, val_sets) File "run_experiments.py", line 364, in general_nfold_cv gridmodel = runmethod(FLAGS, param1value, param2value, param3value) File "run_experiments.py", line 142, in build_combined_categorical plot_model(interactionModel, to_file='figures/build_combined_categorical.png') File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 132, in plot_model dot = model_to_dot(model, show_shapes, show_layer_names, rankdir) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 55, in model_to_dot _check_pydot() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 29, in _check_pydot 'pydot failed to call GraphViz.' OSError: pydot failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ensure that its executables are in the $PATH.

hkmztrk commented 5 years ago

Hi @yuanjun, i think this problem is also referenced here

Could you try commenting out plot_model in line 142 of "run_experiments.py" or try the other suggestions in the link?

yuanjun commented 5 years ago

hi @hkmztrk, i've successfully finish the calculation, thanks for your help~! really appreciate

hkmztrk commented 5 years ago

Hello @yuanjun, glad it worked! I'll be doing modifications so that it'll be a lot easier to use your own data.

@Running-z, I'll try to do the mentioned update in the following weeks.