openvax / mhcflurry

Peptide-MHC I binding affinity prediction
http://openvax.github.io/mhcflurry/
Apache License 2.0
193 stars 58 forks source link

Running error #164

Closed jfnavarro closed 4 years ago

jfnavarro commented 4 years ago

Hi! Thanks for sharing a nice tool with a nice interface and nice documentation.

I am trying to perform some predictions but I keep getting this error

TypeError: Failed to convert object of type <class 'theano.tensor.var.TensorVariable'> to Tensor. Contents: Subtensor{int64}.0. Consider casting elements to a supported ty

No matter how I try, even with the smallest example

mhcflurry-predict-scan --sequences KLKKAASVEEGDDGQDSPGGQSRGA --alleles HLA-A*11:01 --results-all --out predictions.csv

I have to say that this machine does not have a GPU but it does have Tensorflow installed. I am using a virtual environment in Anaconda.

Do you have any idea what could be causing this issue?

timodonnell commented 4 years ago

Hi there, which version of python and tensorflow are you using?

jfnavarro commented 4 years ago

Thanks for the quick reply :) Python 3.6.1 and tensorflow 1.10.0

timodonnell commented 4 years ago

Thanks, unfortunately I don't have a great idea on exactly which tensorflow versions we can expect to work. Could you try upgrading to tensorflow==1.15.0 (this is what I've been using) and see if that helps?

timodonnell commented 4 years ago

Oh just saw you're actually using theano backend (from your original error message), i.e. not tensorflow. You'll have to switch to tensorflow for any recent version of mhcflurry. I'd recommend starting fresh in a clean conda environment and installing mhcflurry, which should pull in tensorflow 1.15 etc.

jfnavarro commented 4 years ago

Yes, that was it :) I have had problems with tensorflow with versions older than 1.12.0 before. I will close the issue. Thanks for the help!