Simple API that hosts code for running bayesian optimization. Currently only 1D bayesian optimization has been implemented but the plan is to expand to 2D.
We use FastAPI.
The documentation is automatically generated from the code.
The documentation can be viewed at /docs once the service is up and running, for example http://localhost/docs
There is current one endpoint run_one_1d_bayesian_optimization that runs a bayesian optimization in one dimension
and returns distribution and the next suggestion.
Please see examples/example_1d.py which a very small example using the code and plotting it

This can be done it two different ways: With Python or with Docker.
python3 -m venv ./venv
source venv/bin/activatepip install -r requirements.txt
cd src && uvicorn main:app --reloadTo run local pytests you need to
- add
srcto python pathexport PYTHONPATH=$PYTHONPATH:./src - run pytests:
pytest
- Make sure docker is installed on your system.
- Use
docker-compose upin the main directory to start up the application. - You will now be able to access it on
http://localhost:80
You can use docker to start up the image with
- docker build -t active_learning:latest .
- docker run -p 80:80 -it active_learning:latest