jessieren / DeepVirFinder

Identifying viruses from metagenomic data by deep learning
Other
116 stars 32 forks source link

compiling the node error #20

Open wolfQK opened 3 years ago

wolfQK commented 3 years ago

Hi, I installed DeepVirFinder Dependencies via conda with command:" conda install python=3.6 numpy theano=1.0.3 keras=2.2.4 scikit-learn Biopython h5py=2.10.0 mkl-service=2.3.0", for I got "AttributeError: 'str' object has no attribute 'decode' " error(https://github.com/jessieren/DeepVirFinder/issues/18), and I cannot import theano because the lack of mkl-service. I solved problems above, and re-installed DeepVirFinder Dependencies, but now I got mystery error like this: ''' You can find the C code in this temporary file: /tmp/theano_compilation_error_kp_1iqu4 Traceback (most recent call last): File "/test/.conda/envs/DeepVirFinder-1.0/DeepVirFinder/dvf.py", line 131, in modDict[contigLengthk] = load_model(os.path.join(modDir, modName)) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/engine/saving.py", line 419, in load_model model = _deserialize_model(f, custom_objects, compile) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/engine/saving.py", line 225, in _deserialize_model model = model_from_config(model_config, custom_objects=custom_objects) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/engine/saving.py", line 458, in model_from_config return deserialize(config, custom_objects=custom_objects) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/layers/init.py", line 55, in deserialize printable_module_name='layer') File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 145, in deserialize_keras_object list(custom_objects.items()))) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/engine/network.py", line 1032, in from_config process_node(layer, node_data) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/engine/network.py", line 991, in process_node layer(unpack_singleton(input_tensors), kwargs) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/engine/base_layer.py", line 431, in call self.build(unpack_singleton(input_shapes)) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/layers/convolutional.py", line 141, in build constraint=self.kernel_constraint) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, *kwargs) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/engine/base_layer.py", line 249, in add_weight weight = K.variable(initializer(shape), File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/initializers.py", line 218, in call dtype=dtype, seed=self.seed) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/keras/backend/theano_backend.py", line 2600, in random_uniform return rng.uniform(shape, low=minval, high=maxval, dtype=dtype) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/sandbox/rng_mrg.py", line 872, in uniform rstates = self.get_substream_rstates(nstreams, dtype) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/configparser.py", line 117, in res return f(args, kwargs) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/sandbox/rng_mrg.py", line 779, in get_substream_rstates multMatVect(rval[0], A1p72, M1, A2p72, M2) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/sandbox/rng_mrg.py", line 62, in multMatVect [A_sym, s_sym, m_sym, A2_sym, s2_sym, m2_sym], o, profile=False) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/compile/function.py", line 317, in function output_keys=output_keys) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/compile/pfunc.py", line 486, in pfunc output_keys=output_keys) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/compile/function_module.py", line 1841, in orig_function fn = m.create(defaults) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/compile/function_module.py", line 1715, in create input_storage=input_storage_lists, storage_map=storage_map) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/gof/link.py", line 699, in make_thunk storage_map=storage_map)[:3] File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/gof/vm.py", line 1091, in make_all impl=impl)) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/gof/op.py", line 955, in make_thunk no_recycling) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/gof/op.py", line 858, in make_c_thunk output_storage=node_output_storage) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/gof/cc.py", line 1217, in make_thunk keep_lock=keep_lock) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/gof/cc.py", line 1157, in compile keep_lock=keep_lock) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/gof/cc.py", line 1620, in cthunk_factory key=key, lnk=self, keep_lock=keep_lock) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/gof/cmodule.py", line 1181, in module_from_key module = lnk.compile_cmodule(location) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/gof/cc.py", line 1523, in compile_cmodule preargs=preargs) File "/test/.conda/envs/DeepVirFinder-1.0/lib/python3.6/site-packages/theano/gof/cmodule.py", line 2388, in compile_str (status, compile_stderr.replace('\n', '. '))) Exception: ('The following error happened while compiling the node', DotModulo(A, s, m, A2, s2, m2), '\n', "Compilation failed (return status=1): /tmp/cczygCtx.s: Assembler messages:. /tmp/cczygCtx.s:7455: Error: no such instruction: vinserti128 $0x1,%xmm0,%ymm1,%ymm0'. /tmp/cczygCtx.s:7475: Error: no such instruction:vinserti128 $0x1,%xmm1,%ymm0,%ymm0'. ", '[DotModulo(A, s, m, A2, s2, m2)]') ''' I have no idea about this error, hope you can help me, Thank you very much!

jessieren commented 3 years ago

Thanks for reporting the error. Can you try to create an virtual environment and install DVF there?

conda create --name dvf python=3.6 numpy theano=1.0.3 keras=2.2.4 scikit-learn Biopython h5py source activate dvf

wolfQK commented 3 years ago

Thank you for your reply! In fact, I installed DeepVirFinder Dependencies like this: 1) conda create -p /test/.conda/envs/DeepVirFinder-1.0 2) conda activate /test/.conda/envs/DeepVirFinder-1.0 3) conda install python=3.6 numpy theano=1.0.3 keras=2.2.4 scikit-learn Biopython h5py=2.10.0 mkl-service=2.3.0 4) copy DeepVirFinder source code to dir /test/.conda/envs/DeepVirFinder-1.0 Then I ran DeepVirFinder with command" python3=/test/.conda/envs/DeepVirFinder-1.0/bin/python3.6 deepvirfinder=/test/.conda/envs/DeepVirFinder-1.0/DeepVirFinder/dvf.py contigs=/test/data/R2009003427_2_20201228.contigs.fa outdir=/test/data $python3 $deepvirfinder -i $contigs -o $outdir -l 200 -c 4", all these command is written in a shell script, and then I got errors above. Thanks!