Skip to content

fix(steady-state): store evaluated points in natural scale#81

Merged
bartzbeielstein merged 1 commit into
mainfrom
fix/steady-state-inverse-transform
May 31, 2026
Merged

fix(steady-state): store evaluated points in natural scale#81
bartzbeielstein merged 1 commit into
mainfrom
fix/steady-state-inverse-transform

Conversation

@bartzbeielstein
Copy link
Copy Markdown
Contributor

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.

`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>
@bartzbeielstein bartzbeielstein merged commit a5093ac into main May 31, 2026
4 checks passed
@bartzbeielstein bartzbeielstein deleted the fix/steady-state-inverse-transform branch June 4, 2026 10: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.

1 participant