Define a sweep configuration dict specifying method: 'bayes', a metric to optimize (goal: minimize, name: 'val_loss'), and parameter search spaces
Create the sweep with sweep_id = wandb.sweep(sweep_config, project='my-project')
Write a training function that calls wandb.init(), reads hyperparameters from wandb.config, trains the model, and logs metrics with wandb.log()
Launch agents with wandb.agent(sweep_id, function=train, count=20) — multiple agents can run in parallel across machines
Inspect the Parallel Coordinates plot in the W&B UI to identify which hyperparameter ranges correlate with best performance
Known gotchas
Bayesian optimization in W&B sweeps requires at least 5 completed runs before it can make informed suggestions — early runs use random sampling regardless of the method setting
The metric logged inside the training function must exactly match the name specified in the sweep config metric.name — a typo causes the sweep to treat all runs as failed
When running multiple parallel agents, each agent independently calls wandb.agent() and the sweep controller coordinates assignments server-side; do not share a single run context across agents
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp