lkinman / SIREn

Automated detection of structural blocks in cryo-EM volume ensembles
1 stars 2 forks source link

Running eval_model.py on CPUs #3

Open Cookiemaster33 opened 3 months ago

Cookiemaster33 commented 3 months ago

Hi there.

Is there any way running eval_model.py with CPUs?

I am getting the error message:

RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.

I tried to add, modify the script to get around this issue, but was not very successful.

Any suggestions appreciated.

Best

Toby

eval_model_error
lkinman commented 3 months ago

Hi Toby,

Given how much cryo-EM data processing is GPU-enabled, we haven't benchmarked performance on CPU-only machines. We can look into this and get back to you soon, but it might take a day or so.

In the meantime, is it possible to run on a GPU-equipped machine? I would also be curious to know why you're running the command as python eval_model.py rather than siren eval_model -- if there were installation challenges that prevented you from finishing installation, that would be useful for us to know and we'd be happy to help troubleshoot.

-Laurel

Cookiemaster33 commented 3 months ago

Hi Laurel.

We want to use eval_model.py as part of a bigger pipeline that runs on CPU-only clusters. I have to admit this is a very specific case, so understand if implementing CPU-only would be too much of a hassle.

Concerning installation. It was just easier/faster for me to just install the packages and run it with python command, instead of making an environment etc. Also as we want to run it on a cluster it sometimes can be easier for us doing it that way, as conda sometimes can be not installed or misconfigured. So again, a very user specific case.

Best

Toby

mariacarreira commented 3 months ago

Hi Toby,

Thanks again for your message, and sorry for the delay in getting back to you. We have updated the script so you can run it on CPU-only machines (we did some minor edits to how we are loading the model). It worked on our end for both CPU-only and GPU-powered machines but let us know if you run into any issues.

Best, Maria

Cookiemaster33 commented 2 months ago

Hi Maria.

Really appreciate it.

I haven't had time yet to test it.

But as you made the effort to do this, I just wanted to let you know that this will not go to waste. Just was busy with other stuff.

I'll keep you posted.

Thanks again for the effort.

Best

Toby

On Thu, May 23, 2024, 4:53 PM Maria Carreira @.***> wrote:

Hi Toby,

Thanks again for your message, and sorry for the delay in getting back to you. We have updated the script so you can run it on CPU-only machines (we did some minor edits to how we are loading the model). It worked on our end for both CPU-only and GPU-only machines but let us know if you run into any issues.

Best, Maria

— Reply to this email directly, view it on GitHub https://github.com/lkinman/SIREn/issues/3#issuecomment-2128000396, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCG73ESO65E7ORTTAIK3SQ3ZDZJNJAVCNFSM6AAAAABHLQ4IYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRYGAYDAMZZGY . You are receiving this because you authored the thread.Message ID: @.***>