Bayesian optimization

From VectorSpaceLab/AREX-Skill · View interactive version

Bayesian optimization is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Route BayesianOptimization package tasks for black-box Bayesian optimization, HPO, acquisition functions, constraints, typed domains, domain reduction, and checkout maintenance.

How to use this skill

Skill file

BayesianOptimization Repo Skill

Use this repo skill when a user asks about the bayesian-optimization package,

its bayes_opt import, Gaussian-process Bayesian optimization, black-box

function maximization, small hyperparameter optimization, acquisition functions,

constraints, typed/categorical parameters, sequential domain reduction, or

maintaining this package's source checkout.

This skill is self-contained. Do not send future agents to original repository

notebooks or examples for package usage; use the bundled references and scripts

below. Checkout-only test and docs commands are confined to the maintainer

sub-skill.

Install and import baseline

Package users normally install one of:

pip install bayesian-optimization
conda install -c conda-forge bayesian-optimization

Minimal import check:

from bayes_opt import BayesianOptimization


def objective(x, y):
    return -x**2 - (y - 1.0) ** 2 + 1.0

optimizer = BayesianOptimization(
    f=objective,
    pbounds={"x": (-2.0, 2.0), "y": (-3.0, 3.0)},
    random_state=1,
    verbose=0,
)
optimizer.maximize(init_points=1, n_iter=1)
assert optimizer.max is not None

For an environment-level diagnostic, run

CODE0. Add --run-subskill-smokes when

you want it to execute the bundled tiny smoke helpers as well.

Route map

Core optimizer and HPO workflows

Read CODE0

when the task involves:

predict;

Acquisition control

Read CODE0

when the task involves:

GPHedge;

exploration_decay, and exploration_decay_delay;

AcquisitionFunction subclasses;

UtilityFunction snippets, and constraint incompatibility.

Advanced domain features

Read CODE0

when the task involves:

BayesParameter subclasses;

domain reduction limitations.

Repository maintenance

Read CODE0

only when the user is editing or validating a bayesian-optimization source

checkout. It covers focused pytest selection, Ruff/lint commands, notebook/docs

checks, CI Python/NumPy matrix behavior, dependency markers, build validation,

and release/publish boundaries. Do not use it for ordinary package usage.

Cross-cutting references

import, dependency marker, no-CLI, old API, and route-selection failures that

cut across sub-skills.

commit, package version, evidence paths, and refresh baseline for this skill.

structured metadata consumed by DisCo's managed repo-skills router importer.

Quick decisions

scientific Python package built on NumPy, SciPy, and scikit-learn.

scripts.

v3.3.x optimizer-level suggest() takes no acquisition argument. Pass an

acquisition instance into the optimizer constructor instead.

domains. Raw arrays follow pbounds insertion order and expanded internal

dimensions.

Handoff checklist

Before answering a user or running a diagnostic, identify:

  1. Is this package usage or source-checkout maintenance?
  2. Is the objective unconstrained or constrained?
  3. Are parameters ordinary floats, typed integers/categories, or custom domain

objects?

  1. Is acquisition selection part of the task, or can the optimizer default be

used?

  1. Does the requested check require only CPU runtime dependencies, or a broader

development environment for notebooks/docs/lint?

Then load the smallest matching sub-skill and use its bundled references and

scripts.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.