cog icon indicating copy to clipboard operation
cog copied to clipboard

Prediction failed for an unknown reason. It might have run out of memory? (exitcode 2)

Open cudanexus opened this issue 1 year ago • 18 comments

When running locally the cog predict -i it working fine but when pushed on replicate it giving this error Traceback (most recent call last): File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/cog/server/runner.py", line 334, in predict return _predict( File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/cog/server/runner.py", line 370, in _predict for event in worker.predict(input_dict, poll=0.1): File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/cog/server/worker.py", line 135, in _wait raise FatalWorkerException( cog.server.exceptions.FatalWorkerException: Prediction failed for an unknown reason. It might have run out of memory? (exitcode 2) any idea @anotherjesse @bfirsh

cudanexus avatar Mar 08 '23 20:03 cudanexus

Same issue 🤔

arnavmehta7 avatar Apr 02 '23 05:04 arnavmehta7

Have you got any solution?

Tariqh23 avatar Apr 03 '23 13:04 Tariqh23

@anotherjesse @bfirsh

Tariqh23 avatar Apr 03 '23 13:04 Tariqh23

No solution

arnavmehta7 avatar Apr 03 '23 20:04 arnavmehta7

+1

wolfpixels avatar Apr 20 '23 22:04 wolfpixels

Hi @cudanexus. Can you please share the name of the model on Replicate?

mattt avatar Jun 21 '23 12:06 mattt

+1

AnushreeBannadabhavi avatar Jun 30 '23 18:06 AnushreeBannadabhavi

@AnushreeBannadabhavi @wolfpixels @arnavmehta7 @Tariqh23 If you're seeing the same behavior, could you please share the name of the Replicate model you're using?

mattt avatar Jun 30 '23 20:06 mattt

When running locally the cog predict -i it working fine but when pushed on replicate it giving this error Traceback (most recent call last): File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/cog/server/runner.py", line 334, in predict return _predict( File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/cog/server/runner.py", line 370, in _predict for event in worker.predict(input_dict, poll=0.1): File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/cog/server/worker.py", line 135, in _wait raise FatalWorkerException( cog.server.exceptions.FatalWorkerException: Prediction failed for an unknown reason. It might have run out of memory? (exitcode 2) any idea @anotherjesse @bfirsh

Muhammadfawad267 avatar Jul 03 '23 03:07 Muhammadfawad267

do you get the solution. Can you share with me ? Looking forward. Thanks

ZYLIM0702 avatar Jul 12 '23 09:07 ZYLIM0702

https://replicate.com/findix/sd-scripts @mattt The error occurs on this model.

makaronide avatar Jul 21 '23 01:07 makaronide

i have the same problem.https://replicate.com/archcollege/voice

Archcollege avatar Sep 25 '23 07:09 Archcollege

same here,when i run cog predict in local.

notedit avatar Nov 19 '23 14:11 notedit

Does anyone have solutions?

quocanh34 avatar Jan 01 '24 21:01 quocanh34

I came to this and fix it, maybe your predict func came to some exception that does not be catched.

notedit avatar Jan 02 '24 04:01 notedit

I've not worked on cog from a lot of time, but this might help someone:

I was able to run it locally as I had better configurations locally than the VM on which I was trying to deploy. I will suggest reducing the model size or increasing the memory of the machine on which you are trying to deploy.

Additionally try to add a try-except block and do following everywhere in the exception block:

import traceback
print(traceback.format_exc())

arnavmehta7 avatar Jan 02 '24 04:01 arnavmehta7

has anyone solved the problem?

Chyrets avatar Mar 29 '24 11:03 Chyrets

Try deploying on more powerful hardware. At least in my case, Cog really did run out of memory.

emcmanus avatar May 11 '24 16:05 emcmanus