Skip to content

fix(sweeps): filter non-finite values so NaN/inf metrics don't crash gp.fit - #144

Merged
nathancy-wandb merged 2 commits into
masterfrom
nathancy/sweeps-nan-inf2
Sep 25, 2026
Merged

nathancy-wandb merged 2 commits into
masterfrom
nathancy/sweeps-nan-inf2

Conversation

@nathancy-wandb

@nathancy-wandb nathancy-wandb commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes https://coreweave.atlassian.net/browse/WB-9541 and https://coreweave.atlassian.net/browse/WB-40181

For https://coreweave.atlassian.net/browse/WB-40181, NaN metrics themselves are imputed to the worst finite metric seen in the sweep. However if that value is large enough, the sum operation in np.mean will overflow and result in a NaN anyway. We instead scale the metrics by the largest value, compute the mean on the scaled values, then rescale.

For https://coreweave.atlassian.net/browse/WB-9541, it's possible to have NaN current_x values if user submitted sweep runs contain invalid values (such as a negative value for a uniform-log distributed hyperparameter).

@nathancy-wandb
nathancy-wandb requested a review from a team as a code owner September 23, 2026 18:26
@datadog-official

This comment has been minimized.

@kmikowicz-wandb kmikowicz-wandb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In github.com/wandb/sweeps-bench we have benchmarks on convergence. I would run about 20 runs on all of the problems there to quickly check the bayes optimization still converges on a solution to the math problems as fast as the previous version

@nathancy-wandb

Copy link
Copy Markdown
Contributor Author

ran sweeps-bench on 10 of the problems over 20 trials using fixed seeds and no differences in performance

@nathancy-wandb
nathancy-wandb enabled auto-merge (squash) September 25, 2026 19:39
@nathancy-wandb
nathancy-wandb merged commit 4cf41f4 into master Sep 25, 2026
9 of 10 checks passed
@nathancy-wandb
nathancy-wandb deleted the nathancy/sweeps-nan-inf2 branch September 25, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants