{"id":44254267,"url":"https://github.com/berrieslab/pybo","last_synced_at":"2026-02-10T16:16:54.063Z","repository":{"id":312988046,"uuid":"1020169777","full_name":"BerriesLab/pybo","owner":"BerriesLab","description":"A Python library for Multi-Objective Bayesian Optimization, built on top of BoTorch.","archived":false,"fork":false,"pushed_at":"2026-02-03T19:13:20.000Z","size":27055,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-03T23:37:30.440Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BerriesLab.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-15T12:54:32.000Z","updated_at":"2025-09-03T08:06:01.000Z","dependencies_parsed_at":"2025-09-03T08:52:13.036Z","dependency_job_id":"0a312dcf-4737-4f77-a0b6-193edbefb577","html_url":"https://github.com/BerriesLab/pybo","commit_stats":null,"previous_names":["berrieslab/pybo"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/BerriesLab/pybo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BerriesLab%2Fpybo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BerriesLab%2Fpybo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BerriesLab%2Fpybo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BerriesLab%2Fpybo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BerriesLab","download_url":"https://codeload.github.com/BerriesLab/pybo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BerriesLab%2Fpybo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29307171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T16:09:25.305Z","status":"ssl_error","status_checked_at":"2026-02-10T16:08:52.170Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-10T16:16:53.454Z","updated_at":"2026-02-10T16:16:54.058Z","avatar_url":"https://github.com/BerriesLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyBO — A Python Library for Bayesian Optimization\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.17610683.svg)](https://doi.org/10.5281/zenodo.17610683)\n\n`pyBO` is a Python library for Bayesian Optimization of single and multi\nobjective problems. Built on top of BoTorch and using Gaussian Processes as\nsurrogate models, it provides a user-friendly framework for optimizing single\nand multiple competing objectives, finding optimal or pareto-optimal solutions.\n\n## Table of Contents\n\n- [Key Features](#key-features)\n- [Installation](#installation)\n- [Experimental workflow](#experimental-workflow)\n- [pyBO](#pybo-internal-workflow)\n    - [Data Format](#data-format)\n    - [Visualization](#visualization)\n    - [Tutorials](#tutorials)\n    - [Notes](#notes)\n\n## Key Features\n\nVersion 0.2.0 currently supports:\n\n- Single-objective optimization problems for vector-valued\n  functions $\\mathbf{f}_0: \\mathbb{R}^n \\to \\mathbb{R}^1$.\n- Multi-objective optimization problems for vector-valued\n  functions $\\mathbf{f}_0: \\mathbb{R}^n \\to \\mathbb{R}^m$.\n- Noisy observations.\n- Single and batch mode (q-batch) parallel evaluations.\n- Linear equality input constraints.\n- Linear inequality input constraints.\n- Nonlinear inequality inout constraints.\n- Linear and non-linear inequality outptut constraints.\n- GPyTorch kernels (e.g. scale, RBF, Matern, Periodic...).\n- The following analytical acquisition functions: EI, LogEI,\n- The following Monte Carlo based acquisition functions: qEHVI, qLogEHVI,\n  qNEHVI, qLogNEHVI, qDWNEHVI, qEWNEHVI, qNParEGO.\n- The following samplers: UniformGrid, Sobol, LatinHypercube.\n- Easy-to-write custom objectives, including trackers and penalization.\n- A plotter library for objectives, optimization results and metrics.\n- CUDA, Apple Metal Framework, and CPU.\n\n## Installation\n\nCurrently, the package is only available for local installation.\n\n1. Clone the repository: \u003cbr\u003e`git clone https://github.com/BerriesLab/pybo`\n2. Install required build tools (if not already installed): \u003cbr\u003e\n   `python -m pip install --upgrade build setuptools wheel`\n3. Build the package: \u003cbr\u003e`python -m build`\n4. Install the package locally: \u003cbr\u003e\n   `pip install dist/pyBO-0.3.0-py3-none-any.whl` \u003cbr\u003e (Replace\n   pyBO-0.1.0-py3-none-any.whl with the actual filename in your dist/ folder)\n\n## Experimental workflow\n\n`pyBO` is designed to integrate seamlessly into any experimental optimization\nloop. A typical experimental optimization problem starts with an initial dataset\nof (X, Y) pairs, which serve as the prior knowledge for the Bayesian\noptimization. Based on this data, the Bayesian optimization suggests a new set\nof parameters, `new_X`. The user can then run a new experiment using `new_X` to\nobtain new observables, including new objectives `new_Y_obj`, new constraint\nvalues `new_Y_con`, and new tracker values `new_Y_trk`. The new objective and\nconstraint values, together with the `new X`, are subsequently used to update\nthe prior belief, by initializing and fitting a new Gaussian Process model. This\nmodel is then optimized, and the process is repeated iteratively until a\nconvergence criterion is satisfied.\n\n## pyBO\n\npyBO consists of the following packages (in alphabetical order):\n\n- [acqf](acqf): Includes custom or user-defined acquisition functions.\n- [constraints](constraints): Includes constraint definitions for objectives.\n- [objectives](objectives): Includes single and multi objective classes.\n- [optimizer](optimizer): Includes a stateful class that manages the Bayesian\n  optimization loop.\n- [plotters](plotters): Includes classes for visualizing optimization results,\n  trackers, metrics, and parameters evolution.\n- [samplers](samplers): Includes Uniform Grid, Sobol and Latin Hypercube\n  Samplers. Provides functionality for constrained sampling.\n- [utils](utils): Includes utility functions used across the package.\n\n### Data Format\n\nThe optimizer accepts the following data:\n\n- $\\mathbf{X} \\in \\mathbb{R}^{n \\times d}$: the input data matrix.\n- $\\mathbf{Y}_{\\mathrm{obj}} \\in \\mathbb{R}^{n \\times m}$: the objective value\n  matrix.\n- $\\mathbf{Y}_{\\mathrm{obj, \\sigma}} \\in \\mathbb{R}^{n \\times m}$: the objective\n  variance value matrix (optional).\n- $\\mathbf{Y}_{\\mathrm{con}} \\in \\mathbb{R}^{n \\times c}$: the constraint value\n  matrix (optional).\n- $\\mathbf{Y}_{\\mathrm{con, \\sigma}} \\in \\mathbb{R}^{n \\times c}$: the\n  constraint variance value matrix (optional).\n\nwhere\n\n- $n$ is the number of observations.\n- $d$ is the number of parameters, or input space dimension.\n- $m$ is the number of objectives.\n- $c$ is the number of output constraints.\n\n## Tutorials\n\nExplore the following examples to learn how to use `pyBO`, and make sure to\nreview the corresponding objective for learning how to create a custom\nobjective.\n\n- **Single Objective Problems**\n    - [Quadratic](tutorials/single_objective/quadratic/main.py): An\n      unconstrained problem for a quadratic objective function of single\n      variable, solved using a scaled RBF kernel.\n    - [Polynomial](tutorials/single_objective/polynomial/main.py): An\n      unconstrained problem for a polynomial objective function of single\n      variable, solved using a scaled RBF kernel.\n    - [Constrained Polynomial](tutorials/single_objective/polynomial_constrained):\n      A constrained problem for a polynomial objective function of single\n      variable, solved using a scaled RBF kernel.\n    - [Harmonic](tutorials/single_objective/harmonic/main.py): An unconstrained\n      problem for a harmonic objective function of single variable, solved using\n      a scaled cosine kernel.\n    - [Periodic](tutorials/single_objective/periodic/main.py): An unconstrained\n      problem for a periodic objective function of single variable, solved using\n      a scaled periodic kernel.\n    - [Wave Packet](tutorials/single_objective/wave_packet/main.py): An\n      unconstrained problem for a wave packet-like objective function of single\n      variable, solved using a scaled periodic kernel.\n    - [Ackley](tutorials/single_objective/ackley/main.py): An unconstrained\n      problem for the Ackley test function of two variables, solved using a\n      scaled RBF kernel.\n    - [Rosenbrock](tutorials/single_objective/rosenbrock/main.py): An\n      unconstrained problem for the Rosenbrock test function of two variables,\n      solved using a scaled RBF kernel.\n    - [Constrained Rosenbrock](tutorials/single_objective/rosenbrock_constrained/main.py):\n      A constrained problem for the Rosenbrock test function of two variables,\n      solved using a scaled RBF kernel.\n\n\n- **Multi Objective Problems**\n    - [Branin-Currin](tutorials/multi_objective/branin_currin/main.py): The    \n      unconstrained two-objective Branin-Currin optimization problem, solved\n      using a scaled RBF kernel.\n    - [Linear Equality Test](tutorials/multi_objective/linear_equality/main.py):\n      A two-objective optimization test problem with linear equality input\n      constraints, solved using a scaled RBF kernel.\n    - [Linear Inequality Test](tutorials/multi_objective/linear_inequality/main.py):\n      A two-objective optimization test problem with linear inequality input\n      constraints, solved using a scaled RBF kernel.\n    - [Binh and Korn](tutorials/multi_objective/binh_and_korn/main.py): The Binh\n      and Korn two-objective optimization problem featuring nonlinear inequality\n      input constraints, solved using a scaled RBF kernel.\n    - [Osyczka-Kundu](tutorials/multi_objective/osyczka_kundu/main.py): The\n      Osyczka and Kundu two-objective optimization problem, featuring linear  \n      and nonlinear inequality input constraints, solved using a scaled RBF\n      kernel.\n    - [C2DTLZ2](tutorials/multi_objective/c2dtlz2/main.py): The two-objective\n      C2-DTLZ2 optimization problem, featuring nonlinear output constraints,\n      solved using a scaled RBF kernel.\n    - [Tanaka](tutorials/multi_objective/tanaka/main.py): The two-objective\n      Tanaka optimization problem with two output constraints, solved using a\n      scaled RBF kernel.\n\n## Notes\n\n- Sporadically, the following error has been observed: `RuntimeError: main thread is not in main loop Tcl_AsyncDelete:\n  async handler deleted by the wrong thread`. This traceback appears to\n  originate from the TkAgg backend, which depends on Tkinter. To suppress this\n  error, `matplotlib` is imported with the appropriate backend configuration.\n  Unfortunately, this approach prevents figures from being displayed on screen,\n  meaning that `show()` will no longer function.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberrieslab%2Fpybo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberrieslab%2Fpybo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberrieslab%2Fpybo/lists"}