Rust bindings for irace
: Iterated Racing for Automatic Algorithm
Configuration.
For more information on irace
, see its documentation directly.
Strictly speaking, this is not a direct wrapper of the irace
R package, but of the Python wrapper iracepy-tiny
.
The reason for this is that there is currently no way to call an R function from Rust with a callback function as
argument that is also defined in Rust without separately compiling the callback function and R function call.
While extendr
could be used to implement the compile-twice approach, this
restricts this wrapper to certain purposes.
Specifically the build process gets significantly more complex, as updates to the callback function need to be compiled
and made available to the R interpreter again.
The necessary functionality is available in PyO3
, which is why this approach was
chosen, despite having some overhead by running an additional instance of the Python interpreter.
Another approach would be to use Rcpp
and Rinside
together with bindgen
to call the irace
R package directly.
gcc
or clang
irace
R package (development version)iracepy-tiny
Python packageAdd the following to your Cargo.toml
:
[dependencies]
irace-rs = { git = "https://github.com/Saethox/irace-rs" }
Note that because of FFI, the target runner and instance need to be Send + 'static
even if no "real" multithreading
happens.
See the examples directory.
This wrapper is primarily written for usage with mahf
, but works with arbitrary
target algorithms.
This project is licensed under the GNU General Public License v3.0.