The Versatile Optimiser (VerOpt)
Project description
VerOpt - the versatile optimiser
VerOpt is a Python package that aims to make Bayesian Optimisation easy to approach, inspect and adjust. It was developed for the Versatile Ocean Simulator (VEROS) with the aim of providing a user-friendly optimisation tool to tune ocean simulations to real world data.
VerOpt can be used with any optimisation problem but has been developed for expensive optimisation problems with a small amount of evaluations (~100) and will probably be most relevant in such a context.
For more information about the package and the methods implemented in it, take a look at my thesis report.
Installation
To install veropt with the default dependencies and the package utilised by the GUI (PySide2), do the following:
pip install veropt[gui]
If you're installing veropt on a cluster and don't need the GUI you can simply do,
pip install veropt
Usage
Below is a simple example of running an optimisation problem with veropt.
from veropt import BayesOptimiser
from veropt.obj_funcs.test_functions import *
from veropt.gui import veropt_gui
n_init_points = 24
n_bayes_points = 64
n_evals_per_step = 4
obj_func = PredefinedTestFunction("Hartmann")
optimiser = BayesOptimiser(n_init_points, n_bayes_points, obj_func, n_evals_per_step=n_evals_per_step)
veropt_gui.run(optimiser)
This example utilises one of the predefined test objective functions found in veropt.obj_funcs.test_functions.
To use veropt with your own optimisation problem, you will need to create a class that uses the "ObjFunction" class from veropt/optimiser.py as a superclass. Your class must either include a method of running your objective function (YourClass.function()) or a method for both saving parameter values and loading new objective function values (YourClass.saver() and YourClass.loader()).
If you're using veropt with a veros simulation, take a look at veropt/obj_funcs/ocean_sims and the veros simulation examples under examples/ocean_examples.
The GUI and the Visualisation Tools
After running the command,
veropt_gui.run(optimiser)
You should see a window like the one above. From here, you can show the progress of the optimisation, visualise the predictions of the GP model, change essential parameters of the model or acquisition function and much more.
If you press "Plot predictions" in the GUI, you will encounter a plot like the one below.
It shows a slice of the function domain, along the axis of a chosen optimisation parameter. You will be able to inspect the model, the acquisition function, as well as the suggested points for the next round of objective function evaluations. If any of this isn't as desired, you simply close the figure and go back to the GUI to modify the optimisation by changing the relevant parameters.
License
This project uses the GPLv3 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file veropt-0.6.1.tar.gz.
File metadata
- Download URL: veropt-0.6.1.tar.gz
- Upload date:
- Size: 67.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
498112a5235aa3df2b7eb405412ccb08f5b851a398887f60c0c71dc472a60b61
|
|
| MD5 |
77932ddce6d93b3dfb9db494b3438533
|
|
| BLAKE2b-256 |
5dbadab10d23f5038efb9a234c35faa43330ee2f17b3bd74068a02f79bf45e5b
|
Provenance
The following attestation bundles were made for veropt-0.6.1.tar.gz:
Publisher:
python-publish.yml on aster-stoustrup/veropt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
veropt-0.6.1.tar.gz -
Subject digest:
498112a5235aa3df2b7eb405412ccb08f5b851a398887f60c0c71dc472a60b61 - Sigstore transparency entry: 176391280
- Sigstore integration time:
-
Permalink:
aster-stoustrup/veropt@403a82d0afe6bc1d62790d071c18dc4c4d140326 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/aster-stoustrup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@403a82d0afe6bc1d62790d071c18dc4c4d140326 -
Trigger Event:
release
-
Statement type:
File details
Details for the file veropt-0.6.1-py3-none-any.whl.
File metadata
- Download URL: veropt-0.6.1-py3-none-any.whl
- Upload date:
- Size: 69.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21d2770f21c176220b9b67f90e5a36c70c561d6f843b18168cfc752e5aace261
|
|
| MD5 |
b03c1acabf20782a7554f65f66eda8be
|
|
| BLAKE2b-256 |
180ba7bbea373bdddd16fcd2a2dc535f9a77227b901df07fe3b6adb2888e808e
|
Provenance
The following attestation bundles were made for veropt-0.6.1-py3-none-any.whl:
Publisher:
python-publish.yml on aster-stoustrup/veropt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
veropt-0.6.1-py3-none-any.whl -
Subject digest:
21d2770f21c176220b9b67f90e5a36c70c561d6f843b18168cfc752e5aace261 - Sigstore transparency entry: 176391283
- Sigstore integration time:
-
Permalink:
aster-stoustrup/veropt@403a82d0afe6bc1d62790d071c18dc4c4d140326 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/aster-stoustrup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@403a82d0afe6bc1d62790d071c18dc4c4d140326 -
Trigger Event:
release
-
Statement type: