r/HPC • • Apr 30 '23

I made a Python package to do adaptive sampling of functions in parallel [OC]

76 Upvotes

3 comments sorted by

8

u/basnijholt Apr 30 '23

🚀 github.com/python-adaptive/adaptive

Numerical evaluation of functions can be greatly improved by focusing on the interesting regions rather than using a manually-defined homogeneous grid. My colleagues and I have created Adaptive, an open-source Python package that intelligently samples functions by analyzing existing data and planning on the fly. With just a few lines of code, you can define your goals, evaluate functions on a computing cluster, and visualize the data in real-time.

Adaptive can handle averaging of stochastic functions, interpolation of vector-valued one and two-dimensional functions, and one-dimensional integration. In my work, using Adaptive led to a ten-fold speed increase over a homogeneous grid, reducing computation time from three months on 1000 cores to just one week!

Explore and star ⭐️ the repo on github.com/python-adaptive/adaptive, and check out the documentation at adaptive.readthedocs.io.

Give it a try with pip install adaptive[notebook] or conda install adaptive!

P.S. Adaptive has already been featured in several scientific publications! Browse the tutorial for examples.

4

u/Rodbourn Apr 30 '23

Alright, I'm going to have to take a look. How similar is this to adaptive mesh refinement?

7

u/sam1902 Apr 30 '23

This screams “best way to explore hyper-parameter space” to me. Great job!