MilesCranmer / PySR

High-Performance Symbolic Regression in Python and Julia
https://astroautomata.com/PySR
Apache License 2.0
2.09k stars 197 forks source link

Add parameter for specifying `--heap-size-hint` on spawned Julia processes #493

Closed MilesCranmer closed 6 months ago

MilesCranmer commented 6 months ago

Fixes #490 by @paulomontero and @eelregit.

This creates the heap_size_hint_in_bytes parameter which is forwarded to SymbolicRegression.jl. This allows the user to tell spawned Julia processes how much memory they can use before they should start aggressively garbage collecting (to avoid memory errors).

The default heap_size_hint_in_bytes should be enough as it is simply the current memory (on a single node) divided by the number of processes. However if you want to give processes more memory (for many node jobs) you might want specify this manually.

This PR also does some unrelated cleanup of the typing hints.