Enforce prior belief-time constraint on forecasting pipeline input data#2016
Open
Copilot wants to merge 3 commits intofeat/forecasting-belief-timefrom
Open
Enforce prior belief-time constraint on forecasting pipeline input data#2016Copilot wants to merge 3 commits intofeat/forecasting-belief-timefrom
prior belief-time constraint on forecasting pipeline input data#2016Copilot wants to merge 3 commits intofeat/forecasting-belief-timefrom
Conversation
… schema Co-authored-by: BelhsanHmida <149331360+BelhsanHmida@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add test case for pull request
test: add test cases for Mar 10, 2026
prior (belief_time) parameter in forecasting schema
Copilot stopped work on behalf of
BelhsanHmida due to an error
March 10, 2026 20:11
Copilot stopped work on behalf of
BelhsanHmida due to an error
March 10, 2026 22:49
…straint Co-authored-by: BelhsanHmida <149331360+BelhsanHmida@users.noreply.github.com>
Copilot
AI
changed the title
test: add test cases for
Enforce Mar 10, 2026
prior (belief_time) parameter in forecasting schemaprior belief-time constraint on forecasting pipeline input data
Copilot stopped work on behalf of
BelhsanHmida due to an error
March 10, 2026 23:11
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.
The
priorparameter was only tagging saved forecasts with the specified belief time (save_belief_time) but was not actually filtering which beliefs were loaded as training/prediction input. Only future-regressor beliefs were partially filtered insplit_data_all_beliefs; the target sensor and past regressors used the most recent available belief regardless ofprior.Changes
Implementation
ForecasterParametersSchema.resolve_config: Exposesbeliefs_before=data.get("belief_time")in the returned params dict —Nonewhenprioris absent, the explicitpriorvalue otherwise.BasePipeline: Addsbeliefs_beforeparameter; passes it tosensor.search_beliefs()inload_data_all_beliefs(), restricting all sensor inputs (target, past regressors, future regressors) to beliefs recorded at or beforeprior.TrainPipeline/PredictPipeline: Threadbeliefs_beforethrough toBasePipeline.TrainPredictPipeline.run_cycle: Passesself._parameters.get("beliefs_before")to both sub-pipelines.Test
setup_fresh_test_forecast_data_with_anomalous_beliefs: creates a sensor with two belief layers for the same events:belief_time = 2024-12-31belief_time = 2025-01-10test_prior_restricts_training_beliefs: runs the pipeline twice — once withpriorbefore Jan 10 (model sees only normal data → low forecasts) and once withpriorafter Jan 10 (model sees anomalous data → high forecasts) — asserting the two outcomes differ by at least 10×.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.