[ENH] Add `TimeSeries` datatype as per new API #2410
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 248 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.330
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2410"
general
weight: 0.35
CloseChoice
This PR adds the new Add
TimeSeriesdatatype and update datamodule with the new design.See #2407, #2398
TimeSeriesis now a standarised datatype. Updated the tests and renamed the file totest_timeseries_v2as this is no more a D1 layer!metadataas a dataclass, instead of thedictto make it more user friendly.Updated tests also updates some old ones (and removes some tests like
initchecks - which are not needed i think?)This PR is aimed at
v2-devinstead ofmain, so that we dont break current user code until this design is complete and stable. See #2407 for details. So I had to update the branch target in the workflows for the tests to run (which might fail due to the changes)Stack
TimeSeries- #2410 <- This PRDatamodule- #2423Forecaster- #2434Note
The tutorials will fail for sure, will update the notebook in one of the branchs stacked over this PR.
Still need to add the
Forecasterand tests - will add the notebook and docs changes on the upcoming branches as the vignette is incomplete withoutforecasterwhich is not in this PR.Changes made
TimeSeriesfromtest_d1trotest_timeseries_v2TimeSeries- Now uses
TimeSeriesMetadataas metadata inplace of adict- Not a
Datasetanymore- Added some auto-detection of cols
-
targetis the last column ofdata.-
timeis the first column not already used asgroup,target,staticorweight. If no such column exists,ValueErroris raised - passtimeexplicitly.-
numandcatare the dtype split over all columns that are notgroup,timeorweight- data validation
-
to_pandasto create a df-
from_tensorsto create aTimeSeriesclass for predicitons- which lack a lot of metadata, so need special handling otherwise will interfere with the input data validation