Skip to content

feat!: require spotoptim 1.0 (sequential) + sf2-safe 21, drop n_jobs_spotoptim#207

Merged
bartzbeielstein merged 1 commit into
developfrom
refactor/spotoptim-1.0-sequential
Jun 9, 2026
Merged

feat!: require spotoptim 1.0 (sequential) + sf2-safe 21, drop n_jobs_spotoptim#207
bartzbeielstein merged 1 commit into
developfrom
refactor/spotoptim-1.0-sequential

Conversation

@bartzbeielstein

Copy link
Copy Markdown
Collaborator

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_spotoptim config 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

  • Pins: 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).
  • Declare xgboost explicitly: imported at module top-level in tasks.task_entsoe and the xgb forecaster model; previously satisfied transitively via spotoptim. The slimming exposed it as an undeclared direct dependency.
  • SpotOptimStrategy: stop forwarding config.n_jobs_spotoptim into SpotOptim; TensorBoard kwargs pass-through kept.
  • spotoptim_search: remove the multiprocessing.Manager shared counter, parallel-eval detection, worker-side result-recovery block, and the config_counter/config_counter_lock objective params. 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.

Verification

  • Fast suite green against sf2-safe 21.0.0 + spotoptim 1.0.0 (1161 passed, 4 skipped locally).
  • ruff check clean; no SpotOptim-level n_jobs reaches the constructor.
  • docs/quartodoc_build.py + quartodoc interlinks regenerate cleanly.

Breaking change

sf2 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 is unaffected. → semantic-release major (7.0.0).

🤖 Generated with Claude Code

…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

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@bartzbeielstein bartzbeielstein merged commit 508d2f8 into develop Jun 9, 2026
10 checks passed
@bartzbeielstein

Copy link
Copy Markdown
Collaborator Author

🎉 This PR is included in version 7.0.0-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@bartzbeielstein

Copy link
Copy Markdown
Collaborator Author

🎉 This PR is included in version 7.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@bartzbeielstein bartzbeielstein deleted the refactor/spotoptim-1.0-sequential branch June 9, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant