release: spotoptim 1.0.0 — sequential-only engine + lean dependencies#96
Merged
Conversation
Roadmap #6 tooling baseline for spotoptim: - type checker: run the already-present Astral `ty` in CI via a non-blocking lint step (`ty check src/`, continue-on-error); add [tool.ty]. - coverage: add [tool.coverage] with fail_under=68 ratchet (~71% fast suite), and add --cov to the fast (required) test gate which now enforces it. - legacy lint: remove redundant .flake8 (not invoked, not imported; also dropped from runtime deps) + REUSE.toml entry; add [tool.ruff]/[tool.black]/ [tool.isort] config to match the spot* standard. Non-breaking, non-releasing (chore). Promotes to main with the next release. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ooling-baseline chore(tooling): run ty in CI, coverage gate, drop legacy flake8
…uential engine Parallel execution (n_jobs > 1 / steady-state) showed no measured benefit in this package: the only measured speedup (18x) comes from vectorized acquisition, which is orthogonal and untouched. The parallel path added a GIL-detection fork, dill pickling of the optimizer, and lock/batch bookkeeping, and worked against BLAS threading. Removing it drops ~4500 lines and makes the toolbox lighter and easier to maintain. - Delete optimizer/steady_state.py and utils/parallel.py. - Remove n_jobs / eval_batch_size from SpotOptimConfig, __init__, and SpotOptimProtocol; delete optimize_steady_state and _update_storage_steady. - Remove vestigial shared_best_y / shared_lock multi-process restart plumbing. - Collapse execute_optimization_run to always call optimize_sequential_run. - Delete parallel-only tests and docs (optimize_parallel.qmd, slurm.qmd, PARALLELIZATION_STRATEGY.md); scrub n_jobs mentions from remaining docs. - Add a seeded byte-identity regression test proving sequential results are unchanged, and a contract test asserting the removed params raise TypeError. Sequential multi-restart logic (restart_after_n, max_restarts, restart_inject_best) and vectorized acquisition are preserved unchanged. BREAKING CHANGE: SpotOptim no longer accepts the `n_jobs` or `eval_batch_size` constructor arguments — passing either now raises TypeError. The methods `optimize_steady_state` and `_update_storage_steady` are removed, as are `spotoptim.utils.is_gil_disabled`, `remote_eval_wrapper`, `remote_batch_eval_wrapper`, and `remote_search_task`. Seeded sequential `optimize()` results are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…r/remove-parallelism feat!: remove parallel-evaluation subsystem (n_jobs); collapse to single sequential engine
…ional extras Make `pip install spotoptim` lean. The default install now pulls only the core surrogate-optimization stack (numpy, scipy, scikit-learn, pandas, tabulate, dill); heavy and narrow dependencies move behind optional extras and are imported lazily, so `import spotoptim` + a Kriging run loads none of them (enforced by tests/test_core_import_lean.py). - Extras: [torch] (torch, tensorboard), [viz] (matplotlib, seaborn), [stats] (statsmodels), [remote] (requests), and [all]. - Drop dead/relocated runtime deps: xgboost, spotdesirability (test-only, moved to dev), jupyter (docs-only), black (dev-only), ty (dev-only), importlib-metadata (docs-only; stdlib importlib.metadata is used at runtime). - Convert eager imports to lazy across __init__ re-exports (PEP 562 __getattr__) and point-of-use guards (torch/matplotlib/seaborn/statsmodels), closing every eager path reachable from `import spotoptim` and `from spotoptim.function import ...`. BREAKING CHANGE: the following symbols are no longer re-exported from the top-level `spotoptim` namespace and must be imported from their subpackages (and require the matching extra): MLPSurrogate (spotoptim.surrogate), MLP / LinearRegressor (spotoptim.nn), DiabetesDataset / get_diabetes_dataloaders (spotoptim.data), TorchStandardScaler (spotoptim.utils.scaler), and the PCA/plot helpers (spotoptim.utils.pca). Installing torch-, plotting-, stats-, or remote-objective features now requires `pip install 'spotoptim[torch]'` (or [viz] / [stats] / [remote] / [all]). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…r/slim-dependencies feat!: slim core dependencies; move torch/viz/stats/remote behind optional extras
… dependency slimming Regenerate the quartodoc API reference and re-render the site so the published docs match the post-refactor code: - Rendered SpotOptim / SpotOptimConfig reference pages no longer document the removed n_jobs / eval_batch_size / steady-state API. - Update committed _freeze for the edited narrative docs (optimize_seq, spotoptim_init, early-stopping, user_guide and its subpages) so CI reuses the frozen output instead of re-executing from scratch. - Drop the orphaned reference page and _freeze for the renamed top-level "SpotOptim" entry (the live page is SpotOptim.SpotOptim). - Pick up the new spotoptim.plot package docstring in the reference index. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…fresh-after-refactor docs: refresh API reference and _freeze after refactor
The byte-identity check (assert_array_equal vs a golden fixture captured on macOS) failed on Linux CI: seeded SpotOptim results are bit-identical only on the same platform/BLAS, and an iterative surrogate trajectory amplifies floating-point rounding into different (equally valid) optima across platforms. Assert portable invariants instead: same-seed determinism (bit-exact within a run), exact evaluation budget (nfev/nit/success), and convergence quality in the golden ballpark. The fixture still supplies the case definitions and the budget/quality references. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…uential-regression-portability test: make sequential regression test platform-portable
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.
Release merge of
developintomain. Triggers semantic-release → 1.0.0 (major, from the breakingfeat!commits), PyPI publish, and docs deploy.Included:
feat!:remove parallel-evaluation subsystem (n_jobs) → sequential-only enginefeat!:slim core dependencies; torch/viz/stats/remote → optional extrasdocs:refresh API reference and_freezeafter the refactorschore(tooling):ty in CI + coverage gate (previously unreleased on develop)Breaking changes are documented in the two
feat!commit bodies (BREAKING CHANGE footers):n_jobs/eval_batch_sizeremoved; NN/PCA symbols moved out of the top-level namespace; install features viapip install 'spotoptim[torch]'etc.🤖 Generated with Claude Code