Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a bayesian opimization algorithm for CADET-Process based on ax #34

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
e09b810
Add AxInterface
schmoelder Jun 24, 2023
9b5ff46
Add Ax documentation
schmoelder Jun 24, 2023
03d1865
WIP: Add behaviour tests for optimizers
schmoelder Jun 24, 2023
f89beb4
WIP: Add unit tests for Ax
schmoelder Jun 24, 2023
87cfc98
Make setting constraint values prettier
schmoelder Jun 26, 2023
227d439
refactor reinitiation and generation of init samples in ax
flo-schu Jun 26, 2023
4471890
subclass AxInterface for user exposed optimizer classes
flo-schu Jun 27, 2023
30036b6
expose only API classes to user in AxAdapter.py
flo-schu Jun 28, 2023
31153e8
clean up axadapter
flo-schu Jun 29, 2023
0418cbd
Add n_cores to runner
schmoelder Jun 29, 2023
257014a
Use population interface for constraint violation
schmoelder Jun 29, 2023
e27c151
Disable linear equality contraints for Ax
flo-schu Jul 7, 2023
8db2baf
Fix problems from rebasing on dev
flo-schu Nov 8, 2023
5fc6ec7
Implement early stopping strategy for Ax
flo-schu Nov 8, 2023
17131f7
Add optimization problems from surrogate model branch
flo-schu Nov 8, 2023
9d54c96
switch to x from x_untransformed
flo-schu Nov 8, 2023
a512ec7
Test TrustConstr 5/7 TestProblems green
flo-schu Nov 14, 2023
7401ebd
Quick fix: Ax import
flo-schu Dec 6, 2023
73e6567
Use ParallelizationBackend in AxRunner
flo-schu Dec 6, 2023
06df6e6
Update default parameters of AxAdapter
flo-schu Dec 6, 2023
f4a994b
Refactor GP training call
flo-schu Dec 6, 2023
b4067b0
Update Ax to 0.3.5 and use new LogExpectedImprovement acquisition fun…
flo-schu Dec 6, 2023
78e9c15
raise NotImplementedError in BotorchModular and remvove excess import…
flo-schu Dec 6, 2023
96fa3ad
Update test methods
flo-schu Dec 6, 2023
b1285aa
Reorganize import statements
flo-schu Dec 6, 2023
589c022
WIP: Organize and comment optimizers in test_optimizer_behavior
flo-schu Dec 6, 2023
7beef24
add inline comment about the convergence test
flo-schu Dec 6, 2023
cf71497
Configure tool.pytest in setup.cfg
flo-schu Dec 6, 2023
da29dde
Update ax documentation
schmoelder Dec 9, 2023
2fd04f0
Update ax import
schmoelder Dec 9, 2023
f93c676
Add x0 and precision arguments to fixtures
flo-schu Dec 12, 2023
99d4367
Organize imports
flo-schu Dec 12, 2023
087412d
Add Optimizer setup section
flo-schu Dec 12, 2023
f846dba
Add ACCURACY_DECIMAL global variable to test_if_solved call
flo-schu Dec 12, 2023
5be6dfd
Organize optimizer test factory
flo-schu Dec 12, 2023
08c0747
Implement acceptance of a fraction of failed tests (helps moo optimiz…
flo-schu Dec 18, 2023
9abed29
Avoid comparing to zero whenever possible to have better rtols
flo-schu Dec 18, 2023
225ea81
fix bug, passed wrong arguments to assert_allclose
flo-schu Dec 18, 2023
e665567
adapt tolerances and add explanatory comments
flo-schu Dec 18, 2023
5274fdc
exclude Rosenbrock-SLSQP test. Cannot be solved with SLSQP
flo-schu Dec 18, 2023
daa6653
Implement skip combinations
flo-schu Dec 18, 2023
62ce922
correct arguments of optimizers
flo-schu Dec 18, 2023
7df21dd
Add warning if a number of elements was not matched
flo-schu Feb 1, 2024
6e52472
Remove method="chebyshev" from create_initial_values method after rebase
flo-schu Feb 2, 2024
c0e8bb7
Add warning that x0 cannot be provided to the Ax interface
flo-schu Feb 2, 2024
a458710
Add test if optimizer supports single_objective.
flo-schu Feb 2, 2024
87893ba
fix import statement
flo-schu Feb 2, 2024
6f5e383
Relax linear_constraints on LinearNonlinearConstraintsMooTestProblem
flo-schu Feb 2, 2024
528ee18
Increase mismatch tolerance for multi-objective tests from 0.25 -> 0.33
flo-schu Feb 2, 2024
b03ee24
Increase init evals (50) and reduce post_init_evals (10) to reduce ru…
flo-schu Feb 2, 2024
2fe78f0
Change default init evals from 50->10
flo-schu Feb 5, 2024
9c5db31
Initialize Ax from x0
flo-schu Feb 5, 2024
2a2cac5
Add method to override default parameters of optimizer for tricky com…
flo-schu Feb 5, 2024
b9f2994
Adjust optimizer convergence tests.
flo-schu Feb 5, 2024
54492ba
Update optimizer parameters for NonlinearConstraintsMooTestProblem
flo-schu Feb 6, 2024
c89c794
Add ax to testing install option, to check if tests pass on github
flo-schu Feb 6, 2024
3412f9e
Remove superflous imports
flo-schu Feb 8, 2024
74966ad
Implement linear transforms
flo-schu Feb 8, 2024
09440d6
Implement linear transforms in LinearConstraintsMooTestProblem
flo-schu Feb 8, 2024
bf90492
Test transfromed problems
flo-schu Feb 8, 2024
9373154
Remove commented code and TODOs
flo-schu Feb 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CADETProcess/optimization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@
NSGA2
U_NSGA3

Ax
--

.. autosummary::
:toctree: generated/

BotorchModular
GPEI
NEHVI

Population
==========
Expand Down Expand Up @@ -94,3 +103,25 @@
from .optimizer import *
from .scipyAdapter import COBYLA, TrustConstr, NelderMead, SLSQP
from .pymooAdapter import NSGA2, U_NSGA3

import importlib

try:
from .axAdapater import BotorchModular, GPEI, NEHVI
ax_imported = True
except ImportError:
ax_imported = False


def __getattr__(name):
if name in ('BotorchModular', 'GPEI', 'NEHVI'):
if ax_imported:
module = importlib.import_module("axAdapter", package=__name__)
return getattr(module, name)
else:
raise ImportError(
"The AxInterface class could not be imported. "
"This may be because the 'ax' package, which is an optional dependency, is not installed. "
"To install it, run 'pip install CADET-Process[ax]'"
)
raise AttributeError(f"module {__name__} has no attribute {name}")
Loading
Loading