fix(steady-state): store evaluated points in natural scale#81
Merged
Conversation
`update_storage_steady` stored points in internal (transformed) scale, unlike the sequential `update_storage` which inverse-transforms first. With a `log10`-transformed variable this left `X_` in log space; the surrogate refit then re-applied `transform_X`, taking `log10` of a negative value -> NaN -> `ValueError: Input X contains NaN` in the GP fit. Factor variables were likewise stored as numeric codes rather than the natural-scale representation the sequential path produces. Apply `inverse_transform_X` in `update_storage_steady`, mirroring `spotoptim.core.storage.update_storage`, so `X_` and `best_x_` hold user-facing natural-scale values for every `n_jobs`. This unblocks parallel optimization of any search space containing a transformed hyperparameter (e.g. spotforecast2's `learning_rate`/`alpha`). Add regression tests: a parallel run over a `log10` + factor search space no longer crashes and stores natural-scale `X_`, and the seeded initial design matches the sequential path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
update_storage_steadystored points in internal (transformed) scale, unlike the sequentialupdate_storagewhich inverse-transforms first. With alog10-transformed variable this leftX_in log space; the surrogate refit then re-appliedtransform_X, takinglog10of a negative value -> NaN ->ValueError: Input X contains NaNin the GP fit. Factor variables were likewise stored as numeric codes rather than the natural-scale representation the sequential path produces.Apply
inverse_transform_Xinupdate_storage_steady, mirroringspotoptim.core.storage.update_storage, soX_andbest_x_hold user-facing natural-scale values for everyn_jobs. This unblocks parallel optimization of any search space containing a transformed hyperparameter (e.g. spotforecast2'slearning_rate/alpha).Add regression tests: a parallel run over a
log10+ factor search space no longer crashes and stores natural-scaleX_, and the seeded initial design matches the sequential path.