Skip to content

Commit

Permalink
Prepare release 0.22 (#192)
Browse files Browse the repository at this point in the history
* Bump 0.22.0

* Updat CHANGELOG

* Update Egor notebook
  • Loading branch information
relf authored Sep 4, 2024
1 parent e7aa1ce commit 2f40477
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 126 deletions.
26 changes: 18 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
# Changes

## Version 0.22.0 - 04/09/2024

* `ego`:
* Save config and optim history by @relf in <https://github.com/relf/egobox/pull/190>
* Move the DOE save after the algo the iteration (fixes #182) by @relf in <https://github.com/relf/egobox/pull/185>
* Maintainance by @relf in <https://github.com/relf/egobox/pull/183>

## Version 0.21.1 - 31/07/2024

* `gp`: Fix variance gradient computation by @relf in <https://github.com/relf/egobox/pull/177>

## Version 0.21.0 - 09/07/2024

* Implement [TREGO algorithm](https://arxiv.org/abs/2101.06808) by @relf in <https://github.com/relf/egobox/pull/173>
* Fix added point count in TREGO local step by @relf in <https://github.com/relf/egobox/pull/174>
* Fix WB2S criteria scaling factor and fmin computation by @relf in <https://github.com/relf/egobox/pull/175>
* `ego`:
* Implement [TREGO algorithm](https://arxiv.org/abs/2101.06808) by @relf in <https://github.com/relf/egobox/pull/173>
* Fix added point count in TREGO local step by @relf in <https://github.com/relf/egobox/pull/174>
* Fix WB2S criteria scaling factor and fmin computation by @relf in <https://github.com/relf/egobox/pull/175>
* Prepare release 0.21 by @relf in <https://github.com/relf/egobox/pull/176>

## Version 0.20.0 - 25/06/2024

* Make `n_optmod` option available in Python by @relf in <https://github.com/relf/egobox/pull/161>
* `gp`:
* Save original parameters in trained `gp` models by @relf in <https://github.com/relf/egobox/pull/166>
* Implement cross validation metric for surrogates by @relf in <https://github.com/relf/egobox/pull/167>
* `ego`:
* Make `n_optmod` option available in Python by @relf in <https://github.com/relf/egobox/pull/161>
* Better `Egor` solver state handling by @relf in <https://github.com/relf/egobox/pull/168>
* Refactor `ego` module by @relf in <https://github.com/relf/egobox/pull/169>
* Add dependabot cargo ecosystem check by @relf in <https://github.com/relf/egobox/pull/163>
* Save original parameters in trained `gp` models by @relf in <https://github.com/relf/egobox/pull/166>
* Implement cross validation metric for surrogates by @relf in <https://github.com/relf/egobox/pull/167>
* Better `Egor` solver state handling by @relf in <https://github.com/relf/egobox/pull/168>
* Refactor `ego` module by @relf in <https://github.com/relf/egobox/pull/169>

## Version 0.19.0 - 15/05/2024

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.21.1"
version = "0.22.0"
authors = ["Rémi Lafage <[email protected]>"]
edition = "2021"
description = "A toolbox for efficient global optimization"
Expand Down Expand Up @@ -31,10 +31,10 @@ persistent-moe = ["egobox-moe/persistent"]
blas = ["ndarray/blas", "egobox-gp/blas", "egobox-moe/blas", "egobox-ego/blas"]

[dependencies]
egobox-doe = { version = "0.21.1", path = "./doe" }
egobox-gp = { version = "0.21.1", path = "./gp" }
egobox-moe = { version = "0.21.1", path = "./moe", features = ["persistent"] }
egobox-ego = { version = "0.21.1", path = "./ego", features = ["persistent"] }
egobox-doe = { version = "0.22.0", path = "./doe" }
egobox-gp = { version = "0.22.0", path = "./gp" }
egobox-moe = { version = "0.22.0", path = "./moe", features = ["persistent"] }
egobox-ego = { version = "0.22.0", path = "./ego", features = ["persistent"] }

linfa = { version = "0.7", default-features = false }

Expand Down
156 changes: 54 additions & 102 deletions doc/Egor_Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: egobox in d:\\rlafage\\miniconda3\\lib\\site-packages (0.20.0)\n",
"Requirement already satisfied: egobox in d:\\rlafage\\miniconda3\\lib\\site-packages (0.21.1)\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
Expand All @@ -48,7 +48,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"id": "0edaf00f",
"metadata": {},
"outputs": [],
Expand All @@ -67,7 +67,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"id": "af2d82be",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -97,7 +97,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"id": "7f6da807",
"metadata": {},
"outputs": [],
Expand All @@ -113,7 +113,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"id": "4c436437",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -163,61 +163,13 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"egor = egx.Egor(xspecs_xsinx, n_cstr=n_cstr_xsinx) # see help(egor) for options"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Optimization f=[-15.12510315] at [18.93488354]\n",
"Optimization history: \n",
"Inputs = [[ 2.21153062]\n",
" [18.77163578]\n",
" [13.74920548]\n",
" [21.72833442]\n",
" [ 5.97804153]\n",
" [18.98973962]\n",
" [18.92227667]\n",
" [18.93389886]\n",
" [18.93605442]\n",
" [18.93572528]\n",
" [18.93622111]\n",
" [18.93402074]\n",
" [18.93488354]]\n",
"Outputs = [[ 0.51375253]\n",
" [-15.10305227]\n",
" [ -1.23540814]\n",
" [ -8.43243768]\n",
" [ 1.75816467]\n",
" [-15.12263089]\n",
" [-15.12496448]\n",
" [-15.12510181]\n",
" [-15.12510265]\n",
" [-15.12510302]\n",
" [-15.12510239]\n",
" [-15.12510206]\n",
" [-15.12510315]]\n"
]
}
],
"source": [
"res = egor.minimize(xsinx, max_iters=8)\n",
"print(f\"Optimization f={res.y_opt} at {res.x_opt}\")\n",
"print(\"Optimization history: \")\n",
"print(f\"Inputs = {res.x_hist}\")\n",
"print(f\"Outputs = {res.y_hist}\")"
]
},
{
"cell_type": "code",
"execution_count": 7,
Expand Down Expand Up @@ -252,49 +204,47 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Optimization f=[-5.50831454e+00 2.56893605e-04 3.19183821e-04] at [2.32952504 3.1787895 ]\n",
"Optimization f=[-5.50793692e+00 -1.35143852e-04 -5.26158286e-05] at [2.32952661 3.17841031]\n",
"Optimization history: \n",
"Inputs = [[2.116192 3.17847263]\n",
" [2.61297469 3.84215954]\n",
" [0.20495463 0.12974765]\n",
" [1.74609049 1.41520332]\n",
" [0.78690036 2.06000352]\n",
" [1.23901499 2.66900549]\n",
" [2.74669922 1.80741418]\n",
" [1.08051143 0.90562675]\n",
" [1.83948014 0.69215265]\n",
" [0.30207292 3.26147058]\n",
" [2.33183324 3.22166327]\n",
" [1.84609049 1.51520332]\n",
" [1.9572016 1.62631444]\n",
" [2.08065839 1.74977119]\n",
" [2.2178326 1.8869454 ]\n",
" [2.32952504 3.1787895 ]]\n",
"Outputs = [[-5.29466464e+00 1.05755418e+00 -7.14251779e-01]\n",
" [-6.45513422e+00 -3.28864510e+00 2.28334718e+00]\n",
" [-3.34702283e-01 -2.14095739e+00 -1.96227280e+01]\n",
" [-3.16129381e+00 -9.77913316e-01 -2.08566190e+00]\n",
" [-2.84690389e+00 -1.76247506e+00 1.17033681e+00]\n",
" [-3.90802047e+00 -1.10900911e+00 1.96037216e+00]\n",
" [-4.55411340e+00 -8.60544460e+00 1.02440059e+00]\n",
" [-1.98613818e+00 -3.06852892e+00 8.10095347e-01]\n",
" [-2.53163279e+00 -1.48221975e+00 -3.10437001e+00]\n",
" [-3.56354351e+00 7.35342282e-01 -1.09206279e+01]\n",
" [-5.55349650e+00 2.41930062e-02 5.40698847e-02]\n",
" [-3.36129381e+00 -6.46257395e-01 -2.29753609e+00]\n",
" [-3.58351604e+00 -3.87718747e-01 -2.35904536e+00]\n",
" [-3.83042958e+00 -3.06557634e-01 -2.19835191e+00]\n",
" [-4.10477800e+00 -5.79857215e-01 -1.74245267e+00]\n",
" [-5.50831454e+00 2.56893605e-04 3.19183821e-04]]\n"
"Inputs = [[1.55335241 0.36609899]\n",
" [0.48433871 1.59588025]\n",
" [2.93418005 2.74753497]\n",
" [2.58045769 1.77813431]\n",
" [1.06805821 2.89510289]\n",
" [1.48471388 3.81690289]\n",
" [2.37071614 1.10296966]\n",
" [0.82720969 0.44451136]\n",
" [2.08425444 3.41673721]\n",
" [0.08617534 2.39265705]\n",
" [2.24213008 3.99999996]\n",
" [2.47071614 1.20296966]\n",
" [2.58182726 1.31408077]\n",
" [2.63287837 1.43753756]\n",
" [2.32952661 3.17841031]]\n",
"Outputs = [[-1.91945140e+00 -2.59662097e+00 -2.19714000e+00]\n",
" [-2.08021896e+00 -1.48190609e+00 -5.13533364e+00]\n",
" [-5.68171502e+00 -1.42792021e+01 2.68270603e+00]\n",
" [-4.35859200e+00 -4.70895411e+00 1.94930315e-02]\n",
" [-3.96316111e+00 -1.08641233e+00 2.82595019e+00]\n",
" [-5.30161677e+00 6.46292378e-01 1.65905814e+00]\n",
" [-3.47368580e+00 -2.44182980e+00 -1.87313519e+00]\n",
" [-1.27172105e+00 -3.43784549e+00 -1.19300768e-01]\n",
" [-5.50099165e+00 1.35506108e+00 -5.26673877e-01]\n",
" [-2.47883239e+00 3.38256872e-01 -2.59677570e+01]\n",
" [-6.24213005e+00 1.41054706e+00 4.55267296e-01]\n",
" [-3.67368580e+00 -3.50219615e+00 -1.22082043e+00]\n",
" [-3.89590802e+00 -5.19899351e+00 -4.36126757e-01]\n",
" [-4.07041593e+00 -6.11551899e+00 1.04566960e-04]\n",
" [-5.50793692e+00 -1.35143852e-04 -5.26158286e-05]]\n"
]
}
],
"source": [
"res = egor.minimize(g24, max_iters=30)\n",
"print(f\"Optimization f={res.y_opt} at {res.x_opt}\")\n",
"print(\"Optimization history: \")\n",
"print(f\"Inputs = {res.x_hist}\")\n",
"print(f\"Outputs = {res.y_hist}\")"
"print(f\"Inputs = {res.x_doe}\")\n",
"print(f\"Outputs = {res.y_doe}\")"
]
},
{
Expand Down Expand Up @@ -399,16 +349,18 @@
"text": [
"Optimization f=[-15.12161154] at [19.]\n",
"Optimization history: \n",
"Inputs = [[14.]\n",
" [ 2.]\n",
"Inputs = [[22.]\n",
" [ 1.]\n",
" [ 9.]\n",
" [25.]\n",
" [21.]\n",
" [22.]\n",
" [20.]\n",
" [19.]]\n",
"Outputs = [[ -2.09283123]\n",
" [ 0.68929352]\n",
"Outputs = [[ -7.10960014]\n",
" [ 1.78601478]\n",
" [ 5.41123083]\n",
" [ 11.42919546]\n",
" [-11.44370682]\n",
" [ -7.10960014]\n",
" [-14.15453288]\n",
" [-15.12161154]]\n"
]
Expand All @@ -423,8 +375,8 @@
"res = egor.minimize(mixint_xsinx, max_iters=30)\n",
"print(f\"Optimization f={res.y_opt} at {res.x_opt}\")\n",
"print(\"Optimization history: \")\n",
"print(f\"Inputs = {res.x_hist}\")\n",
"print(f\"Outputs = {res.y_hist}\")"
"print(f\"Inputs = {res.x_doe}\")\n",
"print(f\"Outputs = {res.y_doe}\")"
]
},
{
Expand Down Expand Up @@ -553,8 +505,8 @@
"res = egor.minimize(mixobj, max_iters=10)\n",
"print(f\"Optimization f={res.y_opt} at {res.x_opt}\")\n",
"print(\"Optimization history: \")\n",
"print(f\"Inputs = {res.x_hist}\")\n",
"print(f\"Outputs = {res.y_hist}\")"
"print(f\"Inputs = {res.x_doe}\")\n",
"print(f\"Outputs = {res.y_doe}\")"
]
},
{
Expand Down Expand Up @@ -585,7 +537,7 @@
"Help on Egor in module builtins object:\n",
"\n",
"class Egor(object)\n",
" | Egor(xspecs, n_cstr=0, cstr_tol=None, n_start=20, n_doe=0, doe=None, regr_spec=Ellipsis, corr_spec=Ellipsis, infill_strategy=Ellipsis, q_points=1, par_infill_strategy=Ellipsis, infill_optimizer=Ellipsis, kpls_dim=None, trego=False, n_clusters=1, n_optmod=1, target=Ellipsis, outdir=None, hot_start=False, seed=None)\n",
" | Egor(xspecs, n_cstr=0, cstr_tol=None, n_start=20, n_doe=0, doe=None, regr_spec=Ellipsis, corr_spec=Ellipsis, infill_strategy=Ellipsis, q_points=1, par_infill_strategy=Ellipsis, infill_optimizer=Ellipsis, kpls_dim=None, trego=False, n_clusters=1, n_optmod=1, target=Ellipsis, outdir=None, warm_start=False, seed=None)\n",
" | \n",
" | Optimizer constructor\n",
" | \n",
Expand Down Expand Up @@ -681,9 +633,9 @@
" | Known optimum used as stopping criterion.\n",
" | \n",
" | outdir (String)\n",
" | Directory to write optimization history and used as search path for hot start doe\n",
" | Directory to write optimization history and used as search path for warm start doe\n",
" | \n",
" | hot_start (bool)\n",
" | warm_start (bool)\n",
" | Start by loading initial doe from <outdir> directory\n",
" | \n",
" | seed (int >= 0)\n",
Expand Down
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.21.1"
version = "0.22.0"
authors = ["Rémi Lafage <[email protected]>"]
edition = "2021"
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.21.1"
version = "0.22.0"
authors = ["Rémi Lafage <[email protected]>"]
edition = "2021"
description = "A library for efficient global optimization"
Expand All @@ -16,11 +16,11 @@ persistent = ["egobox-moe/persistent"]
blas = ["ndarray-linalg", "linfa/ndarray-linalg", "linfa-pls/blas"]

[dependencies]
egobox-doe = { version = "0.21.1", path = "../doe", features = [
egobox-doe = { version = "0.22.0", path = "../doe", features = [
"serializable",
] }
egobox-gp = { version = "0.21.1", path = "../gp", features = ["serializable"] }
egobox-moe = { version = "0.21.1", path = "../moe", features = [
egobox-gp = { version = "0.22.0", path = "../gp", features = ["serializable"] }
egobox-moe = { version = "0.22.0", path = "../moe", features = [
"serializable",
] }

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.21.1"
version = "0.22.0"
authors = ["Rémi Lafage <[email protected]>"]
edition = "2021"
description = "A library for gaussian process modeling"
Expand All @@ -18,7 +18,7 @@ persistent = ["serializable", "serde_json"]
blas = ["ndarray-linalg", "linfa/ndarray-linalg", "linfa-pls/blas"]

[dependencies]
egobox-doe = { version = "0.21.1", path = "../doe" }
egobox-doe = { version = "0.22.0", path = "../doe" }

linfa = { version = "0.7", default-features = false }
linfa-pls = { version = "0.7", 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.21.1"
version = "0.22.0"
authors = ["Rémi Lafage <[email protected]>"]
edition = "2021"
description = "A library for mixture of expert gaussian processes"
Expand Down Expand Up @@ -29,8 +29,8 @@ serializable = [
blas = ["ndarray-linalg", "linfa/ndarray-linalg", "linfa-pls/blas"]

[dependencies]
egobox-doe = { version = "0.21.1", path = "../doe" }
egobox-gp = { version = "0.21.1", path = "../gp" }
egobox-doe = { version = "0.22.0", path = "../doe" }
egobox-gp = { version = "0.22.0", path = "../gp" }

linfa = { version = "0.7", default-features = false }
linfa-clustering = { version = "0.7", default-features = false }
Expand Down
Loading

0 comments on commit 2f40477

Please sign in to comment.