feat!: require spotoptim 1.0 (sequential) + sf2-safe 21, drop n_jobs_spotoptim#207
Merged
Merged
Conversation
…spotoptim spotoptim 1.0 is sequential-only: n_jobs / eval_batch_size were removed and passing them now raises TypeError. spotforecast2-safe 21.0.0 removed the dead n_jobs_spotoptim config field in lockstep. This change makes sf2 compatible with both and retires all parallel-SpotOptim scaffolding. Changes: - Bump pins: spotoptim[torch]>=1.0.0,<2 and spotforecast2-safe>=21.0.0,<22. spotoptim 1.0 made torch/tensorboard optional ([torch] extra); pin the extra so the TensorBoard tuning pass-through keeps working (was always available via spotoptim's old hard torch dependency). - Declare xgboost explicitly: it is imported at module top-level in spotforecast2.tasks.task_entsoe and the xgb forecaster model, previously satisfied transitively via spotoptim's dependency tree. - SpotOptimStrategy: stop forwarding config.n_jobs_spotoptim into SpotOptim; keep the TensorBoard kwargs pass-through. - spotoptim_search: remove the multiprocessing.Manager shared counter, the parallel-eval detection, the worker-side result-recovery block, and the config_counter/config_counter_lock objective parameters. The trial bar is now unconditional on show_progress; the "config k/N" label counts completed configs. Backtesting-level n_jobs (skforecast) is unchanged. - Tests: delete test_spotoptim_parallel.py; drop the shared-counter / parallel label tests; convert the TensorBoard pass-through test to a sequential run. - Docs: spotoptim_intro narrative updated to sequential-only. BREAKING CHANGE: spotforecast2 now requires spotoptim>=1.0 and spotforecast2-safe>=21. The n_jobs_spotoptim config field is gone and SpotOptim tuning is sequential-only; backtesting parallelism (n_jobs) is unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Collaborator
Author
|
🎉 This PR is included in version 7.0.0-rc.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Collaborator
Author
|
🎉 This PR is included in version 7.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
Makes spotforecast2 compatible with the breaking spotoptim 1.0 (sequential-only, lean deps) and spotforecast2-safe 21.0.0 (which removed the dead
n_jobs_spotoptimconfig field), and retires all parallel-SpotOptim scaffolding.Part of the coordinated migration: sf2-safe 21.0.0 (released) → sf2 7.0.0 (this PR) → bart26k-lecture.
Changes
spotoptim[torch]>=1.0.0,<2,spotforecast2-safe>=21.0.0,<22. spotoptim 1.0 moved torch/tensorboard to its[torch]extra — pinned so the TensorBoard tuning pass-through keeps working (it was always present via spotoptim's old hard torch dep).xgboostexplicitly: imported at module top-level intasks.task_entsoeand the xgb forecaster model; previously satisfied transitively via spotoptim. The slimming exposed it as an undeclared direct dependency.SpotOptimStrategy: stop forwardingconfig.n_jobs_spotoptimintoSpotOptim; TensorBoard kwargs pass-through kept.spotoptim_search: remove themultiprocessing.Managershared counter, parallel-eval detection, worker-side result-recovery block, and theconfig_counter/config_counter_lockobjective params. Trial bar is now unconditional onshow_progress; the "config k/N" label counts completed configs. Backtesting-leveln_jobs(skforecast) is unchanged.test_spotoptim_parallel.py; drop the shared-counter / parallel-label tests; convert the TensorBoard pass-through test to a sequential run.spotoptim_intronarrative updated to sequential-only.Verification
ruff checkclean; no SpotOptim-leveln_jobsreaches the constructor.docs/quartodoc_build.py+quartodoc interlinksregenerate cleanly.Breaking change
sf2 now requires
spotoptim>=1.0andspotforecast2-safe>=21. Then_jobs_spotoptimconfig field is gone and SpotOptim tuning is sequential-only; backtesting parallelism is unaffected. → semantic-release major (7.0.0).🤖 Generated with Claude Code