pymde icon indicating copy to clipboard operation
pymde copied to clipboard

[Feature] Expose stochastic solve method

Open akshayka opened this issue 4 years ago • 3 comments

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.

akshayka avatar Mar 26 '21 15:03 akshayka

Hi @akshayka, thanks for the awesome package! Do you already know when the stochastic solve method will be exposed to the public API?

psychobas avatar Dec 02 '21 10:12 psychobas

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?

akshayka avatar Dec 03 '21 19:12 akshayka

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).

psychobas avatar Dec 05 '21 08:12 psychobas