← Back to Pull requests

[ENH] Add Moirai moe v2 #2512

Open
unknown opened this pull request with 200 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 14, 2026 11:22 UTC
Author

Reference Issues/PRs

Closes #2260

What does this implement/fix? Explain your changes.

Add Salesforce Moirai-MoE to the experimental v2 interface, using
uni2ts as an optional dependency.

The model supports zero-shot point forecasts, samples, and empirical
quantiles. It handles missing target values and multivariate targets.

For TimeSeries and TslibDataModule inputs, prediction uses each
series’ latest observed history and forecasts beyond it. A DataLoader
can be used for predictions over existing historical windows. Callback
lists are copied before prediction to prevent accumulation across calls.

What should a reviewer concentrate their feedback on?

  • The v2 data adapter and future forecast windows.

  • Optional dependency handling and multivariate output shapes.

  • The zero-shot-only scope and prediction API.
  • Did you add any tests for the change?

    Yes. Tests cover grouped series, missing values, scaling, future windows,
    callback reuse, and uni2ts inference.

  • Full test suite: 1,280 passed, 12 skipped.

  • Repository-wide pre-commit checks passed.

  • The Salesforce pretrained checkpoint produced a finite forecast after

  • the final observed time point.

    Any other comments?

    Fine-tuning and exogenous features are not supported. uni2ts requires
    a compatible Python and PyTorch environment. GPU inference was not tested.

    PR checklist

  • The PR title starts with an appropriate prefix.

  • Added or modified tests.

  • Used pre-commit hooks when committing. All hooks were run manually

  • across the repository after committing.

    Diff: 200 lines (+150 / -50) across 2 files Reviewer: phoeenniixx Review duration: 23351m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 200 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.317
    Real PR Conversation Timeline
    1 comments
    "Review active on #2512"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 36.2% (MEDIUM) · Higher = larger blast radius
    36.2%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 19.3% · Safe to merge
    19.3%