CM2S / piglot

A package for the optimisation of numerical responses
https://piglot.readthedocs.io
MIT License
12 stars 4 forks source link

Add CUDA support for BoTorch #19

Closed ruicoelhopedro closed 6 months ago

ruicoelhopedro commented 6 months ago

Allow specifying the compute device for the PyTorch objects in BoTorch. This allows running the optimisation in the GPU with CUDA which, locally, has been observed to be almost 6x faster than the CPU version.

However, GPU memory may be a limitation. Thus, when a CUDA out-of-memory error is raised, the optimisation falls back to the CPU automatically.

While there, fix an issue with standardising the test dataset in BoTorch.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 60.60606% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 93.61%. Comparing base (91c0501) to head (3f7e2e8).

Files Patch % Lines
piglot/optimisers/botorch/dataset.py 60.00% 8 Missing :warning:
piglot/optimisers/botorch/bayes.py 61.53% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #19 +/- ## ========================================== - Coverage 94.17% 93.61% -0.57% ========================================== Files 27 27 Lines 2113 2131 +18 ========================================== + Hits 1990 1995 +5 - Misses 123 136 +13 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.