DeepSEA test error
arundurvasula opened this issue · comments
Hi! I'm trying to run the DeepSEA predict example, but I am running into the following error:
(py36) [arun@login3 project-sriram]$ python
Python 3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:39:56)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import kipoi
>>> model = kipoi.get_model('DeepSEA/predict')
Already up-to-date.
>>> pred = model.pipeline.predict_example()
0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/kipoi/pipeline.py", line 84, in predict_example
pred_list.append(self.model.predict_on_batch(batch['inputs']))
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/kipoi/model.py", line 757, in predict_on_batch
pred, _ = self.np_run_pred(x)
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/kipoi/model.py", line 788, in np_run_pred
pred = self.model(input)
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 206, in __call__
result = self.forward(*input, **kwargs)
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/container.py", line 64, in forward
input = module(input)
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 206, in __call__
result = self.forward(*input, **kwargs)
File "model_files/deepsea_cpu.py", line 89, in forward
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/torch/autograd/variable.py", line 63, in __getattr__
raise AttributeError(name)
AttributeError: shape
This is from running the example code here: http://kipoi.org/models/DeepSEA/predict/
I installed kipoi using pip, as well as the dependencies pybedtools, pyfaidx. I installed pytorch using conda.
Any ideas here?
It could be a version issue. Here are the versions of packages I have installed:
(py36) [arun@login3 project-sriram]$ conda list
# packages in environment at /u/home/a/arun/anaconda3/envs/py36:
#
arrow 0.12.1 <pip>
asn1crypto 0.24.0 py36_0 conda-forge
attrs 18.1.0 <pip>
bcftools 1.7 0 bioconda
bedtools 2.27.1 1 bioconda
binaryornot 0.4.4 <pip>
bzip2 1.0.6 1 conda-forge
ca-certificates 2018.4.16 0 conda-forge
certifi 2018.4.16 py36_0 conda-forge
cffi 1.11.5 py36_0 conda-forge
chardet 3.0.4 py36_0 conda-forge
click 6.7 <pip>
colorlog 3.1.4 <pip>
cookiecutter 1.6.0 <pip>
cudatoolkit 8.0 3
cudnn 6.0.21 cuda8.0_0
curl 7.60.0 0 conda-forge
enum34 1.1.6 <pip>
freetype 2.8.1 0 conda-forge
future 0.16.0 <pip>
git-lfs 2.4.2 0 conda-forge
h5py 2.8.0 <pip>
hdf5 1.10.1 2 conda-forge
htslib 1.7 0 bioconda
idna 2.7 <pip>
Jinja2 2.10 <pip>
jinja2-time 0.2.0 <pip>
jpeg 9b 2 conda-forge
kipoi 0.3.6 <pip>
krb5 1.14.6 0 conda-forge
libffi 3.2.1 3 conda-forge
libgcc 5.2.0 0
libgfortran 3.0.0 1
libpng 1.6.34 0 conda-forge
libssh2 1.8.0 2 conda-forge
libtiff 4.0.9 0 conda-forge
MarkupSafe 1.0 <pip>
mkl 2017.0.3 0
nccl 1.3.4 cuda8.0_1
ncurses 5.9 10 conda-forge
numpy 1.14.5 <pip>
numpy 1.13.1 py36_0
olefile 0.45.1 py36_0 conda-forge
openssl 1.0.2o 0 conda-forge
pandas 0.23.1 <pip>
pillow 5.1.0 py36_0 conda-forge
pip 9.0.3 py36_0 conda-forge
poyo 0.4.1 <pip>
pybedtools 0.7.10 <pip>
pycparser 2.18 py36_0 conda-forge
pyfaidx 0.5.4.1 <pip>
pysam 0.14.1 <pip>
python 3.6.5 1 conda-forge
python-dateutil 2.7.3 <pip>
pytorch 0.1.12 py36cuda8.0cudnn6.0_1
pytz 2018.4 <pip>
PyYAML 4.1 <pip>
readline 7.0 0 conda-forge
related 0.6.3 <pip>
requests 2.19.1 <pip>
setuptools 39.2.0 py36_0 conda-forge
singledispatch 3.4.0.3 <pip>
six 1.11.0 <pip>
six 1.11.0 py36_1 conda-forge
sqlite 3.20.1 2 conda-forge
tk 8.6.7 0 conda-forge
torchvision 0.1.8 py36_0
tqdm 4.23.4 <pip>
urllib3 1.23 <pip>
wheel 0.31.0 py36_0 conda-forge
whichcraft 0.4.1 <pip>
xz 5.2.3 0 conda-forge
yaml 0.1.7 0 conda-forge
zlib 1.2.11 0 conda-forge
the pytorch version seems very old. I think we used >=0.3. Can you try create a new virtual environment using:
kipoi env create DeepSEA/predict
source activate kipoi-DeepSEA__predict
Hmm weird. That command results in:
(py36) [arun@login3 project-sriram]$ kipoi env create DeepSEA/predict
INFO [kipoi.cli.env] Writing environment file: /tmp/kipoi/envfiles/2c223561
INFO [kipoi.cli.env] Loading model: DeepSEA/predict description
INFO [kipoi.remote] Update /u/home/a/arun/.kipoi/models/
Already up-to-date.
INFO [kipoi.cli.env] Inferred dataloader name: DeepSEA/predict from the model.
INFO [kipoi.cli.env] Environment name: kipoi-DeepSEA__predict
INFO [kipoi.cli.env] Output env file: /tmp/kipoi/envfiles/2c223561/kipoi-DeepSEA __predict.yaml
INFO [kipoi.cli.env] Done writing the environment file!
INFO [kipoi.cli.env] Creating conda env from file: /tmp/kipoi/envfiles/2c223561/ kipoi-DeepSEA__predict.yaml
Using Anaconda API: https://api.anaconda.org
Fetching package metadata ...............
Solving package specifications: .
NoPackagesFoundError: Dependency missing in current linux-64 channels:
- pytorch-cpu >=0.2.0 -> mkl >=2018
Traceback (most recent call last):
File "/u/home/a/arun/anaconda3/envs/py36/bin/kipoi", line 11, in <module>
sys.exit(main())
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/kipoi/__m ain__.py", line 74, in main
command_fn(args.command, sys.argv[2:])
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/kipoi/cli /env.py", line 307, in cli_main
command_fn(args.command, raw_args[1:])
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/kipoi/cli /env.py", line 231, in cli_create
kipoi.conda.create_env_from_file(env_file)
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/kipoi/con da.py", line 78, in create_env_from_file
return _call_conda(cmd_list, use_stdout=True)
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/kipoi/con da.py", line 162, in _call_conda
return _call_command("conda", extra_args, use_stdout)
File "/u/home/a/arun/anaconda3/envs/py36/lib/python3.6/site-packages/kipoi/con da.py", line 149, in _call_command
raise subprocess.CalledProcessError(return_code, cmd_list)
subprocess.CalledProcessError: Command '['conda', 'env', 'create', '--file', '/t mp/kipoi/envfiles/2c223561/kipoi-DeepSEA__predict.yaml']' returned non-zero exit status 1.
I will try and update pytorch myself and see if that helps.
Let me know if updating the pytorch fixes the error
If you keep having this problem, try updating / upgrading conda itself by conda update conda
and then try to use kipoi env create DeepSEA/predict
. also keep in mind that this command has to be run outside of environments. A similar issue with pytorch had been reported here: https://discuss.pytorch.org/t/issues-installing-pytorch-for-os-x-with-conda/11496/9
hope this helps