fix: repair optional-predictor imports and constructors in NB04 (energy)#149
Merged
Conversation
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>
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
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 immediatelyTest plan
make lintpasses (verified locally — all hooks green)SMOKE_TEST = Trueto confirm the two default predictors (Naive, AutoARIMA) still run cleanly🤖 Generated with Claude Code