BayesianOptimizer
The optimizer API supports:
- Local and remote evaluation backends.
- Explicit inequality constraints using
<=and>=. - Trial-history exports as explicit records with
parametersandobjectives. - Typed failures for configuration, transport, contract, and execution errors.
mdo_framework.optimization.optimizer.BayesianOptimizer
Bayesian Optimizer using Ax Platform.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
evaluator
|
Evaluator
|
Local or Remote implementation of Evaluator protocol. |
required |
parameters
|
list[dict[str, Any]]
|
Dict defining the variables bounds, choices, and types. |
required |
objectives
|
list[dict[str, Any]]
|
Dict defining the targeted metrics and their directions. |
required |
constraints
|
list[dict[str, Any]] | None
|
Dict defining boundaries mapped out of GEMSEO evaluations. |
None
|
fidelity_parameter
|
str | None
|
Name of variable designating multi-fidelity. |
None
|
use_bonsai
|
bool
|
Toggle for experimental algorithmic execution. |
False
|
parameter_constraints
|
list[str] | None
|
List of string-based constraints on the search space parameters. |
None
|
Source code in src/mdo_framework/optimization/optimizer.py
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | |
explore(n_samples=10, n_processes=1)
Runs a Design of Experiments (DOE) exploration using GEMSEO DOEScenario.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n_samples
|
int
|
Number of samples to evaluate. |
10
|
n_processes
|
int
|
Number of concurrent processes. |
1
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary containing the exploration history. |
Source code in src/mdo_framework/optimization/optimizer.py
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | |
optimize(n_steps=5, n_init=5)
Runs the optimization loop using GEMSEO MDOScenario.
Source code in src/mdo_framework/optimization/optimizer.py
458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | |
Evaluator
mdo_framework.optimization.optimizer.Evaluator
Bases: Protocol
Source code in src/mdo_framework/optimization/optimizer.py
186 187 188 189 190 191 192 193 | |
evaluate(parameters, objectives)
Evaluates the requested objectives given the design parameters.
Source code in src/mdo_framework/optimization/optimizer.py
187 188 189 190 191 192 193 | |
LocalEvaluator
mdo_framework.core.evaluators.LocalEvaluator
Evaluates the design parameters locally using a GEMSEO MDA instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
problem
|
Discipline
|
An instantiated GEMSEO MDA (or Discipline) object. |
required |
Source code in src/mdo_framework/core/evaluators.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
RemoteEvaluator
RemoteEvaluator distinguishes transport failures from invalid execution-service responses so service layers can map them to different HTTP statuses.
mdo_framework.optimization.optimizer.RemoteEvaluator
Evaluates the design parameters remotely by communicating with the Execution microservice.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_url
|
str
|
The URL of the execution service. |
required |
Source code in src/mdo_framework/optimization/optimizer.py
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | |