← Back to Pull requests

[ENH] Add minimal default vignette test in TestAllPtForecastersV2 and fix SCINet default num_levels #2560

Closed
unknown closed this pull request without merging on Nov 28, 2026 19:04 UTC
View on GitHub
unknown unknown commented on Nov 28, 2026 15:31 UTC
Author

Reference Issues/PRs


Fixes #2469. See also #2434.

What does this implement/fix? Explain your changes.


  • Adds TestAllPtForecastersV2.test_minimal_vignette in pytorch_forecasting/tests/test_all_v2/test_all_estimators_v2.py, instantiating each v2 forecaster with all default model and datamodule parameters, running fit and predict on a minimal TimeSeries, and checking the returned prediction TimeSeries.

  • Updates the default num_levels in SCINetForecaster and SCINet_v2 from 3 to 1 so 2 ** num_levels divides the default datamodule context_length of 30 instead of raising a ValueError on default initialization.
  • What should a reviewer concentrate their feedback on?


  • Whether changing SCINet_v2 and SCINetForecaster default num_levels to 1 is the preferred default over keeping 3.

  • Whether the Trainer batch/epoch limits in test_minimal_vignette are minimal enough for CI runtime while still verifying default model and datamodule compatibility.
  • Did you add any tests for the change?


    Yes, added TestAllPtForecastersV2.test_minimal_vignette in pytorch_forecasting/tests/test_all_v2/test_all_estimators_v2.py and verified all 15 v2 forecasters and all SCINet_v2 suite tests pass locally.

    Any other comments?


    No.

    PR checklist


  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG].

  • Added/modified tests

  • Used pre-commit hooks when committing to ensure that code is compliant with hooks.
  • Diff: 186 lines (+139 / -47) across 2 files Reviewer: phoeenniixx Review duration: 212m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 186 lines diff across 2 files
    0.36
    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.313
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #2560"
    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: 35.8% (MEDIUM) · Higher = larger blast radius
    35.8%
    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: 14.1% · Safe to merge
    14.1%