autogluon.timeseries 1.2.1b20250422__py3-none-any.whl → 1.2.1b20250424__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. autogluon/timeseries/dataset/ts_dataframe.py +18 -3
  2. autogluon/timeseries/learner.py +0 -4
  3. autogluon/timeseries/metrics/__init__.py +1 -30
  4. autogluon/timeseries/metrics/abstract.py +0 -10
  5. autogluon/timeseries/metrics/point.py +41 -131
  6. autogluon/timeseries/metrics/quantile.py +15 -36
  7. autogluon/timeseries/models/abstract/__init__.py +2 -2
  8. autogluon/timeseries/models/abstract/abstract_timeseries_model.py +178 -129
  9. autogluon/timeseries/models/chronos/model.py +3 -2
  10. autogluon/timeseries/models/ensemble/__init__.py +3 -2
  11. autogluon/timeseries/models/ensemble/abstract.py +139 -0
  12. autogluon/timeseries/models/ensemble/basic.py +88 -0
  13. autogluon/timeseries/models/ensemble/{greedy_ensemble.py → greedy.py} +67 -61
  14. autogluon/timeseries/models/presets.py +0 -4
  15. autogluon/timeseries/predictor.py +51 -26
  16. autogluon/timeseries/trainer.py +35 -27
  17. autogluon/timeseries/utils/features.py +4 -1
  18. autogluon/timeseries/utils/warning_filters.py +1 -1
  19. autogluon/timeseries/version.py +1 -1
  20. {autogluon.timeseries-1.2.1b20250422.dist-info → autogluon.timeseries-1.2.1b20250424.dist-info}/METADATA +5 -4
  21. {autogluon.timeseries-1.2.1b20250422.dist-info → autogluon.timeseries-1.2.1b20250424.dist-info}/RECORD +28 -27
  22. autogluon/timeseries/models/ensemble/abstract_timeseries_ensemble.py +0 -86
  23. /autogluon.timeseries-1.2.1b20250422-py3.9-nspkg.pth → /autogluon.timeseries-1.2.1b20250424-py3.9-nspkg.pth +0 -0
  24. {autogluon.timeseries-1.2.1b20250422.dist-info → autogluon.timeseries-1.2.1b20250424.dist-info}/LICENSE +0 -0
  25. {autogluon.timeseries-1.2.1b20250422.dist-info → autogluon.timeseries-1.2.1b20250424.dist-info}/NOTICE +0 -0
  26. {autogluon.timeseries-1.2.1b20250422.dist-info → autogluon.timeseries-1.2.1b20250424.dist-info}/WHEEL +0 -0
  27. {autogluon.timeseries-1.2.1b20250422.dist-info → autogluon.timeseries-1.2.1b20250424.dist-info}/namespace_packages.txt +0 -0
  28. {autogluon.timeseries-1.2.1b20250422.dist-info → autogluon.timeseries-1.2.1b20250424.dist-info}/top_level.txt +0 -0
  29. {autogluon.timeseries-1.2.1b20250422.dist-info → autogluon.timeseries-1.2.1b20250424.dist-info}/zip-safe +0 -0
@@ -398,7 +398,7 @@ class AbstractFeatureImportanceTransform:
398
398
  """Transforms a series with the same index as the pandas DataFrame"""
399
399
  raise NotImplementedError
400
400
 
401
- def _transform_series(self, feature_data: pd.Series, is_categorical: bool) -> TimeSeriesDataFrame:
401
+ def _transform_series(self, feature_data: pd.Series, is_categorical: bool) -> pd.Series:
402
402
  """Transforms a series with the same index as the pandas DataFrame"""
403
403
  raise NotImplementedError
404
404
 
@@ -420,6 +420,7 @@ class AbstractFeatureImportanceTransform:
420
420
  with warning_filter():
421
421
  data[feature_name].update(self._transform_series(feature_data, is_categorical=is_categorical))
422
422
  elif feature_name in self.covariate_metadata.static_features:
423
+ assert data.static_features is not None
423
424
  feature_data = data.static_features[feature_name].copy()
424
425
  feature_data.reset_index(drop=True, inplace=True)
425
426
  data.static_features[feature_name] = self._transform_static_series(
@@ -459,6 +460,8 @@ class PermutationFeatureImportanceTransform(AbstractFeatureImportanceTransform):
459
460
  )
460
461
  elif self.shuffle_type == "naive":
461
462
  return pd.Series(feature_data.sample(frac=1, random_state=rng).values, index=feature_data.index)
463
+ else:
464
+ raise ValueError(f"Unknown shuffle_type: {self.shuffle_type}")
462
465
 
463
466
 
464
467
  class ConstantReplacementFeatureImportanceTransform(AbstractFeatureImportanceTransform):
@@ -57,7 +57,7 @@ def disable_tqdm():
57
57
  from tqdm import tqdm
58
58
 
59
59
  _init = tqdm.__init__
60
- tqdm.__init__ = functools.partialmethod(tqdm.__init__, disable=True)
60
+ tqdm.__init__ = functools.partialmethod(tqdm.__init__, disable=True) # type: ignore
61
61
  yield
62
62
  except ImportError:
63
63
  yield
@@ -1,4 +1,4 @@
1
1
  """This is the autogluon version file."""
2
2
 
3
- __version__ = "1.2.1b20250422"
3
+ __version__ = "1.2.1b20250424"
4
4
  __lite__ = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autogluon.timeseries
3
- Version: 1.2.1b20250422
3
+ Version: 1.2.1b20250424
4
4
  Summary: Fast and Accurate ML in 3 Lines of Code
5
5
  Home-page: https://github.com/autogluon/autogluon
6
6
  Author: AutoGluon Community
@@ -55,9 +55,10 @@ Requires-Dist: fugue>=0.9.0
55
55
  Requires-Dist: tqdm<5,>=4.38
56
56
  Requires-Dist: orjson~=3.9
57
57
  Requires-Dist: tensorboard<3,>=2.9
58
- Requires-Dist: autogluon.core[raytune]==1.2.1b20250422
59
- Requires-Dist: autogluon.common==1.2.1b20250422
60
- Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost]==1.2.1b20250422
58
+ Requires-Dist: autogluon.core[raytune]==1.2.1b20250424
59
+ Requires-Dist: autogluon.common==1.2.1b20250424
60
+ Requires-Dist: autogluon.features==1.2.1b20250424
61
+ Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost]==1.2.1b20250424
61
62
  Provides-Extra: all
62
63
  Provides-Extra: chronos-onnx
63
64
  Requires-Dist: optimum[onnxruntime]<1.23,>=1.17; extra == "chronos-onnx"
@@ -1,25 +1,25 @@
1
- autogluon.timeseries-1.2.1b20250422-py3.9-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
1
+ autogluon.timeseries-1.2.1b20250424-py3.9-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
2
2
  autogluon/timeseries/__init__.py,sha256=_CrLLc1fkjen7UzWoO0Os8WZoHOgvZbHKy46I8v_4k4,304
3
3
  autogluon/timeseries/evaluator.py,sha256=l642tYfTHsl8WVIq_vV6qhgAFVFr9UuZD7gLra3A_Kc,250
4
- autogluon/timeseries/learner.py,sha256=F3RhHCFc4EB3QmKSaYV9WH7vvoN5T8HoneSdraNJ_2Q,14281
5
- autogluon/timeseries/predictor.py,sha256=Fvf1C2Eap61DIc6a5aYcbSOOqKdzroU83MgWpqfhM-k,86680
4
+ autogluon/timeseries/learner.py,sha256=7dqSHKCIX2osjv9cmWWLwaGvdrPvla0HTnsR75bdenY,14112
5
+ autogluon/timeseries/predictor.py,sha256=AIgThzVtqjytEbNZjKM5SdmDJ3PtD-4hyjGBWnI2ot8,88012
6
6
  autogluon/timeseries/regressor.py,sha256=xw5VPrXS-NQ_Ts4ppDjoNV0TdqUYjW4VINUtb_BZdiI,11868
7
7
  autogluon/timeseries/splitter.py,sha256=yzPca9p2bWV-_VJAptUyyzQsxu-uixAdpMoGQtDzMD4,3205
8
- autogluon/timeseries/trainer.py,sha256=R_u7a90PyB9apSMknEGMwpcMRXvepuNnn0NAACw5sSg,57942
9
- autogluon/timeseries/version.py,sha256=CZZ1almZ8IwUvIs8IcJ7fdkqLQwq9WIQ8u_uKA5X8YU,91
8
+ autogluon/timeseries/trainer.py,sha256=-8UBCe_uzwOoMk8wHgVEEhN7mN2biumUzGrf5YY6n4w,58131
9
+ autogluon/timeseries/version.py,sha256=loINeigkP0uoD8mSz8xCUY3ZkGa6XAO4_zkczMDg1so,91
10
10
  autogluon/timeseries/configs/__init__.py,sha256=BTtHIPCYeGjqgOcvqb8qPD4VNX-ICKOg6wnkew1cPOE,98
11
11
  autogluon/timeseries/configs/presets_configs.py,sha256=cLat8ecLlWrI-SC5KLBDCX2SbVXaucemy2pjxJAtSY0,2543
12
12
  autogluon/timeseries/dataset/__init__.py,sha256=UvnhAN5tjgxXTHoZMQDy64YMDj4Xxa68yY7NP4vAw0o,81
13
- autogluon/timeseries/dataset/ts_dataframe.py,sha256=SodnGhEA2V-hnfYHuAkH8rK4hQlLH8K5Tb6dsGapvPM,47161
14
- autogluon/timeseries/metrics/__init__.py,sha256=IWEG1X0NP_WbBwgLO7iC9TAoKZD7v-G6rrzqgWqhx08,3552
15
- autogluon/timeseries/metrics/abstract.py,sha256=nrnFZpBJo6f7zg5fbqJoLubTZyQdj3_rh-Z8D5qfxAk,8825
16
- autogluon/timeseries/metrics/point.py,sha256=yHs5ivgINO8WlhkhERVBFyP-hgk2tjBSJsOF7OszYgk,18814
17
- autogluon/timeseries/metrics/quantile.py,sha256=s2N70vdVgMVJpaFNBCbOfmvYVKZMlSyqfyy75WLpzZY,4552
13
+ autogluon/timeseries/dataset/ts_dataframe.py,sha256=K-rC4pgy-QjPf3WBgpqxTLsxbmJeWb0Su_1C5wiOx3I,47873
14
+ autogluon/timeseries/metrics/__init__.py,sha256=dJCrZ2cHwqhqNctwQjwG-FHgGUmzIFT-D0z72f4RAVM,2104
15
+ autogluon/timeseries/metrics/abstract.py,sha256=CHUZB6xt9oF9yijSOjgGtjLuKo2X0mT6dQDuwg4ZzpU,8192
16
+ autogluon/timeseries/metrics/point.py,sha256=2nlieQcPBCI9hXMT3v0Oe802ykZDuzvEtDpunzt0IVA,15785
17
+ autogluon/timeseries/metrics/quantile.py,sha256=wvFeDMvRf1mFurhvVr_7g13Kg-hKIRoW4y9t2no_e7A,3969
18
18
  autogluon/timeseries/metrics/utils.py,sha256=HuDe1BNe8yJU4f_DKM913nNrUueoRaw6zhxm1-S20s0,910
19
19
  autogluon/timeseries/models/__init__.py,sha256=MYD9JJ-wUDE5B6jW6E6LU2eXQ6vflfQBvqQJkdzJa3A,1189
20
- autogluon/timeseries/models/presets.py,sha256=k5V2GgH5xFEqDrHBhfnLph61ASq_B1elcPLPurvFo0U,12431
21
- autogluon/timeseries/models/abstract/__init__.py,sha256=wvDsQAZIV0N3AwBeMaGItoQ82trEfnT-nol2AAOIxBg,102
22
- autogluon/timeseries/models/abstract/abstract_timeseries_model.py,sha256=UeSgldAHam7hI0J8jY4ALJLwZNC3_hRjo8NdK1UesyA,31247
20
+ autogluon/timeseries/models/presets.py,sha256=BdSTW91-flgqhVNuZIvqEf7wUj1iB6BPger4tJaoAZQ,12322
21
+ autogluon/timeseries/models/abstract/__init__.py,sha256=Htfkjjc3vo92RvyM8rIlQ0PLWt3jcrCKZES07UvCMV0,146
22
+ autogluon/timeseries/models/abstract/abstract_timeseries_model.py,sha256=ZaMkFUgr3YTxGAjm3k3xZCp0bIbgelTzZ2kwWqQ1IQ4,32978
23
23
  autogluon/timeseries/models/abstract/model_trial.py,sha256=ENPg_7nsdxIvaNM0o0UShZ3x8jFlRmwRc5m0fGPC0TM,3720
24
24
  autogluon/timeseries/models/abstract/tunable.py,sha256=SFl4vjkb6BfFFaRPVdftnnLYlIyCThutLHxiiAlV6tY,7168
25
25
  autogluon/timeseries/models/autogluon_tabular/__init__.py,sha256=r9i6jWcyeLHYClkcMSKRVsfrkBUMxpDrTATNTBc_qgQ,136
@@ -27,15 +27,16 @@ autogluon/timeseries/models/autogluon_tabular/mlforecast.py,sha256=QaQcImTXJpzl-
27
27
  autogluon/timeseries/models/autogluon_tabular/transforms.py,sha256=CVvNun8DKH7UQGyXU-iO2xmvBIHRQElw72gIrZ7QjkU,2504
28
28
  autogluon/timeseries/models/autogluon_tabular/utils.py,sha256=Fn3Vu_Q0PCtEUbtNgLp1xIblg7dOdpFlF3W5kLHgruI,63
29
29
  autogluon/timeseries/models/chronos/__init__.py,sha256=wT77HzTtmQxW3sw2k0mA5Ot6PSHivX-Uvn5fjM05EU4,60
30
- autogluon/timeseries/models/chronos/model.py,sha256=9kKVUBCEdgQ176YM33tvcn3pQsEpv0_OLw7VK-Scxw8,31590
30
+ autogluon/timeseries/models/chronos/model.py,sha256=dYc3nZE6BqpunwI2IyuOm1LGW1RJJEzxYCB5ZW0585E,31649
31
31
  autogluon/timeseries/models/chronos/pipeline/__init__.py,sha256=N-YZH9BGBoi99r5cznJe1zEEjwjIg7cOYIHZkKuJq44,247
32
32
  autogluon/timeseries/models/chronos/pipeline/base.py,sha256=14OAKHmio6LmO4mVom2mPGB0CvIrOjMGJzb-MVSAq-s,5596
33
33
  autogluon/timeseries/models/chronos/pipeline/chronos.py,sha256=uFJLsSb2WQiSrmDZ0g2mO-lhTFUlq7vplGRBXZ9_VBk,22591
34
34
  autogluon/timeseries/models/chronos/pipeline/chronos_bolt.py,sha256=kNIDesojKB3rbEK9jM8st4k7ZeaT6tz1znf4PsRDv2Q,20066
35
35
  autogluon/timeseries/models/chronos/pipeline/utils.py,sha256=dtDX5Pyu95bGv7qmqgfUc1iYowWPY84dnGN0uyqyHyQ,13131
36
- autogluon/timeseries/models/ensemble/__init__.py,sha256=kFr11Gmt7lQJu9Rr8HuIPphQN5l1TsoorfbJm_O3a_s,128
37
- autogluon/timeseries/models/ensemble/abstract_timeseries_ensemble.py,sha256=LzL64JASiwkLsuFxGToXJGRItcMxq5_Ig2QP5Zm7SHw,3537
38
- autogluon/timeseries/models/ensemble/greedy_ensemble.py,sha256=S9ghBwfSUGT0fvHZl5HHcOPmaBnQE2ZQR0lLrC5TXsE,7610
36
+ autogluon/timeseries/models/ensemble/__init__.py,sha256=_BivnZaOWJiIvu93IQy0mrLdCZKT2NHHSqkf31hwF2s,158
37
+ autogluon/timeseries/models/ensemble/abstract.py,sha256=ie-BKD4JIkQQoKqtf6sYI5Aix7dSgywFsSdeGPxoElk,5821
38
+ autogluon/timeseries/models/ensemble/basic.py,sha256=BRPWg_Wgfb87iInFSoTRE75BRHaovRR5HFRvzxET_wU,3423
39
+ autogluon/timeseries/models/ensemble/greedy.py,sha256=2MVLTPvJ9Khuqri1gwQlo0RmKFeWK4qFkEcLH1Dh41E,7362
39
40
  autogluon/timeseries/models/gluonts/__init__.py,sha256=asC1PTj4j9xMbilvk1IT1julnpeoKbv5ZNuAR6-DFgA,361
40
41
  autogluon/timeseries/models/gluonts/abstract_gluonts.py,sha256=35T8rty6sPGiaSFNpiVNmeseo1_qpn664UcWo92W5eI,32906
41
42
  autogluon/timeseries/models/gluonts/torch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -51,19 +52,19 @@ autogluon/timeseries/transforms/__init__.py,sha256=fkFc4Q1Dlh0vVRgO7nPD7BgNL9dOk
51
52
  autogluon/timeseries/transforms/covariate_scaler.py,sha256=G56PTHKqCFKiXRKLkLun7mN3-T09jxN-5oI1ISADJdQ,7042
52
53
  autogluon/timeseries/transforms/target_scaler.py,sha256=BeT1aP51Wq9EidxC0dVg6dHvampKafpG1uKu4ZaaJPs,6050
53
54
  autogluon/timeseries/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
- autogluon/timeseries/utils/features.py,sha256=IahkFgY3zzBqldrBtx4WTmxhUTb1CklZQA8RbTOzc48,22527
55
+ autogluon/timeseries/utils/features.py,sha256=7gyRkuD2sMwJivF6O_bW7kADJBnCbBM055CnwkoU94I,22658
55
56
  autogluon/timeseries/utils/forecast.py,sha256=vd0Y5YsHU6awu4E7xyDXQGe21P1aB26gwFsA3m09mKw,2197
56
- autogluon/timeseries/utils/warning_filters.py,sha256=FyXvYW_ylULcZP4R9xNBxojKtvadW3uygXwHK_xHq5g,2522
57
+ autogluon/timeseries/utils/warning_filters.py,sha256=tHvhj9y7c3MP6JrjAedc7UiFFw0_mKYziDQupw8NhiQ,2538
57
58
  autogluon/timeseries/utils/datetime/__init__.py,sha256=bTMR8jLh1LW55vHjbOr1zvWRMF_PqbvxpS-cUcNIDWI,173
58
59
  autogluon/timeseries/utils/datetime/base.py,sha256=3NdsH3NDq4cVAOSoy3XpaNixyNlbjy4DJ_YYOGuu9x4,1341
59
60
  autogluon/timeseries/utils/datetime/lags.py,sha256=gQDk5_zmsY5DUWDUpSaCKYkQ9nHKKY-LsywJQRAoYSk,5988
60
61
  autogluon/timeseries/utils/datetime/seasonality.py,sha256=YK_2k8hvYIMW-sJPnjGWRtCnvIOthwA2hATB3nwVoD4,834
61
62
  autogluon/timeseries/utils/datetime/time_features.py,sha256=MjLi3zQ00uWWJtXH9oGX2GJkTbvjdSiuabSa4kcVuxE,2672
62
- autogluon.timeseries-1.2.1b20250422.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
63
- autogluon.timeseries-1.2.1b20250422.dist-info/METADATA,sha256=4UirSdHj-jRgjGXA8AAVHrCVhTECV4Za_K6-yidbEJc,12687
64
- autogluon.timeseries-1.2.1b20250422.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
65
- autogluon.timeseries-1.2.1b20250422.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
66
- autogluon.timeseries-1.2.1b20250422.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
67
- autogluon.timeseries-1.2.1b20250422.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
68
- autogluon.timeseries-1.2.1b20250422.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
69
- autogluon.timeseries-1.2.1b20250422.dist-info/RECORD,,
63
+ autogluon.timeseries-1.2.1b20250424.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
64
+ autogluon.timeseries-1.2.1b20250424.dist-info/METADATA,sha256=UAKQzIEQ7dyWUtNzTZez2aSAa2tvwpMflldTFzY4hOw,12737
65
+ autogluon.timeseries-1.2.1b20250424.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
66
+ autogluon.timeseries-1.2.1b20250424.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
67
+ autogluon.timeseries-1.2.1b20250424.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
68
+ autogluon.timeseries-1.2.1b20250424.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
69
+ autogluon.timeseries-1.2.1b20250424.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
70
+ autogluon.timeseries-1.2.1b20250424.dist-info/RECORD,,
@@ -1,86 +0,0 @@
1
- import logging
2
- from typing import Dict, List, Optional
3
-
4
- from autogluon.core.utils.exceptions import TimeLimitExceeded
5
- from autogluon.timeseries.dataset import TimeSeriesDataFrame
6
- from autogluon.timeseries.models.abstract import AbstractTimeSeriesModel
7
-
8
- logger = logging.getLogger(__name__)
9
-
10
-
11
- class AbstractTimeSeriesEnsembleModel(AbstractTimeSeriesModel):
12
- """Abstract class for time series ensemble models."""
13
-
14
- @property
15
- def model_names(self) -> List[str]:
16
- """Names of base models included in the ensemble."""
17
- raise NotImplementedError
18
-
19
- def fit_ensemble(
20
- self,
21
- predictions_per_window: Dict[str, List[TimeSeriesDataFrame]],
22
- data_per_window: List[TimeSeriesDataFrame],
23
- time_limit: Optional[float] = None,
24
- **kwargs,
25
- ):
26
- """Fit ensemble model given predictions of candidate base models and the true data.
27
-
28
- Parameters
29
- ----------
30
- predictions_per_window : Dict[str, List[TimeSeriesDataFrame]]
31
- Dictionary that maps the names of component models to their respective predictions for each validation
32
- window.
33
- data_per_window : List[TimeSeriesDataFrame]
34
- Observed ground truth data used to train the ensemble for each validation window. Each entry in the list
35
- includes both the forecast horizon (for which the predictions are given in ``predictions``), as well as the
36
- "history".
37
- time_limit : Optional[int]
38
- Maximum allowed time for training in seconds.
39
- """
40
- if time_limit is not None and time_limit <= 0:
41
- logger.warning(
42
- f"\tWarning: Model has no time left to train, skipping model... (Time Left = {round(time_limit, 1)}s)"
43
- )
44
- raise TimeLimitExceeded
45
- if isinstance(data_per_window, TimeSeriesDataFrame):
46
- raise ValueError("When fitting ensemble, `data` should contain ground truth for each validation window")
47
- num_val_windows = len(data_per_window)
48
- for model, preds in predictions_per_window.items():
49
- if len(preds) != num_val_windows:
50
- raise ValueError(f"For model {model} predictions are unavailable for some validation windows")
51
- self._fit_ensemble(
52
- predictions_per_window=predictions_per_window,
53
- data_per_window=data_per_window,
54
- time_limit=time_limit,
55
- )
56
- return self
57
-
58
- def _fit_ensemble(
59
- self,
60
- predictions_per_window: Dict[str, List[TimeSeriesDataFrame]],
61
- data_per_window: List[TimeSeriesDataFrame],
62
- time_limit: Optional[int] = None,
63
- **kwargs,
64
- ):
65
- """Private method for `fit_ensemble`. See `fit_ensemble` for documentation of arguments. Apart from the model
66
- training logic, `fit_ensemble` additionally implements other logic such as keeping track of the time limit.
67
- """
68
- raise NotImplementedError
69
-
70
- def predict(self, data: Dict[str, Optional[TimeSeriesDataFrame]], **kwargs) -> TimeSeriesDataFrame:
71
- raise NotImplementedError
72
-
73
- def remap_base_models(self, model_refit_map: Dict[str, str]) -> None:
74
- """Update names of the base models based on the mapping in model_refit_map.
75
-
76
- This method should be called after performing refit_full to point to the refitted base models, if necessary.
77
- """
78
- raise NotImplementedError
79
-
80
- # TODO: remove
81
- def _fit(*args, **kwargs):
82
- pass
83
-
84
- # TODO: remove
85
- def _predict(*args, **kwargs):
86
- pass