From b62416b94016549af11564c88cd0e3e63dd3c78e Mon Sep 17 00:00:00 2001 From: Oleksandr Shchur Date: Fri, 24 May 2024 11:25:56 +0000 Subject: [PATCH] Address PR comments --- test/time_feature/__init__.py | 0 test/time_feature/test_base.py | 2 +- test/time_feature/test_lag.py | 14 +++++--------- test/time_feature/test_seasonality.py | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) create mode 100644 test/time_feature/__init__.py diff --git a/test/time_feature/__init__.py b/test/time_feature/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/time_feature/test_base.py b/test/time_feature/test_base.py index a5c4e1dbc7..e448156b2b 100644 --- a/test/time_feature/test_base.py +++ b/test/time_feature/test_base.py @@ -16,7 +16,7 @@ from gluonts.time_feature import norm_freq_str -from common import M, Q, S, Y +from .common import M, Q, S, Y @pytest.mark.parametrize( diff --git a/test/time_feature/test_lag.py b/test/time_feature/test_lag.py index 650267564b..ad934bbd1d 100644 --- a/test/time_feature/test_lag.py +++ b/test/time_feature/test_lag.py @@ -19,7 +19,7 @@ import gluonts.time_feature.lag as date_feature_set -from common import H, M, Q, Y +from .common import H, M, Q, Y # These are the expected lags for common frequencies and corner cases. # By default all frequencies have the following lags: [1, 2, 3, 4, 5, 6, 7]. @@ -210,8 +210,7 @@ + [335, 336, 337, 503, 504, 505, 671, 672, 673, 719, 720, 721], # centered around each of the last 7 days (delta = 1) + last 4 weeks (delta = 1) + last 1 month (delta = 1) + # last 8th and 12th weeks (delta = 0) - "6" - + H: [ + ("6" + H): [ 1, 2, 3, @@ -242,24 +241,21 @@ + [224, 336], # centered around each of the last 7 days (delta = 1) + last 4 weeks (delta = 1) + last 1 month (delta = 1) + # last 8th and 12th weeks (delta = 0) + last year (delta = 1) - "12" - + H: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + "12" + H: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + [27, 28, 29, 41, 42, 43, 55, 56, 57] + [59, 60, 61] + [112, 168] + [727, 728, 729], # centered around each of the last 7 days (delta = 1) + last 4 weeks (delta = 1) + last 1 month (delta = 1) + # last 8th and 12th weeks (delta = 0) + last 3 years (delta = 1) - "23" - + H: [1, 2, 3, 4, 5, 6, 7, 8] + "23" + H: [1, 2, 3, 4, 5, 6, 7, 8] + [13, 14, 15, 20, 21, 22, 28, 29] + [30, 31, 32] + [58, 87] + [378, 379, 380, 758, 759, 760, 1138, 1139, 1140], # centered around each of the last 7 days (delta = 1) + last 4 weeks (delta = 1) + last 1 month (delta = 1) + # last 8th and 12th weeks (delta = 0) + last 3 years (delta = 1) - "25" - + H: [1, 2, 3, 4, 5, 6, 7] + "25" + H: [1, 2, 3, 4, 5, 6, 7] + [12, 13, 14, 19, 20, 21, 25, 26, 27] + [28, 29] + [53, 80] diff --git a/test/time_feature/test_seasonality.py b/test/time_feature/test_seasonality.py index a235dc1c35..3817416c2c 100644 --- a/test/time_feature/test_seasonality.py +++ b/test/time_feature/test_seasonality.py @@ -15,7 +15,7 @@ from gluonts.time_feature import get_seasonality -from common import H, M, Q, Y +from .common import H, M, Q, Y TEST_CASES = [ ("30min", 48),