Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during convert_to_tfrecord.py #14

Open
spyda90 opened this issue Jun 10, 2019 · 10 comments
Open

Error during convert_to_tfrecord.py #14

spyda90 opened this issue Jun 10, 2019 · 10 comments

Comments

@spyda90
Copy link

spyda90 commented Jun 10, 2019

Hi,

I was trying the code for the first time in order to predict 3D structure of my target protein using a pre-trained model.
Everything was fine until running convert_to_tfrecord.py. When I do that I obtain this error:

Traceback (most recent call last):
File "../rgn-master/data_processing/convert_to_tfrecord.py", line 7, in
from utils import switch
ImportError: cannot import name switch

I'm not so strong in python. Can you help me in understanding if this is a bug of the script or there is a problem in my python/packages installation?

Thank you in advance,

Francesco

@alquraishi
Copy link
Contributor

Thanks for bringing this to my attention. I had accidentally broken the import while shuffling files around. The new updated file should work.

@spyda90
Copy link
Author

spyda90 commented Jun 10, 2019

Thank you, it now works!
I take advantage of this ticket to ask something more about running a prediction for a new sequence.
I made the first for lines reported in README file, and now everything is fine.
In order to use the protling.py, I'm making confusion about model, datasetname and example.
My goal is to predict the 3D structure of my target protein, using a model generated (for example) by CASP7 model. Can I download the model or should I have to train it?

Thank you in advance,

Francesco

@st4cks1defl0w
Copy link

Just check out Train a new model or continue training an existing model section in the README. All pretrained models are also linked in the README.

@spyda90
Copy link
Author

spyda90 commented Jun 10, 2019

Ok, I'll try tomorrow. Thank you

@spyda90
Copy link
Author

spyda90 commented Jun 11, 2019

Hi,

I think I understood how to use the script. However, after running it, I have obtained the error you can find in the attached log file. I have also attached the configuration file I used (just the CASP7.config in the distribution, with RunName and DatasetName edited). As I read in the README file, I used the script with the "-p" and "-e weighted_test" options to predict the structure contained in the "/testing" dir. I have also put the files contained in one of the "thinning" subdirectories in the main "training" dir. Could you help me solving the error?

prova.zip

@maverick0004
Copy link

@spyda90 try using -g 0, this solved the same error for me. This specifies the GPU to use while running the script. It will look something like this python protling.py RGN12/runs/CASP12/ProteinNet12Thinning90/configuration -d RGN12 -a -g 0 -p

@spyda90
Copy link
Author

spyda90 commented Jun 14, 2019

Wait a second...I have installed tensorflow and not tensorflow-gpu...could the error be due to that???

@spyda90
Copy link
Author

spyda90 commented Jun 14, 2019

Tried to install it...the error I received is pretty the same:

InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'CudnnRNNCanonicalToParams' used by node RGN/training/layer0/fw/cudnn_lstm/cudnn_lstm/CudnnRNNCanonicalToParams (defined at /home/fgreco/WORK/Projects/TES-PJ-015-NR2F6/modeling/HomologyModelling/rgn-master/model/model.py:787) with these attrs: [rnn_mode="lstm", seed2=4493, dropout=0, seed=254, num_params=8, input_mode="linear_input", T=DT_FLOAT, direction="unidirectional"]
Registered devices: [CPU, XLA_CPU]
Registered kernels:
[[node RGN/training/layer0/fw/cudnn_lstm/cudnn_lstm/CudnnRNNCanonicalToParams (defined at $PATH/HomologyModelling/rgn-master/model/model.py:787) ]]

Why it says "Registered devices: [CPU, XLA_CPU]"?
PS: also the -g0 option did the same....

@spyda90
Copy link
Author

spyda90 commented Jun 14, 2019

To note, I'm using a GTX-1050, 2GB

@alquraishi
Copy link
Contributor

GPU doesn't seem to be registered... Are you sure tensorflow-gpu is working correctly with your GPU? Can you construct and place a simple graph on the GPU?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants