Skip to content

Commit 2f40477

Browse files
authored
Prepare release 0.22 (#192)
* Bump 0.22.0 * Updat CHANGELOG * Update Egor notebook
1 parent e7aa1ce commit 2f40477

File tree

8 files changed

+88
-126
lines changed

8 files changed

+88
-126
lines changed

CHANGELOG.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11
# Changes
22

3+
## Version 0.22.0 - 04/09/2024
4+
5+
* `ego`:
6+
* Save config and optim history by @relf in <https://github.com/relf/egobox/pull/190>
7+
* Move the DOE save after the algo the iteration (fixes #182) by @relf in <https://github.com/relf/egobox/pull/185>
8+
* Maintainance by @relf in <https://github.com/relf/egobox/pull/183>
9+
310
## Version 0.21.1 - 31/07/2024
411

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

714
## Version 0.21.0 - 09/07/2024
815

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

1422
## Version 0.20.0 - 25/06/2024
1523

16-
* Make `n_optmod` option available in Python by @relf in <https://github.com/relf/egobox/pull/161>
24+
* `gp`:
25+
* Save original parameters in trained `gp` models by @relf in <https://github.com/relf/egobox/pull/166>
26+
* Implement cross validation metric for surrogates by @relf in <https://github.com/relf/egobox/pull/167>
27+
* `ego`:
28+
* Make `n_optmod` option available in Python by @relf in <https://github.com/relf/egobox/pull/161>
29+
* Better `Egor` solver state handling by @relf in <https://github.com/relf/egobox/pull/168>
30+
* Refactor `ego` module by @relf in <https://github.com/relf/egobox/pull/169>
1731
* Add dependabot cargo ecosystem check by @relf in <https://github.com/relf/egobox/pull/163>
18-
* Save original parameters in trained `gp` models by @relf in <https://github.com/relf/egobox/pull/166>
19-
* Implement cross validation metric for surrogates by @relf in <https://github.com/relf/egobox/pull/167>
20-
* Better `Egor` solver state handling by @relf in <https://github.com/relf/egobox/pull/168>
21-
* Refactor `ego` module by @relf in <https://github.com/relf/egobox/pull/169>
2232

2333
## Version 0.19.0 - 15/05/2024
2434

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "egobox"
3-
version = "0.21.1"
3+
version = "0.22.0"
44
authors = ["Rémi Lafage <[email protected]>"]
55
edition = "2021"
66
description = "A toolbox for efficient global optimization"
@@ -31,10 +31,10 @@ persistent-moe = ["egobox-moe/persistent"]
3131
blas = ["ndarray/blas", "egobox-gp/blas", "egobox-moe/blas", "egobox-ego/blas"]
3232

3333
[dependencies]
34-
egobox-doe = { version = "0.21.1", path = "./doe" }
35-
egobox-gp = { version = "0.21.1", path = "./gp" }
36-
egobox-moe = { version = "0.21.1", path = "./moe", features = ["persistent"] }
37-
egobox-ego = { version = "0.21.1", path = "./ego", features = ["persistent"] }
34+
egobox-doe = { version = "0.22.0", path = "./doe" }
35+
egobox-gp = { version = "0.22.0", path = "./gp" }
36+
egobox-moe = { version = "0.22.0", path = "./moe", features = ["persistent"] }
37+
egobox-ego = { version = "0.22.0", path = "./ego", features = ["persistent"] }
3838

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

doc/Egor_Tutorial.ipynb

Lines changed: 54 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"name": "stdout",
2929
"output_type": "stream",
3030
"text": [
31-
"Requirement already satisfied: egobox in d:\\rlafage\\miniconda3\\lib\\site-packages (0.20.0)\n",
31+
"Requirement already satisfied: egobox in d:\\rlafage\\miniconda3\\lib\\site-packages (0.21.1)\n",
3232
"Note: you may need to restart the kernel to use updated packages.\n"
3333
]
3434
}
@@ -48,7 +48,7 @@
4848
},
4949
{
5050
"cell_type": "code",
51-
"execution_count": 1,
51+
"execution_count": 2,
5252
"id": "0edaf00f",
5353
"metadata": {},
5454
"outputs": [],
@@ -67,7 +67,7 @@
6767
},
6868
{
6969
"cell_type": "code",
70-
"execution_count": 2,
70+
"execution_count": 3,
7171
"id": "af2d82be",
7272
"metadata": {},
7373
"outputs": [],
@@ -97,7 +97,7 @@
9797
},
9898
{
9999
"cell_type": "code",
100-
"execution_count": 3,
100+
"execution_count": 4,
101101
"id": "7f6da807",
102102
"metadata": {},
103103
"outputs": [],
@@ -113,7 +113,7 @@
113113
},
114114
{
115115
"cell_type": "code",
116-
"execution_count": 4,
116+
"execution_count": 5,
117117
"id": "4c436437",
118118
"metadata": {},
119119
"outputs": [],
@@ -163,61 +163,13 @@
163163
},
164164
{
165165
"cell_type": "code",
166-
"execution_count": 5,
166+
"execution_count": 6,
167167
"metadata": {},
168168
"outputs": [],
169169
"source": [
170170
"egor = egx.Egor(xspecs_xsinx, n_cstr=n_cstr_xsinx) # see help(egor) for options"
171171
]
172172
},
173-
{
174-
"cell_type": "code",
175-
"execution_count": 6,
176-
"metadata": {},
177-
"outputs": [
178-
{
179-
"name": "stdout",
180-
"output_type": "stream",
181-
"text": [
182-
"Optimization f=[-15.12510315] at [18.93488354]\n",
183-
"Optimization history: \n",
184-
"Inputs = [[ 2.21153062]\n",
185-
" [18.77163578]\n",
186-
" [13.74920548]\n",
187-
" [21.72833442]\n",
188-
" [ 5.97804153]\n",
189-
" [18.98973962]\n",
190-
" [18.92227667]\n",
191-
" [18.93389886]\n",
192-
" [18.93605442]\n",
193-
" [18.93572528]\n",
194-
" [18.93622111]\n",
195-
" [18.93402074]\n",
196-
" [18.93488354]]\n",
197-
"Outputs = [[ 0.51375253]\n",
198-
" [-15.10305227]\n",
199-
" [ -1.23540814]\n",
200-
" [ -8.43243768]\n",
201-
" [ 1.75816467]\n",
202-
" [-15.12263089]\n",
203-
" [-15.12496448]\n",
204-
" [-15.12510181]\n",
205-
" [-15.12510265]\n",
206-
" [-15.12510302]\n",
207-
" [-15.12510239]\n",
208-
" [-15.12510206]\n",
209-
" [-15.12510315]]\n"
210-
]
211-
}
212-
],
213-
"source": [
214-
"res = egor.minimize(xsinx, max_iters=8)\n",
215-
"print(f\"Optimization f={res.y_opt} at {res.x_opt}\")\n",
216-
"print(\"Optimization history: \")\n",
217-
"print(f\"Inputs = {res.x_hist}\")\n",
218-
"print(f\"Outputs = {res.y_hist}\")"
219-
]
220-
},
221173
{
222174
"cell_type": "code",
223175
"execution_count": 7,
@@ -252,49 +204,47 @@
252204
"name": "stdout",
253205
"output_type": "stream",
254206
"text": [
255-
"Optimization f=[-5.50831454e+00 2.56893605e-04 3.19183821e-04] at [2.32952504 3.1787895 ]\n",
207+
"Optimization f=[-5.50793692e+00 -1.35143852e-04 -5.26158286e-05] at [2.32952661 3.17841031]\n",
256208
"Optimization history: \n",
257-
"Inputs = [[2.116192 3.17847263]\n",
258-
" [2.61297469 3.84215954]\n",
259-
" [0.20495463 0.12974765]\n",
260-
" [1.74609049 1.41520332]\n",
261-
" [0.78690036 2.06000352]\n",
262-
" [1.23901499 2.66900549]\n",
263-
" [2.74669922 1.80741418]\n",
264-
" [1.08051143 0.90562675]\n",
265-
" [1.83948014 0.69215265]\n",
266-
" [0.30207292 3.26147058]\n",
267-
" [2.33183324 3.22166327]\n",
268-
" [1.84609049 1.51520332]\n",
269-
" [1.9572016 1.62631444]\n",
270-
" [2.08065839 1.74977119]\n",
271-
" [2.2178326 1.8869454 ]\n",
272-
" [2.32952504 3.1787895 ]]\n",
273-
"Outputs = [[-5.29466464e+00 1.05755418e+00 -7.14251779e-01]\n",
274-
" [-6.45513422e+00 -3.28864510e+00 2.28334718e+00]\n",
275-
" [-3.34702283e-01 -2.14095739e+00 -1.96227280e+01]\n",
276-
" [-3.16129381e+00 -9.77913316e-01 -2.08566190e+00]\n",
277-
" [-2.84690389e+00 -1.76247506e+00 1.17033681e+00]\n",
278-
" [-3.90802047e+00 -1.10900911e+00 1.96037216e+00]\n",
279-
" [-4.55411340e+00 -8.60544460e+00 1.02440059e+00]\n",
280-
" [-1.98613818e+00 -3.06852892e+00 8.10095347e-01]\n",
281-
" [-2.53163279e+00 -1.48221975e+00 -3.10437001e+00]\n",
282-
" [-3.56354351e+00 7.35342282e-01 -1.09206279e+01]\n",
283-
" [-5.55349650e+00 2.41930062e-02 5.40698847e-02]\n",
284-
" [-3.36129381e+00 -6.46257395e-01 -2.29753609e+00]\n",
285-
" [-3.58351604e+00 -3.87718747e-01 -2.35904536e+00]\n",
286-
" [-3.83042958e+00 -3.06557634e-01 -2.19835191e+00]\n",
287-
" [-4.10477800e+00 -5.79857215e-01 -1.74245267e+00]\n",
288-
" [-5.50831454e+00 2.56893605e-04 3.19183821e-04]]\n"
209+
"Inputs = [[1.55335241 0.36609899]\n",
210+
" [0.48433871 1.59588025]\n",
211+
" [2.93418005 2.74753497]\n",
212+
" [2.58045769 1.77813431]\n",
213+
" [1.06805821 2.89510289]\n",
214+
" [1.48471388 3.81690289]\n",
215+
" [2.37071614 1.10296966]\n",
216+
" [0.82720969 0.44451136]\n",
217+
" [2.08425444 3.41673721]\n",
218+
" [0.08617534 2.39265705]\n",
219+
" [2.24213008 3.99999996]\n",
220+
" [2.47071614 1.20296966]\n",
221+
" [2.58182726 1.31408077]\n",
222+
" [2.63287837 1.43753756]\n",
223+
" [2.32952661 3.17841031]]\n",
224+
"Outputs = [[-1.91945140e+00 -2.59662097e+00 -2.19714000e+00]\n",
225+
" [-2.08021896e+00 -1.48190609e+00 -5.13533364e+00]\n",
226+
" [-5.68171502e+00 -1.42792021e+01 2.68270603e+00]\n",
227+
" [-4.35859200e+00 -4.70895411e+00 1.94930315e-02]\n",
228+
" [-3.96316111e+00 -1.08641233e+00 2.82595019e+00]\n",
229+
" [-5.30161677e+00 6.46292378e-01 1.65905814e+00]\n",
230+
" [-3.47368580e+00 -2.44182980e+00 -1.87313519e+00]\n",
231+
" [-1.27172105e+00 -3.43784549e+00 -1.19300768e-01]\n",
232+
" [-5.50099165e+00 1.35506108e+00 -5.26673877e-01]\n",
233+
" [-2.47883239e+00 3.38256872e-01 -2.59677570e+01]\n",
234+
" [-6.24213005e+00 1.41054706e+00 4.55267296e-01]\n",
235+
" [-3.67368580e+00 -3.50219615e+00 -1.22082043e+00]\n",
236+
" [-3.89590802e+00 -5.19899351e+00 -4.36126757e-01]\n",
237+
" [-4.07041593e+00 -6.11551899e+00 1.04566960e-04]\n",
238+
" [-5.50793692e+00 -1.35143852e-04 -5.26158286e-05]]\n"
289239
]
290240
}
291241
],
292242
"source": [
293243
"res = egor.minimize(g24, max_iters=30)\n",
294244
"print(f\"Optimization f={res.y_opt} at {res.x_opt}\")\n",
295245
"print(\"Optimization history: \")\n",
296-
"print(f\"Inputs = {res.x_hist}\")\n",
297-
"print(f\"Outputs = {res.y_hist}\")"
246+
"print(f\"Inputs = {res.x_doe}\")\n",
247+
"print(f\"Outputs = {res.y_doe}\")"
298248
]
299249
},
300250
{
@@ -399,16 +349,18 @@
399349
"text": [
400350
"Optimization f=[-15.12161154] at [19.]\n",
401351
"Optimization history: \n",
402-
"Inputs = [[14.]\n",
403-
" [ 2.]\n",
352+
"Inputs = [[22.]\n",
353+
" [ 1.]\n",
354+
" [ 9.]\n",
355+
" [25.]\n",
404356
" [21.]\n",
405-
" [22.]\n",
406357
" [20.]\n",
407358
" [19.]]\n",
408-
"Outputs = [[ -2.09283123]\n",
409-
" [ 0.68929352]\n",
359+
"Outputs = [[ -7.10960014]\n",
360+
" [ 1.78601478]\n",
361+
" [ 5.41123083]\n",
362+
" [ 11.42919546]\n",
410363
" [-11.44370682]\n",
411-
" [ -7.10960014]\n",
412364
" [-14.15453288]\n",
413365
" [-15.12161154]]\n"
414366
]
@@ -423,8 +375,8 @@
423375
"res = egor.minimize(mixint_xsinx, max_iters=30)\n",
424376
"print(f\"Optimization f={res.y_opt} at {res.x_opt}\")\n",
425377
"print(\"Optimization history: \")\n",
426-
"print(f\"Inputs = {res.x_hist}\")\n",
427-
"print(f\"Outputs = {res.y_hist}\")"
378+
"print(f\"Inputs = {res.x_doe}\")\n",
379+
"print(f\"Outputs = {res.y_doe}\")"
428380
]
429381
},
430382
{
@@ -553,8 +505,8 @@
553505
"res = egor.minimize(mixobj, max_iters=10)\n",
554506
"print(f\"Optimization f={res.y_opt} at {res.x_opt}\")\n",
555507
"print(\"Optimization history: \")\n",
556-
"print(f\"Inputs = {res.x_hist}\")\n",
557-
"print(f\"Outputs = {res.y_hist}\")"
508+
"print(f\"Inputs = {res.x_doe}\")\n",
509+
"print(f\"Outputs = {res.y_doe}\")"
558510
]
559511
},
560512
{
@@ -585,7 +537,7 @@
585537
"Help on Egor in module builtins object:\n",
586538
"\n",
587539
"class Egor(object)\n",
588-
" | 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",
540+
" | 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",
589541
" | \n",
590542
" | Optimizer constructor\n",
591543
" | \n",
@@ -681,9 +633,9 @@
681633
" | Known optimum used as stopping criterion.\n",
682634
" | \n",
683635
" | outdir (String)\n",
684-
" | Directory to write optimization history and used as search path for hot start doe\n",
636+
" | Directory to write optimization history and used as search path for warm start doe\n",
685637
" | \n",
686-
" | hot_start (bool)\n",
638+
" | warm_start (bool)\n",
687639
" | Start by loading initial doe from <outdir> directory\n",
688640
" | \n",
689641
" | seed (int >= 0)\n",

doe/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "egobox-doe"
3-
version = "0.21.1"
3+
version = "0.22.0"
44
authors = ["Rémi Lafage <[email protected]>"]
55
edition = "2021"
66
description = "A library for design of experiments"

ego/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "egobox-ego"
3-
version = "0.21.1"
3+
version = "0.22.0"
44
authors = ["Rémi Lafage <[email protected]>"]
55
edition = "2021"
66
description = "A library for efficient global optimization"
@@ -16,11 +16,11 @@ persistent = ["egobox-moe/persistent"]
1616
blas = ["ndarray-linalg", "linfa/ndarray-linalg", "linfa-pls/blas"]
1717

1818
[dependencies]
19-
egobox-doe = { version = "0.21.1", path = "../doe", features = [
19+
egobox-doe = { version = "0.22.0", path = "../doe", features = [
2020
"serializable",
2121
] }
22-
egobox-gp = { version = "0.21.1", path = "../gp", features = ["serializable"] }
23-
egobox-moe = { version = "0.21.1", path = "../moe", features = [
22+
egobox-gp = { version = "0.22.0", path = "../gp", features = ["serializable"] }
23+
egobox-moe = { version = "0.22.0", path = "../moe", features = [
2424
"serializable",
2525
] }
2626

gp/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "egobox-gp"
3-
version = "0.21.1"
3+
version = "0.22.0"
44
authors = ["Rémi Lafage <[email protected]>"]
55
edition = "2021"
66
description = "A library for gaussian process modeling"
@@ -18,7 +18,7 @@ persistent = ["serializable", "serde_json"]
1818
blas = ["ndarray-linalg", "linfa/ndarray-linalg", "linfa-pls/blas"]
1919

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

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

moe/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "egobox-moe"
3-
version = "0.21.1"
3+
version = "0.22.0"
44
authors = ["Rémi Lafage <[email protected]>"]
55
edition = "2021"
66
description = "A library for mixture of expert gaussian processes"
@@ -29,8 +29,8 @@ serializable = [
2929
blas = ["ndarray-linalg", "linfa/ndarray-linalg", "linfa-pls/blas"]
3030

3131
[dependencies]
32-
egobox-doe = { version = "0.21.1", path = "../doe" }
33-
egobox-gp = { version = "0.21.1", path = "../gp" }
32+
egobox-doe = { version = "0.22.0", path = "../doe" }
33+
egobox-gp = { version = "0.22.0", path = "../gp" }
3434

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

0 commit comments

Comments
 (0)