Skip to content

[ENH][DESIGN] Native multivariate support for LSTMModel in pytorch_forecasting #2025

@Varshith-Yadav

Description

@Varshith-Yadav

Context

TimeSeriesDataSet supports multi-target forecasting, but the current LSTMModel example (and implementation) is effectively univariate, which can lead to confusion and runtime shape mismatches when multiple targets are provided.

An older PR (#1449) attempted to address this, but it is now stale relative to main.

Goal

Clarify and/or extend LSTMModel support such that behavior is explicit and consistent:

  • Either clearly documented as univariate only, or
  • Provide native multi-target (multivariate) support

Proposed Approach

  1. Review [ENH] Support tuning any model and extend LSTMModel in docs to support multi-target datasets #1449 against current main to identify:
    • What logic is still applicable
    • What no longer applies due to recent refactors
  2. Define a minimal, backward-compatible API for multivariate targets, including:
    • Decoder output dimensionality
    • Loss handling
    • Target normalization
  3. Decide whether documentation clarification should be done in parallel

Questions for Maintainers

  • Is native multivariate support for LSTMModel desired in principle?
  • If yes, should this be a single model with n_targets > 1 or separate heads?
  • Should documentation clarification be merged independently?

Happy to proceed with implementation once aligned.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions