diff --git a/src/gluonts/time_feature/lag.py b/src/gluonts/time_feature/lag.py index deb1313f97..9abadb3a7f 100644 --- a/src/gluonts/time_feature/lag.py +++ b/src/gluonts/time_feature/lag.py @@ -146,7 +146,7 @@ def _make_lags_for_month(multiple, num_cycles=3): + _make_lags_for_hour(offset.n / (60 * 60)) ) else: - raise Exception("invalid frequency") + raise ValueError(f"invalid frequency | `freq_str={freq_str}` -> `offset_name={offset_name}`") # flatten lags list and filter lags = [