tinkoff-ai / etna

ETNA – Time-Series Library
https://etna.tinkoff.ru
Apache License 2.0
862 stars 80 forks source link

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

Closed brsnw250 closed 1 year ago

brsnw250 commented 1 year ago

πŸ› 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