Skip to content

Rust bindings for irace: Iterated Racing for Automatic Algorithm Configuration.

License

Notifications You must be signed in to change notification settings

Saethox/irace-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

irace-rs

Rust bindings for irace: Iterated Racing for Automatic Algorithm Configuration.

For more information on irace, see its documentation directly.

Disclaimer

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.

Getting Started

Requirements

Installation

Add the following to your Cargo.toml:

[dependencies]
irace-rs = { git = "https://github.com/Saethox/irace-rs" }

Restrictions

Note that because of FFI, the target runner and instance need to be Send + 'static even if no "real" multithreading happens.

Examples

See the examples directory.

MAHF

This wrapper is primarily written for usage with mahf, but works with arbitrary target algorithms.

License

This project is licensed under the GNU General Public License v3.0.

About

Rust bindings for irace: Iterated Racing for Automatic Algorithm Configuration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages