From e7f9d504f01d8fd6eb4ef36f14bc1791a4a38881 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:52:23 +0100 Subject: [PATCH] Extend exception for invalid `offset_name` (#3115) --- 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 = [