← Back to Pull requests

[ENH] Add `TimeSeries` datatype as per new API #2410

Closed
unknown closed this pull request without merging on Oct 14, 2026 08:56 UTC
View on GitHub
unknown unknown commented on Sep 06, 2026 06:55 UTC
Author

This PR adds the new Add TimeSeries datatype and update datamodule with the new design.
See #2407, #2398

  • TimeSeries is now a standarised datatype. Updated the tests and renamed the file to test_timeseries_v2 as this is no more a D1 layer!
  • Also, we now have metadata as a dataclass, instead of the dict to make it more user friendly.

  • Updated tests also updates some old ones (and removes some tests like init checks - which are not needed i think?)

    This PR is aimed at v2-dev instead of main, 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 PR

  • Datamodule - #2423

  • Forecaster - #2434
  • Note


    The tutorials will fail for sure, will update the notebook in one of the branchs stacked over this PR.
    Still need to add the Forecaster and tests - will add the notebook and docs changes on the upcoming branches as the vignette is incomplete without forecaster which is not in this PR.

    Changes made


  • Changed the test file of TimeSeries from test_d1 tro test_timeseries_v2

  • updates to TimeSeries

  • - Now uses TimeSeriesMetadata as metadata inplace of a dict
    - Not a Dataset anymore
    - Added some auto-detection of cols
    - target is the last column of data.
    - time is the first column not already used as group, target, static or weight. If no such column exists, ValueError is raised - pass time explicitly.
    - num and cat are the dtype split over all columns that are not group, time or weight
    - data validation
    - to_pandas to create a df
    - from_tensors to create a TimeSeries class for predicitons
    - which lack a lot of metadata, so need special handling otherwise will interfere with the input data validation

    Diff: 248 lines (+186 / -62) across 3 files Reviewer: CloseChoice Review duration: 54841m
    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
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 38.9% (MEDIUM) · Higher = larger blast radius
    38.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.4% · Safe to merge
    15.4%