Skip to content

Commit

Permalink
Prepare release 0.8.1 (#88)
Browse files Browse the repository at this point in the history
* Fix argmin result display

* Update changelog

* Bump 0.8.1

* Update README, remove old history
  • Loading branch information
relf authored Mar 28, 2023
1 parent 898ae60 commit fb9e843
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 39 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
==========================

Expand Down
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "egobox"
version = "0.8.0"
version = "0.8.1"
authors = ["Rémi Lafage <[email protected]>"]
edition = "2018"
description = "A toolbox for efficient global optimization"
Expand All @@ -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 }

Expand Down
26 changes: 5 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
2 changes: 1 addition & 1 deletion doe/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "egobox-doe"
version = "0.8.0"
version = "0.8.1"
authors = ["Rémi Lafage <[email protected]>"]
edition = "2018"
description = "A library for design of experiments"
Expand Down
8 changes: 4 additions & 4 deletions ego/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "egobox-ego"
version = "0.8.0"
version = "0.8.1"
authors = ["Rémi Lafage <[email protected]>"]
edition = "2018"
description = "A library for efficient global optimization"
Expand All @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions ego/src/egor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -301,7 +301,7 @@ impl<O: GroupFunc, SB: SurrogateBuilder> Egor<O, SB> {
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 {
Expand Down
4 changes: 2 additions & 2 deletions gp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "egobox-gp"
version = "0.8.0"
version = "0.8.1"
authors = ["Rémi Lafage <[email protected]>"]
edition = "2018"
description = "A library for gaussian process modeling"
Expand All @@ -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 }
Expand Down
6 changes: 3 additions & 3 deletions moe/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "egobox-moe"
version = "0.8.0"
version = "0.8.1"
authors = ["Rémi Lafage <[email protected]>"]
edition = "2018"
description = "A library for mixture of expert gaussian processes"
Expand All @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"]

Expand Down

0 comments on commit fb9e843

Please sign in to comment.