[Feature] Expose stochastic solve method
For extremely big problems (problems too large to fit in RAM/GPU memory), the stochastic solve method from chapter 6 of the monograph is useful. This has already been implemented.
This is a tracking issue, for exposing the stochastic solve method to the public API.
Hi @akshayka, thanks for the awesome package! Do you already know when the stochastic solve method will be exposed to the public API?
Hi @psychobas, thank you for the kind words!
I do not know when the method will be exposed, or rather "officially supported", but all the code already exists and is available within this repository.
You're welcome to play around with it, though you very well may find bugs or inefficiencies.
In particular, check out
- https://github.com/cvxgrp/pymde/blob/main/pymde/problem.py#L480-L494
- https://github.com/cvxgrp/pymde/blob/main/pymde/functions/function.py#L33-L44
- https://github.com/cvxgrp/pymde/blob/main/pymde/optim.py#L186
Out of curiosity, are you interested in this feature because you need to compute a very large embedding?
Hi @akshayka
Ah great, thanks, will check that out!
Yes, I was trying to use preserve_distances on 600'000 SBERT embeddings on an A100 GPU and it failed because of memory (tried to allocate 71.53 GiB).