Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-style-guide-support-models-articles-20260527-00.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
W&B Sweeps optimize a single objective metric. To optimize multiple metrics in a single run, combine them into a weighted sum and use that combined value as the sweep objective.
with wandb.init() as run:
# Log individual metrics
metric_a = run.summary.get("metric_a", 0.5)
metric_b = run.summary.get("metric_b", 0.7)
# ... log other metrics as needed
metric_n = run.summary.get("metric_n", 0.9)
# Combine metrics with weights
# Adjust weights according to your optimization goals
# For example, if you want to give more importance to metric_a and metric_n:
metric_combined = 0.3 * metric_a + 0.2 * metric_b + ... + 1.5 * metric_n
run.log({"metric_combined": metric_combined})
After you log the combined metric, set it as the optimization objective in your sweep configuration:
metric:
name: metric_combined
goal: minimize
Sweeps
Metrics