From fb9e84332d85af88e49186629bb0f2f452eb4746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lafage?= Date: Tue, 28 Mar 2023 17:45:28 +0200 Subject: [PATCH] Prepare release 0.8.1 (#88) * Fix argmin result display * Update changelog * Bump 0.8.1 * Update README, remove old history --- CHANGELOG.md | 10 ++++++++++ Cargo.toml | 10 +++++----- README.md | 26 +++++--------------------- doe/Cargo.toml | 2 +- ego/Cargo.toml | 8 ++++---- ego/src/egor.rs | 4 ++-- gp/Cargo.toml | 4 ++-- moe/Cargo.toml | 6 +++--- pyproject.toml | 2 +- 9 files changed, 33 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ce8e8c2..ad1b9da6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ Changes Version 0.9.0 - unreleased ========================== +Version 0.8.1 - 28/03/2023 +========================== + +* `ego`: + * Make objective and constraints training in parallel (#86) + * Lock mopta execution to allow concurrent computations (#84) + * Fix and adjust infill criterion optimmization retries strategy (#87) +* `moe`: + * Fix k-fold cross-validation (#85) + Version 0.8.0 - 10/03/2023 ========================== diff --git a/Cargo.toml b/Cargo.toml index 4c6d8922..4fb8fae7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egobox" -version = "0.8.0" +version = "0.8.1" authors = ["Rémi Lafage "] edition = "2018" description = "A toolbox for efficient global optimization" @@ -25,10 +25,10 @@ persistent-ego = ["egobox-ego/persistent"] blas = ["ndarray/blas", "egobox-gp/blas", "egobox-moe/blas", "egobox-ego/blas"] [dependencies] -egobox-doe = { version = "0.8.0", path="./doe" } -egobox-gp = { version = "0.8.0", path="./gp" } -egobox-moe = { version = "0.8.0", path="./moe", features=["persistent"] } -egobox-ego = { version = "0.8.0", path="./ego", features=["persistent"] } +egobox-doe = { version = "0.8.1", path="./doe" } +egobox-gp = { version = "0.8.1", path="./gp" } +egobox-moe = { version = "0.8.1", path="./moe", features=["persistent"] } +egobox-ego = { version = "0.8.1", path="./ego", features=["persistent"] } linfa = { version = "0.6.1", default-features = false } diff --git a/README.md b/README.md index f54d3489..b50a11d7 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,10 @@ Depending on the sub-packages you want to use, you have to add following declara ```text [dependencies] -egobox-doe = { version = "0.7.0" } -egobox-gp = { version = "0.7.0" } -egobox-moe = { version = "0.7.0" } -egobox-ego = { version = "0.7.0" } +egobox-doe = { version = "0.8.0" } +egobox-gp = { version = "0.8.0" } +egobox-moe = { version = "0.8.0" } +egobox-ego = { version = "0.8.0" } ``` ### Features @@ -74,7 +74,7 @@ Otherwise, you can choose an external BLAS/LAPACK backend available through the Thus, for instance, to use `gp` with the Intel MKL BLAS/LAPACK backend, you could specify in your `Cargo.toml` the following features: ```text [dependencies] -egobox-gp = { version = "0.7.0", features = ["blas", "linfa/intel-mkl-static"] } +egobox-gp = { version = "0.8.0", features = ["blas", "linfa/intel-mkl-static"] } ``` or you could run the `gp` example as follows: ``` bash @@ -117,19 +117,3 @@ If you find this project useful for your research, you may cite it as follows: Additionally, you may consider adding a star to the repository. This positive feedback improves the visibility of the project. -## History - -I started this library as a way to learn Rust and see if it can be used to implement algorithms like those in the SMT toolbox[^1]. As the first components (doe, gp) emerged, it appears I could translate Python code almost line by line in Rust (well... after a great deal of borrow-checker fight!) and thanks to [Rust ndarray library ecosystem](https://github.com/rust-ndarray). - -This library relies also on the [linfa project](https://github.com/rust-ml/linfa) which aims at being the "scikit-learn-like ML library for Rust". Along the way I could contribute to `linfa` by porting gaussian mixture model (`linfa-clustering/gmm`) and partial least square family methods (`linfa-pls`) confirming the fact that Python algorithms translation in Rust could be pretty straightforward. - -While I did not benchmark exactly my Rust code against SMT Python one, from my debugging sessions, I noticed I did not get such a great speed up. Actually, algorithms like `doe` and `gp` relies extensively on linear algebra and Python famous libraries `numpy`/`scipy` which are strongly optimized by calling C or Fortran compiled code. - -My guess at this point was that interest could come from some Rust algorithms built upon these initial building blocks hence I started to implement mixture of experts algorithm (`moe`) and on top surrogate-based optimization EGO algorithm (`ego`) which gives its name to the library[^2][^3]. Aside from performance, such library can also take advantage from the others [Rust selling points](https://www.rust-lang.org/). - - -[^1]: M. A. Bouhlel and J. T. Hwang and N. Bartoli and R. Lafage and J. Morlier and J. R. R. A. Martins. A Python surrogate modeling framework with derivatives. Advances in Engineering Software, 2019. - -[^2]: Bartoli, Nathalie, et al. "Adaptive modeling strategy for constrained global optimization with application to aerodynamic wing design." Aerospace Science and technology 90 (2019): 85-102. - -[^3]: Dubreuil, Sylvain, et al. "Towards an efficient global multidisciplinary design optimization algorithm." Structural and Multidisciplinary Optimization 62.4 (2020): 1739-1765. diff --git a/doe/Cargo.toml b/doe/Cargo.toml index cf99ce59..9ad55a50 100644 --- a/doe/Cargo.toml +++ b/doe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egobox-doe" -version = "0.8.0" +version = "0.8.1" authors = ["Rémi Lafage "] edition = "2018" description = "A library for design of experiments" diff --git a/ego/Cargo.toml b/ego/Cargo.toml index 2d3bc190..960e6637 100644 --- a/ego/Cargo.toml +++ b/ego/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egobox-ego" -version = "0.8.0" +version = "0.8.1" authors = ["Rémi Lafage "] edition = "2018" description = "A library for efficient global optimization" @@ -16,9 +16,9 @@ persistent = ["serde_json"] blas = ["ndarray-linalg", "linfa/ndarray-linalg", "linfa-pls/blas"] [dependencies] -egobox-doe = { version = "0.8.0", path = "../doe", features = ["serializable"] } -egobox-gp = { version = "0.8.0", path = "../gp", features = ["serializable"] } -egobox-moe = { version = "0.8.0", path = "../moe", features = ["serializable"] } +egobox-doe = { version = "0.8.1", path = "../doe", features = ["serializable"] } +egobox-gp = { version = "0.8.1", path = "../gp", features = ["serializable"] } +egobox-moe = { version = "0.8.1", path = "../moe", features = ["serializable"] } linfa = { version = "0.6.1", default-features = false } linfa-pls = { version = "0.6.1", default-features = false } diff --git a/ego/src/egor.rs b/ego/src/egor.rs index 09be4c57..bcf2eda6 100644 --- a/ego/src/egor.rs +++ b/ego/src/egor.rs @@ -93,7 +93,7 @@ use crate::mixint::*; use crate::types::*; use egobox_moe::{CorrelationSpec, MoeParams, RegressionSpec}; -use log::{debug, info}; +use log::info; use ndarray::{concatenate, Array2, ArrayBase, Axis, Data, Ix2}; use ndarray_rand::rand::SeedableRng; use rand_xoshiro::Xoshiro256Plus; @@ -301,7 +301,7 @@ impl Egor { let xtypes = self.solver.xtypes.clone(); let result = Executor::new(self.fobj.clone(), self.solver.clone()).run()?; - debug!("ARGMIN result = {}", result); + info!("{}", result); let (x_data, y_data) = result.state().clone().take_data().unwrap(); let res = if no_discrete { diff --git a/gp/Cargo.toml b/gp/Cargo.toml index df63b013..e3f4e2f7 100644 --- a/gp/Cargo.toml +++ b/gp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egobox-gp" -version = "0.8.0" +version = "0.8.1" authors = ["Rémi Lafage "] edition = "2018" description = "A library for gaussian process modeling" @@ -16,7 +16,7 @@ serializable = ["serde", "linfa/serde"] blas = ["ndarray-linalg", "linfa/ndarray-linalg", "linfa-pls/blas"] [dependencies] -egobox-doe = { version = "0.8.0", path="../doe" } +egobox-doe = { version = "0.8.1", path="../doe" } linfa = { version = "0.6.1", default-features = false } linfa-pls = { version = "0.6.1", default-features = false } diff --git a/moe/Cargo.toml b/moe/Cargo.toml index 8cabbc08..981653ca 100644 --- a/moe/Cargo.toml +++ b/moe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egobox-moe" -version = "0.8.0" +version = "0.8.1" authors = ["Rémi Lafage "] edition = "2018" description = "A library for mixture of expert gaussian processes" @@ -17,8 +17,8 @@ serializable = ["serde", "typetag", "linfa-clustering/serde", "egobox-gp/seriali blas = ["ndarray-linalg", "linfa/ndarray-linalg", "linfa-clustering/blas", "linfa-pls/blas"] [dependencies] -egobox-doe = { version = "0.8.0", path = "../doe" } -egobox-gp = { version = "0.8.0", path = "../gp" } +egobox-doe = { version = "0.8.1", path = "../doe" } +egobox-gp = { version = "0.8.1", path = "../gp" } linfa = { version = "0.6.1", default-features = false } linfa-clustering = { version = "0.6.1", default-features = false } diff --git a/pyproject.toml b/pyproject.toml index e7fd2892..1f312993 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ python-source="python" [tool.poetry] name = "egobox" -version = "0.8.0" +version = "0.8.1" description = "Python binding for egobox EGO optimizer written in Rust" authors = ["Rémi Lafage "]