marqo-ai / marqo

Unified embedding generation and search engine. Also available on cloud - cloud.marqo.ai
https://www.marqo.ai/
Apache License 2.0
4.3k stars 183 forks source link

[ENHANCEMENT] Nicer error message if not enough memory #796

Open tomhamer opened 3 months ago

tomhamer commented 3 months ago

Is your feature request related to a problem? Please describe. Marqo will simply crash if it doesnt have enough memory. This is a bad user experience for users who are getting started with Marqo.

Describe the solution you'd like Marqo should check the total memory allocated on boot, and if there isnt enough memory, it should error out with a polite error message for the user. My recommendation would be to start with something simple initially like if marqo has less than 6GB allocated it errors out. It should also contain a link to the docker docs for adjusting memory usage so the user can easily work out how to fix this. If it tries to load a big model and their isnt enough memory available it should have a warning like "WARNING: attempting to load ViT/L14 but memory allocation is lower than required".

Describe alternatives you've considered None

pandu-k commented 3 months ago

It sounds like there should be an error message emitted before exiting with an error, if Marqo is attempted to be started with insufficient memory