Skip to content

Commit

Permalink
CHANGE: function implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ext.kvedernikov authored and ext.kvedernikov committed Jul 7, 2022
1 parent 2193692 commit 2036630
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions etna/pipeline/assemble_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ def assemble_pipelines(
raise ValueError("Lengths of the result models, horizons and transforms are not equals")
n_transforms = len(transform)

different_lens = {n_models, n_horizons, n_transforms}

if len(different_lens) > 2 or (len(different_lens) == 2 and 1 not in different_lens):
if (n_transforms != n_models and n_models != 1) or (n_transforms != n_horizons and n_horizons != 1):
raise ValueError("Lengths of the result models, horizons and transforms are not equals")

models = models if isinstance(models, Sequence) else [models for _ in range(n_transforms)]
Expand Down

0 comments on commit 2036630

Please sign in to comment.