autogluon.timeseries 1.2.1b20250224__py3-none-any.whl → 1.4.1b20251215__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.

Potentially problematic release.


This version of autogluon.timeseries might be problematic. Click here for more details.

Files changed (108) hide show
  1. autogluon/timeseries/configs/__init__.py +3 -2
  2. autogluon/timeseries/configs/hyperparameter_presets.py +62 -0
  3. autogluon/timeseries/configs/predictor_presets.py +106 -0
  4. autogluon/timeseries/dataset/ts_dataframe.py +256 -141
  5. autogluon/timeseries/learner.py +86 -52
  6. autogluon/timeseries/metrics/__init__.py +42 -8
  7. autogluon/timeseries/metrics/abstract.py +89 -19
  8. autogluon/timeseries/metrics/point.py +142 -53
  9. autogluon/timeseries/metrics/quantile.py +46 -21
  10. autogluon/timeseries/metrics/utils.py +4 -4
  11. autogluon/timeseries/models/__init__.py +8 -2
  12. autogluon/timeseries/models/abstract/__init__.py +2 -2
  13. autogluon/timeseries/models/abstract/abstract_timeseries_model.py +361 -592
  14. autogluon/timeseries/models/abstract/model_trial.py +2 -1
  15. autogluon/timeseries/models/abstract/tunable.py +189 -0
  16. autogluon/timeseries/models/autogluon_tabular/__init__.py +2 -0
  17. autogluon/timeseries/models/autogluon_tabular/mlforecast.py +282 -194
  18. autogluon/timeseries/models/autogluon_tabular/per_step.py +513 -0
  19. autogluon/timeseries/models/autogluon_tabular/transforms.py +25 -18
  20. autogluon/timeseries/models/chronos/__init__.py +2 -1
  21. autogluon/timeseries/models/chronos/chronos2.py +361 -0
  22. autogluon/timeseries/models/chronos/model.py +219 -138
  23. autogluon/timeseries/models/chronos/{pipeline/utils.py → utils.py} +81 -50
  24. autogluon/timeseries/models/ensemble/__init__.py +37 -2
  25. autogluon/timeseries/models/ensemble/abstract.py +107 -0
  26. autogluon/timeseries/models/ensemble/array_based/__init__.py +3 -0
  27. autogluon/timeseries/models/ensemble/array_based/abstract.py +240 -0
  28. autogluon/timeseries/models/ensemble/array_based/models.py +185 -0
  29. autogluon/timeseries/models/ensemble/array_based/regressor/__init__.py +12 -0
  30. autogluon/timeseries/models/ensemble/array_based/regressor/abstract.py +88 -0
  31. autogluon/timeseries/models/ensemble/array_based/regressor/linear_stacker.py +186 -0
  32. autogluon/timeseries/models/ensemble/array_based/regressor/per_quantile_tabular.py +94 -0
  33. autogluon/timeseries/models/ensemble/array_based/regressor/tabular.py +107 -0
  34. autogluon/timeseries/models/ensemble/ensemble_selection.py +167 -0
  35. autogluon/timeseries/models/ensemble/per_item_greedy.py +172 -0
  36. autogluon/timeseries/models/ensemble/weighted/__init__.py +8 -0
  37. autogluon/timeseries/models/ensemble/weighted/abstract.py +45 -0
  38. autogluon/timeseries/models/ensemble/weighted/basic.py +91 -0
  39. autogluon/timeseries/models/ensemble/weighted/greedy.py +62 -0
  40. autogluon/timeseries/models/gluonts/__init__.py +1 -1
  41. autogluon/timeseries/models/gluonts/{abstract_gluonts.py → abstract.py} +148 -208
  42. autogluon/timeseries/models/gluonts/dataset.py +109 -0
  43. autogluon/timeseries/models/gluonts/{torch/models.py → models.py} +38 -22
  44. autogluon/timeseries/models/local/__init__.py +0 -7
  45. autogluon/timeseries/models/local/abstract_local_model.py +71 -74
  46. autogluon/timeseries/models/local/naive.py +13 -9
  47. autogluon/timeseries/models/local/npts.py +9 -2
  48. autogluon/timeseries/models/local/statsforecast.py +52 -36
  49. autogluon/timeseries/models/multi_window/multi_window_model.py +65 -45
  50. autogluon/timeseries/models/registry.py +64 -0
  51. autogluon/timeseries/models/toto/__init__.py +3 -0
  52. autogluon/timeseries/models/toto/_internal/__init__.py +9 -0
  53. autogluon/timeseries/models/toto/_internal/backbone/__init__.py +3 -0
  54. autogluon/timeseries/models/toto/_internal/backbone/attention.py +196 -0
  55. autogluon/timeseries/models/toto/_internal/backbone/backbone.py +262 -0
  56. autogluon/timeseries/models/toto/_internal/backbone/distribution.py +70 -0
  57. autogluon/timeseries/models/toto/_internal/backbone/kvcache.py +136 -0
  58. autogluon/timeseries/models/toto/_internal/backbone/rope.py +89 -0
  59. autogluon/timeseries/models/toto/_internal/backbone/rotary_embedding_torch.py +342 -0
  60. autogluon/timeseries/models/toto/_internal/backbone/scaler.py +305 -0
  61. autogluon/timeseries/models/toto/_internal/backbone/transformer.py +333 -0
  62. autogluon/timeseries/models/toto/_internal/dataset.py +165 -0
  63. autogluon/timeseries/models/toto/_internal/forecaster.py +423 -0
  64. autogluon/timeseries/models/toto/dataloader.py +108 -0
  65. autogluon/timeseries/models/toto/hf_pretrained_model.py +200 -0
  66. autogluon/timeseries/models/toto/model.py +249 -0
  67. autogluon/timeseries/predictor.py +685 -297
  68. autogluon/timeseries/regressor.py +94 -44
  69. autogluon/timeseries/splitter.py +8 -32
  70. autogluon/timeseries/trainer/__init__.py +3 -0
  71. autogluon/timeseries/trainer/ensemble_composer.py +444 -0
  72. autogluon/timeseries/trainer/model_set_builder.py +256 -0
  73. autogluon/timeseries/trainer/prediction_cache.py +149 -0
  74. autogluon/timeseries/{trainer.py → trainer/trainer.py} +387 -390
  75. autogluon/timeseries/trainer/utils.py +17 -0
  76. autogluon/timeseries/transforms/__init__.py +2 -13
  77. autogluon/timeseries/transforms/covariate_scaler.py +34 -40
  78. autogluon/timeseries/transforms/target_scaler.py +37 -20
  79. autogluon/timeseries/utils/constants.py +10 -0
  80. autogluon/timeseries/utils/datetime/lags.py +3 -5
  81. autogluon/timeseries/utils/datetime/seasonality.py +1 -3
  82. autogluon/timeseries/utils/datetime/time_features.py +2 -2
  83. autogluon/timeseries/utils/features.py +70 -47
  84. autogluon/timeseries/utils/forecast.py +19 -14
  85. autogluon/timeseries/utils/timer.py +173 -0
  86. autogluon/timeseries/utils/warning_filters.py +4 -2
  87. autogluon/timeseries/version.py +1 -1
  88. autogluon.timeseries-1.4.1b20251215-py3.11-nspkg.pth +1 -0
  89. {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info}/METADATA +49 -36
  90. autogluon_timeseries-1.4.1b20251215.dist-info/RECORD +103 -0
  91. {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info}/WHEEL +1 -1
  92. autogluon/timeseries/configs/presets_configs.py +0 -79
  93. autogluon/timeseries/evaluator.py +0 -6
  94. autogluon/timeseries/models/chronos/pipeline/__init__.py +0 -11
  95. autogluon/timeseries/models/chronos/pipeline/base.py +0 -160
  96. autogluon/timeseries/models/chronos/pipeline/chronos.py +0 -585
  97. autogluon/timeseries/models/chronos/pipeline/chronos_bolt.py +0 -518
  98. autogluon/timeseries/models/ensemble/abstract_timeseries_ensemble.py +0 -78
  99. autogluon/timeseries/models/ensemble/greedy_ensemble.py +0 -170
  100. autogluon/timeseries/models/gluonts/torch/__init__.py +0 -0
  101. autogluon/timeseries/models/presets.py +0 -360
  102. autogluon.timeseries-1.2.1b20250224-py3.9-nspkg.pth +0 -1
  103. autogluon.timeseries-1.2.1b20250224.dist-info/RECORD +0 -68
  104. {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info/licenses}/LICENSE +0 -0
  105. {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info/licenses}/NOTICE +0 -0
  106. {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info}/namespace_packages.txt +0 -0
  107. {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info}/top_level.txt +0 -0
  108. {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info}/zip-safe +0 -0
@@ -1,76 +1,93 @@
1
1
  import logging
2
2
  import time
3
- from typing import Any, Dict, Optional
3
+ from typing import Any, Protocol, overload, runtime_checkable
4
4
 
5
5
  import numpy as np
6
6
  import pandas as pd
7
7
 
8
8
  from autogluon.core.models import AbstractModel
9
- from autogluon.tabular.trainer.model_presets.presets import MODEL_TYPES as TABULAR_MODEL_TYPES
10
- from autogluon.timeseries.dataset.ts_dataframe import ITEMID, TimeSeriesDataFrame
9
+ from autogluon.tabular.registry import ag_model_registry as tabular_ag_model_registry
10
+ from autogluon.timeseries.dataset import TimeSeriesDataFrame
11
11
  from autogluon.timeseries.utils.features import CovariateMetadata
12
12
 
13
13
  logger = logging.getLogger(__name__)
14
14
 
15
15
 
16
- class CovariateRegressor:
16
+ @runtime_checkable
17
+ class CovariateRegressor(Protocol):
18
+ def is_fit(self) -> bool: ...
19
+
20
+ def fit(self, data: TimeSeriesDataFrame, time_limit: float | None = None, **kwargs) -> "CovariateRegressor": ...
21
+
22
+ def transform(self, data: TimeSeriesDataFrame) -> TimeSeriesDataFrame: ...
23
+
24
+ def fit_transform(
25
+ self, data: TimeSeriesDataFrame, time_limit: float | None = None, **kwargs
26
+ ) -> TimeSeriesDataFrame: ...
27
+
28
+ def inverse_transform(
29
+ self,
30
+ predictions: TimeSeriesDataFrame,
31
+ known_covariates: TimeSeriesDataFrame,
32
+ static_features: pd.DataFrame | None,
33
+ ) -> TimeSeriesDataFrame: ...
34
+
35
+
36
+ class GlobalCovariateRegressor(CovariateRegressor):
17
37
  """Predicts target values from the covariates for the same observation.
18
38
 
19
39
  The model construct the feature matrix using known_covariates and static_features.
20
40
 
21
41
  Parameters
22
42
  ----------
23
- model_name : str
24
- Name of the tabular regression model. See `autogluon.tabular.trainer.model_presets.presets.MODEL_TYPES` for the
25
- list of available models.
26
- model_hyperparameters : dict or None
43
+ model_name
44
+ Name of the tabular regression model. See ``autogluon.tabular.registry.ag_model_registry`` or
45
+ `the documentation <https://auto.gluon.ai/stable/api/autogluon.tabular.models.html>`_ for the list of available
46
+ tabular models.
47
+ model_hyperparameters
27
48
  Hyperparameters passed to the tabular regression model.
28
- eval_metric : str
29
- Metric provided as `eval_metric` to the tabular regression model. Must be compatible with `problem_type="regression"`.
30
- refit_during_predict : bool
31
- If True, the model will be re-trained every time `fit_transform` is called. If False, the model will only be
32
- trained the first time that `fit_transform` is called, and future calls to `fit_transform` will only perform a
33
- `transform`.
34
- max_num_samples : int or None
49
+ eval_metric
50
+ Metric provided as ``eval_metric`` to the tabular regression model. Must be compatible with `problem_type="regression"`.
51
+ refit_during_predict
52
+ If True, the model will be re-trained every time ``fit_transform`` is called. If False, the model will only be
53
+ trained the first time that ``fit_transform`` is called, and future calls to ``fit_transform`` will only perform a
54
+ ``transform``.
55
+ max_num_samples
35
56
  If not None, training dataset passed to regression model will contain at most this many rows.
36
- metadata : CovariateMetadata
57
+ covariate_metadata
37
58
  Metadata object describing the covariates available in the dataset.
38
- target : str
59
+ target
39
60
  Name of the target column.
40
- validation_fraction : float, optional
61
+ validation_fraction
41
62
  Fraction of observations that are reserved as the validation set during training (starting from the end of each
42
63
  time series).
43
- fit_time_fraction: float
64
+ fit_time_fraction
44
65
  The fraction of the time_limit that will be reserved for model training. The remainder (1 - fit_time_fraction)
45
66
  will be reserved for prediction.
46
67
 
47
- If the estimated prediction time exceeds `(1 - fit_time_fraction) * time_limit`, the regressor will be disabled.
48
- include_static_features: bool
68
+ If the estimated prediction time exceeds ``(1 - fit_time_fraction) * time_limit``, the regressor will be disabled.
69
+ include_static_features
49
70
  If True, static features will be included as features for the regressor.
50
- include_item_id: bool
71
+ include_item_id
51
72
  If True, item_id will be included as a categorical feature for the regressor.
52
73
  """
53
74
 
54
75
  def __init__(
55
76
  self,
56
77
  model_name: str = "CAT",
57
- model_hyperparameters: Optional[Dict[str, Any]] = None,
78
+ model_hyperparameters: dict[str, Any] | None = None,
58
79
  eval_metric: str = "mean_absolute_error",
59
80
  refit_during_predict: bool = False,
60
- max_num_samples: Optional[int] = 500_000,
61
- metadata: Optional[CovariateMetadata] = None,
81
+ max_num_samples: int | None = 500_000,
82
+ covariate_metadata: CovariateMetadata | None = None,
62
83
  target: str = "target",
63
- validation_fraction: Optional[float] = 0.1,
84
+ validation_fraction: float | None = 0.1,
64
85
  fit_time_fraction: float = 0.5,
65
86
  include_static_features: bool = True,
66
87
  include_item_id: bool = False,
67
88
  ):
68
- if model_name not in TABULAR_MODEL_TYPES:
69
- raise ValueError(
70
- f"Tabular model {model_name} not supported. Available models: {list(TABULAR_MODEL_TYPES)}"
71
- )
72
89
  self.target = target
73
- self.model_type = TABULAR_MODEL_TYPES[model_name]
90
+ self.model_type = tabular_ag_model_registry.key_to_cls(model_name)
74
91
  self.model_name = model_name
75
92
  self.model_hyperparameters = model_hyperparameters or {}
76
93
  self.refit_during_predict = refit_during_predict
@@ -81,14 +98,14 @@ class CovariateRegressor:
81
98
  self.include_static_features = include_static_features
82
99
  self.include_item_id = include_item_id
83
100
 
84
- self.model: Optional[AbstractModel] = None
101
+ self.model: AbstractModel | None = None
85
102
  self.disabled = False
86
- self.metadata = metadata or CovariateMetadata()
103
+ self.covariate_metadata = covariate_metadata or CovariateMetadata()
87
104
 
88
105
  def is_fit(self) -> bool:
89
106
  return self.model is not None
90
107
 
91
- def fit(self, data: TimeSeriesDataFrame, time_limit: Optional[float] = None, **kwargs) -> "CovariateRegressor":
108
+ def fit(self, data: TimeSeriesDataFrame, time_limit: float | None = None, **kwargs) -> "CovariateRegressor":
92
109
  """Fit the tabular regressor on the target column using covariates as features."""
93
110
  start_time = time.monotonic()
94
111
  tabular_df = self._get_tabular_df(data, static_features=data.static_features, include_target=True)
@@ -97,9 +114,9 @@ class CovariateRegressor:
97
114
  median_ts_length = data.num_timesteps_per_item().median()
98
115
  features_to_drop = [self.target]
99
116
  if not self.include_item_id:
100
- features_to_drop += [ITEMID]
117
+ features_to_drop += [TimeSeriesDataFrame.ITEMID]
101
118
  if self.validation_fraction is not None:
102
- grouped_df = tabular_df.groupby(ITEMID, observed=False, sort=False)
119
+ grouped_df = tabular_df.groupby(TimeSeriesDataFrame.ITEMID, observed=False, sort=False)
103
120
  val_size = max(int(self.validation_fraction * median_ts_length), 1)
104
121
  train_df = self._subsample_df(grouped_df.head(-val_size))
105
122
  val_df = self._subsample_df(grouped_df.tail(val_size))
@@ -124,6 +141,7 @@ class CovariateRegressor:
124
141
  # Has no effect since the model won't be saved to disk.
125
142
  # We provide path to avoid https://github.com/autogluon/autogluon/issues/4832
126
143
  path="",
144
+ name=self.model_type.__name__,
127
145
  )
128
146
  if time_limit is not None:
129
147
  time_limit_fit = self.fit_time_fraction * (time_limit - (time.monotonic() - start_time))
@@ -155,7 +173,7 @@ class CovariateRegressor:
155
173
  return data
156
174
 
157
175
  def fit_transform(
158
- self, data: TimeSeriesDataFrame, time_limit: Optional[float] = None, **kwargs
176
+ self, data: TimeSeriesDataFrame, time_limit: float | None = None, **kwargs
159
177
  ) -> TimeSeriesDataFrame:
160
178
  if not self.is_fit() or self.refit_during_predict:
161
179
  self.fit(data=data, time_limit=time_limit, **kwargs)
@@ -165,7 +183,7 @@ class CovariateRegressor:
165
183
  self,
166
184
  predictions: TimeSeriesDataFrame,
167
185
  known_covariates: TimeSeriesDataFrame,
168
- static_features: Optional[pd.DataFrame],
186
+ static_features: pd.DataFrame | None,
169
187
  ) -> TimeSeriesDataFrame:
170
188
  """Add the tabular regressor predictions to the target column."""
171
189
  if not self.disabled:
@@ -173,27 +191,29 @@ class CovariateRegressor:
173
191
  predictions = predictions.assign(**{col: predictions[col] + y_pred for col in predictions.columns})
174
192
  return predictions
175
193
 
176
- def _predict(self, data: TimeSeriesDataFrame, static_features: Optional[pd.DataFrame]) -> np.ndarray:
194
+ def _predict(self, data: TimeSeriesDataFrame, static_features: pd.DataFrame | None) -> np.ndarray:
177
195
  """Construct the tabular features matrix and make predictions"""
178
196
  assert self.model is not None, "CovariateRegressor must be fit before calling predict."
179
197
  tabular_df = self._get_tabular_df(data, static_features=static_features)
180
198
  if not self.include_item_id:
181
- tabular_df = tabular_df.drop(columns=[ITEMID])
199
+ tabular_df = tabular_df.drop(columns=[TimeSeriesDataFrame.ITEMID])
182
200
  return self.model.predict(X=tabular_df)
183
201
 
184
202
  def _get_tabular_df(
185
203
  self,
186
204
  data: TimeSeriesDataFrame,
187
- static_features: Optional[pd.DataFrame] = None,
205
+ static_features: pd.DataFrame | None = None,
188
206
  include_target: bool = False,
189
207
  ) -> pd.DataFrame:
190
208
  """Construct a tabular dataframe from known covariates and static features."""
191
- available_columns = [ITEMID] + self.metadata.known_covariates
209
+ available_columns = [TimeSeriesDataFrame.ITEMID] + self.covariate_metadata.known_covariates
192
210
  if include_target:
193
211
  available_columns += [self.target]
194
- tabular_df = pd.DataFrame(data).reset_index()[available_columns].astype({ITEMID: "category"})
212
+ tabular_df = (
213
+ pd.DataFrame(data).reset_index()[available_columns].astype({TimeSeriesDataFrame.ITEMID: "category"})
214
+ )
195
215
  if static_features is not None and self.include_static_features:
196
- tabular_df = pd.merge(tabular_df, static_features, on=ITEMID)
216
+ tabular_df = pd.merge(tabular_df, static_features, on=TimeSeriesDataFrame.ITEMID)
197
217
  return tabular_df
198
218
 
199
219
  def _subsample_df(self, df: pd.DataFrame) -> pd.DataFrame:
@@ -201,3 +221,33 @@ class CovariateRegressor:
201
221
  if self.max_num_samples is not None and len(df) > self.max_num_samples:
202
222
  df = df.sample(n=self.max_num_samples)
203
223
  return df
224
+
225
+
226
+ @overload
227
+ def get_covariate_regressor(covariate_regressor: None, target: str, covariate_metadata: CovariateMetadata) -> None: ...
228
+ @overload
229
+ def get_covariate_regressor(
230
+ covariate_regressor: str | dict, target: str, covariate_metadata: CovariateMetadata
231
+ ) -> CovariateRegressor: ...
232
+ def get_covariate_regressor(
233
+ covariate_regressor: str | dict | None, target: str, covariate_metadata: CovariateMetadata
234
+ ) -> CovariateRegressor | None:
235
+ """Create a CovariateRegressor object based on the value of the `covariate_regressor` hyperparameter."""
236
+ if covariate_regressor is None:
237
+ return None
238
+ elif len(covariate_metadata.known_covariates + covariate_metadata.static_features) == 0:
239
+ logger.info(
240
+ "\tSkipping covariate_regressor since the dataset contains no known_covariates or static_features."
241
+ )
242
+ return None
243
+ else:
244
+ if isinstance(covariate_regressor, str):
245
+ return GlobalCovariateRegressor(covariate_regressor, target=target, covariate_metadata=covariate_metadata)
246
+ elif isinstance(covariate_regressor, dict):
247
+ return GlobalCovariateRegressor(
248
+ **covariate_regressor, target=target, covariate_metadata=covariate_metadata
249
+ )
250
+ else:
251
+ raise ValueError(
252
+ f"Invalid value for covariate_regressor {covariate_regressor} of type {type(covariate_regressor)}"
253
+ )
@@ -1,6 +1,6 @@
1
- from typing import Iterator, Optional, Tuple
1
+ from typing import Iterator
2
2
 
3
- from .dataset.ts_dataframe import TimeSeriesDataFrame
3
+ from autogluon.timeseries.dataset import TimeSeriesDataFrame
4
4
 
5
5
  __all__ = [
6
6
  "AbstractWindowSplitter",
@@ -13,7 +13,7 @@ class AbstractWindowSplitter:
13
13
  self.prediction_length = prediction_length
14
14
  self.num_val_windows = num_val_windows
15
15
 
16
- def split(self, data: TimeSeriesDataFrame) -> Iterator[Tuple[TimeSeriesDataFrame, TimeSeriesDataFrame]]:
16
+ def split(self, data: TimeSeriesDataFrame) -> Iterator[tuple[TimeSeriesDataFrame, TimeSeriesDataFrame]]:
17
17
  raise NotImplementedError
18
18
 
19
19
 
@@ -33,21 +33,21 @@ class ExpandingWindowSplitter(AbstractWindowSplitter):
33
33
 
34
34
  Parameters
35
35
  ----------
36
- prediction_length : int
36
+ prediction_length
37
37
  Length of the forecast horizon.
38
- num_val_windows: int, default = 1
38
+ num_val_windows
39
39
  Number of windows to generate from each time series in the dataset.
40
- val_step_size : int, optional
40
+ val_step_size
41
41
  The end of each subsequent window is moved this many time steps forward.
42
42
  """
43
43
 
44
- def __init__(self, prediction_length: int, num_val_windows: int = 1, val_step_size: Optional[int] = None):
44
+ def __init__(self, prediction_length: int, num_val_windows: int = 1, val_step_size: int | None = None):
45
45
  super().__init__(prediction_length=prediction_length, num_val_windows=num_val_windows)
46
46
  if val_step_size is None:
47
47
  val_step_size = prediction_length
48
48
  self.val_step_size = val_step_size
49
49
 
50
- def split(self, data: TimeSeriesDataFrame) -> Iterator[Tuple[TimeSeriesDataFrame, TimeSeriesDataFrame]]:
50
+ def split(self, data: TimeSeriesDataFrame) -> Iterator[tuple[TimeSeriesDataFrame, TimeSeriesDataFrame]]:
51
51
  """Generate train and validation folds for a time series dataset."""
52
52
  for window_idx in range(1, self.num_val_windows + 1):
53
53
  val_end = -(self.num_val_windows - window_idx) * self.val_step_size
@@ -57,27 +57,3 @@ class ExpandingWindowSplitter(AbstractWindowSplitter):
57
57
  train_data = data.slice_by_timestep(None, train_end)
58
58
  val_data = data.slice_by_timestep(None, val_end)
59
59
  yield train_data, val_data
60
-
61
-
62
- class AbstractTimeSeriesSplitter:
63
- def __init__(self, *args, **kwargs):
64
- raise ValueError(
65
- "`AbstractTimeSeriesSplitter` has been deprecated. "
66
- "Please use `autogluon.timeseries.splitter.ExpandingWindowSplitter` instead."
67
- )
68
-
69
-
70
- class MultiWindowSplitter(AbstractTimeSeriesSplitter):
71
- def __init__(self, *args, **kwargs):
72
- raise ValueError(
73
- "`MultiWindowSplitter` has been deprecated. "
74
- "Please use `autogluon.timeseries.splitter.ExpandingWindowSplitter` instead."
75
- )
76
-
77
-
78
- class LastWindowSplitter(MultiWindowSplitter):
79
- def __init__(self, *args, **kwargs):
80
- raise ValueError(
81
- "`LastWindowSplitter` has been deprecated. "
82
- "Please use `autogluon.timeseries.splitter.ExpandingWindowSplitter` instead."
83
- )
@@ -0,0 +1,3 @@
1
+ from .trainer import TimeSeriesTrainer
2
+
3
+ __all__ = ["TimeSeriesTrainer"]