Skip to content

fix: repair optional-predictor imports and constructors in NB04 (energy)#149

Merged
ethancjackson merged 5 commits into
mainfrom
pre-final-patches
Jun 24, 2026
Merged

fix: repair optional-predictor imports and constructors in NB04 (energy)#149
ethancjackson merged 5 commits into
mainfrom
pre-final-patches

Conversation

@ethancjackson

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes broken commented-out predictor block in 04_systematic_backtest_eval.ipynb (energy implementation): adds all four missing imports (ProphetPredictor, SampledTrajectoryLLMPredictor/config, QuantileGridLLMPredictor/config, build_wti_agent_predictor/build_wti_news_config) and replaces bare stub comments with syntactically valid, fully-wired constructor calls so any optional predictor can be uncommented and run immediately
  • Applies lint auto-fixes: ruff formatting on NB04, end-of-file newlines on pre-existing curriculum JSON files

Test plan

  • make lint passes (verified locally — all hooks green)
  • Smoke-test NB04 with SMOKE_TEST = True to confirm the two default predictors (Naive, AutoARIMA) still run cleanly
  • Optionally: uncomment one optional predictor (e.g. Prophet) and confirm it instantiates without import errors

🤖 Generated with Claude Code

ethancjackson and others added 5 commits June 24, 2026 11:44
The commented-out predictor block referenced classes that weren't
imported, and the constructor calls were stubs without arguments.
Add all four missing imports (ProphetPredictor, Sampled/Grid LLMP,
build_wti_agent_predictor/news_config) and replace the bare
comment-stubs with syntactically valid, argument-complete calls so
uncommenting any one of them works immediately.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The backtest and eval save loops now skip any predictor not in
{"Naive (Last Value)", "AutoARIMA"}, so participants who uncomment
the optional predictors don't accidentally overwrite the curriculum
files that NB05/06 depend on or add unwanted rows to the NB06 scorecard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ruff strips unused imports when the optional predictors are commented
out. noqa: F401 on those lines tells it to leave them in place so
participants can uncomment any predictor without also having to restore
its import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ethancjackson ethancjackson merged commit 5320d0e into main Jun 24, 2026
2 checks passed
@ethancjackson ethancjackson deleted the pre-final-patches branch June 24, 2026 17:09
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