Code Monkey home page Code Monkey logo

hotspot's Issues

RuntimeError: CUDA out of memory

Hey there,

Thanks for developing this software.

I bumped into some issues here:

There is nothing wrong when I run the example data.

But, when I try mine (~ 450 MB after pretreatment by preprocessing.py), the pipeline reported error below. Could you please help me out? I guess somewhere in the HOTSPOT.py uses gpu? is it possible to not use it?

Identifying classes in Bacteria ...
76793 plasmid contigs to be predicted ...
Traceback (most recent call last):
File "/home/disk1/HOTSPOT/HOTSPOT.py", line 181, in
logit, _ = model(sentence)
File "/home/disk1/Anaconda3/envs/hotspot/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _c all_impl
return forward_call(*input, **kwargs)
File "/home/disk1/HOTSPOT/library/model.py", line 210, in forward
feat1 = self.Trans1(sentence1)
File "/home/disk1/Anaconda3/envs/hotspot/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _c all_impl
return forward_call(*input, **kwargs)
File "/home/disk1/HOTSPOT/library/model.py", line 170, in forward
enc_src = self.encoder(src, src_mask)
File "/home/disk1/Anaconda3/envs/hotspot/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _c all_impl
return forward_call(*input, **kwargs)
File "/home/disk1/HOTSPOT/library/model.py", line 127, in forward
out = self.layers(out, out, out, mask)
File "/home/disk1/Anaconda3/envs/hotspot/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _c all_impl
return forward_call(*input, **kwargs)
File "/home/disk1/HOTSPOT/library/model.py", line 84, in forward
attention = self.attention(value, key, query, mask)
File "/home/disk1/Anaconda3/envs/hotspot/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _c all_impl
return forward_call(*input, **kwargs)
File "/home/disk1/HOTSPOT/library/model.py", line 39, in forward
energy = torch.einsum("nqhd,nkhd->nhqk", [queries, keys])
File "/home/disk1/Anaconda3/envs/hotspot/lib/python3.8/site-packages/torch/functional.py", line 358, in einsum
return einsum(equation, *_operands)
File "/home/disk1/Anaconda3/envs/hotspot/lib/python3.8/site-packages/torch/functional.py", line 360, in einsum
return _VF.einsum(equation, operands) # type: ignore[attr-defined]

RuntimeError: CUDA out of memory. Tried to allocate 978.00 MiB (GPU 0; 1.95 GiB total capacity; 898.40 MiB already a llocated; 615.62 MiB free; 938.00 MiB reserved in total by PyTorch) If reserved memory is >> allocated memory try se tting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

--threads parameter in HOTSPOT.py doesn't work accordingly

Hi there,

Great work with this tool! I'm testing it right now on my data and just realised that the --threads parameter in HOTSPOT.py doesn't work as it should. In my case I set it to 10 and it just defaulted to using all the available threads in the server. Just a heads up as this can generate some problems in the future...
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.