Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Lightwood models cannot be used inside JOBs #7061

Open
martyna-mindsdb opened this issue Aug 9, 2023 · 5 comments
Open

[Bug]: Lightwood models cannot be used inside JOBs #7061

martyna-mindsdb opened this issue Aug 9, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@martyna-mindsdb
Copy link
Contributor

Short description of current behavior

When running a job that queries a Lightwood model, the job run ends with an error:

error in apply predictor step: [lightwood/home_rentals_model]: 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.

It is because Lightwood models require to be run on a GPU node.

The solution is to detect whether a job contains any Lightwood model, and if it does, then run it on a GPU node.

Video or screenshots

No response

Expected behavior

No response

How to reproduce the error

No response

Anything else?

No response

@martyna-mindsdb martyna-mindsdb added the bug Something isn't working label Aug 9, 2023
@tomhuds
Copy link
Contributor

tomhuds commented Aug 10, 2023

Does lightwood need to be run on GPU?

Also possible solution: Be able to run Lightwood models on CPU?

@martyna-mindsdb
Copy link
Contributor Author

Yes - if Lightwood could run on CPU that would solve the issue as well.

@ea-rus
Copy link
Contributor

ea-rus commented Oct 30, 2023

@paxcema, is it possible to make able: train LW model on GPU node (from editor) but use it from job (can be executed on GPU or CPU node) ?

@paxcema
Copy link
Member

paxcema commented Oct 30, 2023

Lightwood can run on both CPU and GPU. The issue here has to do with storing models in one node type then trying to run them on another, so the fix is to improve LW's model loading procedures. Relevant issue: #1129

@ea-rus
Copy link
Contributor

ea-rus commented Jan 24, 2024

Should be easier to solve it in k8s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants