Skip to content

[BUG] CLI forecast command fails with pipeline ensembles #1329

@brsnw250

Description

@brsnw250

🐛 Bug Report

CLI forecast command fails when using pipeline ensembles.

Error message:

File "/usr/local/lib/python3.10/site-packages/etna/commands/forecast_command.py", line 125, in forecast
  horizon: int = pipeline_configs["horizon"]  # type: ignore
KeyError: 'horizon'

Example of failing config

        _target_: etna.ensembles.VotingEnsemble
        pipelines:
        - _target_: etna.pipeline.Pipeline
          horizon: 4
          model:
            _target_: etna.models.SeasonalMovingAverageModel
            seasonality: 4
            window: 1
          transforms: []
        - _target_: etna.pipeline.Pipeline
          horizon: 4
          model:
            _target_: etna.models.SeasonalMovingAverageModel
            seasonality: 7
            window: 2
          transforms: []
        - _target_: etna.pipeline.Pipeline
          horizon: 4
          model:
            _target_: etna.models.SeasonalMovingAverageModel
            seasonality: 7
            window: 7
          transforms: []

Expected behavior

forecast and backtest CLI commands fully support pipeline ensembles.

How To Reproduce

  1. Run etna forecast command with example config
  2. Observe KeyError

Environment

No response

Additional context

No response

Checklist

  • Bug appears at the latest library version

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions