From e5dfab0661d798e21436379c926c96641bb9a90a Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 31 Jan 2024 19:36:39 +0100 Subject: [PATCH] extend exception for invalid `offset_name` --- src/gluonts/time_feature/lag.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = [