Skip to content

Commit e618af6

Browse files
committed
refactor: remove redundant validation for regressors in ForecastingPipelineSchema as we allow for empty regressors and future_regressors when using auto-regressive forecasting
Signed-off-by: Mohamed Belhsan Hmida <[email protected]>
1 parent 80ed0a0 commit e618af6

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

flexmeasures/data/schemas/forecasting/pipeline.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ def validate_parameters(self, data: dict, **kwargs):
7272
"--predict-period must be greater than 0", field_name="predict_period"
7373
)
7474

75-
regressors = self._parse_comma_list(data.get("regressors", ""))
76-
future_regressors = self._parse_comma_list(data.get("future_regressors", ""))
77-
if not regressors and not future_regressors:
78-
raise ValidationError(
79-
"At least one of --regressors or --future-regressors must be provided",
80-
field_name="regressors",
81-
)
82-
8375
def _parse_comma_list(self, text: str | None) -> list[str]:
8476
return (
8577
[item.strip() for item in text.split(",") if item.strip()] if text else []

0 commit comments

Comments
 (0)