autogluon.timeseries 1.4.1b20250907__py3-none-any.whl → 1.5.1b20260122__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.
- autogluon/timeseries/configs/hyperparameter_presets.py +13 -28
- autogluon/timeseries/configs/predictor_presets.py +23 -39
- autogluon/timeseries/dataset/ts_dataframe.py +97 -86
- autogluon/timeseries/learner.py +70 -35
- autogluon/timeseries/metrics/__init__.py +4 -4
- autogluon/timeseries/metrics/abstract.py +8 -8
- autogluon/timeseries/metrics/point.py +9 -9
- autogluon/timeseries/metrics/quantile.py +5 -5
- autogluon/timeseries/metrics/utils.py +4 -4
- autogluon/timeseries/models/__init__.py +4 -1
- autogluon/timeseries/models/abstract/abstract_timeseries_model.py +52 -50
- autogluon/timeseries/models/abstract/model_trial.py +2 -1
- autogluon/timeseries/models/abstract/tunable.py +8 -8
- autogluon/timeseries/models/autogluon_tabular/mlforecast.py +58 -62
- autogluon/timeseries/models/autogluon_tabular/per_step.py +27 -16
- autogluon/timeseries/models/autogluon_tabular/transforms.py +11 -9
- autogluon/timeseries/models/chronos/__init__.py +2 -1
- autogluon/timeseries/models/chronos/chronos2.py +395 -0
- autogluon/timeseries/models/chronos/model.py +127 -89
- autogluon/timeseries/models/chronos/{pipeline/utils.py → utils.py} +69 -37
- autogluon/timeseries/models/ensemble/__init__.py +36 -2
- autogluon/timeseries/models/ensemble/abstract.py +14 -46
- autogluon/timeseries/models/ensemble/array_based/__init__.py +3 -0
- autogluon/timeseries/models/ensemble/array_based/abstract.py +240 -0
- autogluon/timeseries/models/ensemble/array_based/models.py +185 -0
- autogluon/timeseries/models/ensemble/array_based/regressor/__init__.py +12 -0
- autogluon/timeseries/models/ensemble/array_based/regressor/abstract.py +88 -0
- autogluon/timeseries/models/ensemble/array_based/regressor/linear_stacker.py +186 -0
- autogluon/timeseries/models/ensemble/array_based/regressor/per_quantile_tabular.py +94 -0
- autogluon/timeseries/models/ensemble/array_based/regressor/tabular.py +107 -0
- autogluon/timeseries/models/ensemble/{greedy.py → ensemble_selection.py} +41 -61
- autogluon/timeseries/models/ensemble/per_item_greedy.py +172 -0
- autogluon/timeseries/models/ensemble/weighted/__init__.py +8 -0
- autogluon/timeseries/models/ensemble/weighted/abstract.py +45 -0
- autogluon/timeseries/models/ensemble/{basic.py → weighted/basic.py} +25 -22
- autogluon/timeseries/models/ensemble/weighted/greedy.py +64 -0
- autogluon/timeseries/models/gluonts/abstract.py +32 -31
- autogluon/timeseries/models/gluonts/dataset.py +11 -11
- autogluon/timeseries/models/gluonts/models.py +0 -7
- autogluon/timeseries/models/local/__init__.py +0 -7
- autogluon/timeseries/models/local/abstract_local_model.py +15 -18
- autogluon/timeseries/models/local/naive.py +2 -2
- autogluon/timeseries/models/local/npts.py +7 -1
- autogluon/timeseries/models/local/statsforecast.py +13 -13
- autogluon/timeseries/models/multi_window/multi_window_model.py +39 -24
- autogluon/timeseries/models/registry.py +3 -4
- autogluon/timeseries/models/toto/__init__.py +3 -0
- autogluon/timeseries/models/toto/_internal/__init__.py +9 -0
- autogluon/timeseries/models/toto/_internal/backbone/__init__.py +3 -0
- autogluon/timeseries/models/toto/_internal/backbone/attention.py +196 -0
- autogluon/timeseries/models/toto/_internal/backbone/backbone.py +262 -0
- autogluon/timeseries/models/toto/_internal/backbone/distribution.py +70 -0
- autogluon/timeseries/models/toto/_internal/backbone/kvcache.py +136 -0
- autogluon/timeseries/models/toto/_internal/backbone/rope.py +89 -0
- autogluon/timeseries/models/toto/_internal/backbone/rotary_embedding_torch.py +342 -0
- autogluon/timeseries/models/toto/_internal/backbone/scaler.py +305 -0
- autogluon/timeseries/models/toto/_internal/backbone/transformer.py +333 -0
- autogluon/timeseries/models/toto/_internal/dataset.py +165 -0
- autogluon/timeseries/models/toto/_internal/forecaster.py +423 -0
- autogluon/timeseries/models/toto/dataloader.py +108 -0
- autogluon/timeseries/models/toto/hf_pretrained_model.py +200 -0
- autogluon/timeseries/models/toto/model.py +249 -0
- autogluon/timeseries/predictor.py +541 -162
- autogluon/timeseries/regressor.py +27 -30
- autogluon/timeseries/splitter.py +3 -27
- autogluon/timeseries/trainer/ensemble_composer.py +444 -0
- autogluon/timeseries/trainer/model_set_builder.py +9 -9
- autogluon/timeseries/trainer/prediction_cache.py +16 -16
- autogluon/timeseries/trainer/trainer.py +300 -279
- autogluon/timeseries/trainer/utils.py +17 -0
- autogluon/timeseries/transforms/covariate_scaler.py +8 -8
- autogluon/timeseries/transforms/target_scaler.py +15 -15
- autogluon/timeseries/utils/constants.py +10 -0
- autogluon/timeseries/utils/datetime/lags.py +1 -3
- autogluon/timeseries/utils/datetime/seasonality.py +1 -3
- autogluon/timeseries/utils/features.py +31 -14
- autogluon/timeseries/utils/forecast.py +6 -7
- autogluon/timeseries/utils/timer.py +173 -0
- autogluon/timeseries/version.py +1 -1
- autogluon.timeseries-1.5.1b20260122-py3.11-nspkg.pth +1 -0
- {autogluon.timeseries-1.4.1b20250907.dist-info → autogluon_timeseries-1.5.1b20260122.dist-info}/METADATA +39 -22
- autogluon_timeseries-1.5.1b20260122.dist-info/RECORD +103 -0
- {autogluon.timeseries-1.4.1b20250907.dist-info → autogluon_timeseries-1.5.1b20260122.dist-info}/WHEEL +1 -1
- autogluon/timeseries/evaluator.py +0 -6
- autogluon/timeseries/models/chronos/pipeline/__init__.py +0 -10
- autogluon/timeseries/models/chronos/pipeline/base.py +0 -160
- autogluon/timeseries/models/chronos/pipeline/chronos.py +0 -544
- autogluon/timeseries/models/chronos/pipeline/chronos_bolt.py +0 -580
- autogluon.timeseries-1.4.1b20250907-py3.9-nspkg.pth +0 -1
- autogluon.timeseries-1.4.1b20250907.dist-info/RECORD +0 -75
- {autogluon.timeseries-1.4.1b20250907.dist-info → autogluon_timeseries-1.5.1b20260122.dist-info/licenses}/LICENSE +0 -0
- {autogluon.timeseries-1.4.1b20250907.dist-info → autogluon_timeseries-1.5.1b20260122.dist-info/licenses}/NOTICE +0 -0
- {autogluon.timeseries-1.4.1b20250907.dist-info → autogluon_timeseries-1.5.1b20260122.dist-info}/namespace_packages.txt +0 -0
- {autogluon.timeseries-1.4.1b20250907.dist-info → autogluon_timeseries-1.5.1b20260122.dist-info}/top_level.txt +0 -0
- {autogluon.timeseries-1.4.1b20250907.dist-info → autogluon_timeseries-1.5.1b20260122.dist-info}/zip-safe +0 -0
|
@@ -2,7 +2,7 @@ import copy
|
|
|
2
2
|
import logging
|
|
3
3
|
import re
|
|
4
4
|
from collections import defaultdict
|
|
5
|
-
from typing import Any,
|
|
5
|
+
from typing import Any, Type
|
|
6
6
|
|
|
7
7
|
from autogluon.common import space
|
|
8
8
|
from autogluon.core import constants
|
|
@@ -16,7 +16,7 @@ from autogluon.timeseries.utils.features import CovariateMetadata
|
|
|
16
16
|
logger = logging.getLogger(__name__)
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
ModelKey =
|
|
19
|
+
ModelKey = str | Type[AbstractTimeSeriesModel]
|
|
20
20
|
ModelHyperparameters = dict[str, Any]
|
|
21
21
|
TrainerHyperparameterSpec = dict[ModelKey, list[ModelHyperparameters]]
|
|
22
22
|
|
|
@@ -34,7 +34,7 @@ class TrainableModelSetBuilder:
|
|
|
34
34
|
def __init__(
|
|
35
35
|
self,
|
|
36
36
|
path: str,
|
|
37
|
-
freq:
|
|
37
|
+
freq: str | None,
|
|
38
38
|
prediction_length: int,
|
|
39
39
|
eval_metric: TimeSeriesScorer,
|
|
40
40
|
target: str,
|
|
@@ -53,10 +53,10 @@ class TrainableModelSetBuilder:
|
|
|
53
53
|
|
|
54
54
|
def get_model_set(
|
|
55
55
|
self,
|
|
56
|
-
hyperparameters:
|
|
56
|
+
hyperparameters: str | dict | None,
|
|
57
57
|
hyperparameter_tune: bool,
|
|
58
|
-
excluded_model_types:
|
|
59
|
-
banned_model_names:
|
|
58
|
+
excluded_model_types: list[str] | None,
|
|
59
|
+
banned_model_names: list[str] | None = None,
|
|
60
60
|
) -> list[AbstractTimeSeriesModel]:
|
|
61
61
|
"""Resolve hyperparameters and create the requested list of models"""
|
|
62
62
|
models = []
|
|
@@ -153,9 +153,9 @@ class HyperparameterBuilder:
|
|
|
153
153
|
|
|
154
154
|
def __init__(
|
|
155
155
|
self,
|
|
156
|
-
hyperparameters:
|
|
156
|
+
hyperparameters: str | dict | None,
|
|
157
157
|
hyperparameter_tune: bool,
|
|
158
|
-
excluded_model_types:
|
|
158
|
+
excluded_model_types: list[str] | None,
|
|
159
159
|
):
|
|
160
160
|
self.hyperparameters = hyperparameters
|
|
161
161
|
self.hyperparameter_tune = hyperparameter_tune
|
|
@@ -184,7 +184,7 @@ class HyperparameterBuilder:
|
|
|
184
184
|
|
|
185
185
|
def _check_and_clean_hyperparameters(
|
|
186
186
|
self,
|
|
187
|
-
hyperparameters: dict[ModelKey,
|
|
187
|
+
hyperparameters: dict[ModelKey, ModelHyperparameters | list[ModelHyperparameters]],
|
|
188
188
|
) -> TrainerHyperparameterSpec:
|
|
189
189
|
"""Convert the hyperparameters dictionary to a unified format:
|
|
190
190
|
- Remove 'Model' suffix from model names, if present
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from abc import ABC, abstractmethod
|
|
3
3
|
from pathlib import Path
|
|
4
|
-
from typing import Any
|
|
4
|
+
from typing import Any
|
|
5
5
|
|
|
6
6
|
from autogluon.common.utils.utils import hash_pandas_df
|
|
7
7
|
from autogluon.core.utils.loaders import load_pkl
|
|
@@ -22,16 +22,16 @@ class PredictionCache(ABC):
|
|
|
22
22
|
|
|
23
23
|
@abstractmethod
|
|
24
24
|
def get(
|
|
25
|
-
self, data: TimeSeriesDataFrame, known_covariates:
|
|
26
|
-
) -> tuple[dict[str,
|
|
25
|
+
self, data: TimeSeriesDataFrame, known_covariates: TimeSeriesDataFrame | None
|
|
26
|
+
) -> tuple[dict[str, TimeSeriesDataFrame | None], dict[str, float]]:
|
|
27
27
|
pass
|
|
28
28
|
|
|
29
29
|
@abstractmethod
|
|
30
30
|
def put(
|
|
31
31
|
self,
|
|
32
32
|
data: TimeSeriesDataFrame,
|
|
33
|
-
known_covariates:
|
|
34
|
-
model_pred_dict: dict[str,
|
|
33
|
+
known_covariates: TimeSeriesDataFrame | None,
|
|
34
|
+
model_pred_dict: dict[str, TimeSeriesDataFrame | None],
|
|
35
35
|
pred_time_dict: dict[str, float],
|
|
36
36
|
) -> None:
|
|
37
37
|
pass
|
|
@@ -48,7 +48,7 @@ def get_prediction_cache(use_cache: bool, root_path: str) -> PredictionCache:
|
|
|
48
48
|
return NoOpPredictionCache(root_path=root_path)
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
def compute_dataset_hash(data: TimeSeriesDataFrame, known_covariates:
|
|
51
|
+
def compute_dataset_hash(data: TimeSeriesDataFrame, known_covariates: TimeSeriesDataFrame | None = None) -> str:
|
|
52
52
|
"""Compute a unique string that identifies the time series dataset."""
|
|
53
53
|
combined_hash = hash_pandas_df(data) + hash_pandas_df(known_covariates) + hash_pandas_df(data.static_features)
|
|
54
54
|
return combined_hash
|
|
@@ -58,15 +58,15 @@ class NoOpPredictionCache(PredictionCache):
|
|
|
58
58
|
"""A dummy (no-op) prediction cache."""
|
|
59
59
|
|
|
60
60
|
def get(
|
|
61
|
-
self, data: TimeSeriesDataFrame, known_covariates:
|
|
62
|
-
) -> tuple[dict[str,
|
|
61
|
+
self, data: TimeSeriesDataFrame, known_covariates: TimeSeriesDataFrame | None
|
|
62
|
+
) -> tuple[dict[str, TimeSeriesDataFrame | None], dict[str, float]]:
|
|
63
63
|
return {}, {}
|
|
64
64
|
|
|
65
65
|
def put(
|
|
66
66
|
self,
|
|
67
67
|
data: TimeSeriesDataFrame,
|
|
68
|
-
known_covariates:
|
|
69
|
-
model_pred_dict: dict[str,
|
|
68
|
+
known_covariates: TimeSeriesDataFrame | None,
|
|
69
|
+
model_pred_dict: dict[str, TimeSeriesDataFrame | None],
|
|
70
70
|
pred_time_dict: dict[str, float],
|
|
71
71
|
) -> None:
|
|
72
72
|
pass
|
|
@@ -85,16 +85,16 @@ class FileBasedPredictionCache(PredictionCache):
|
|
|
85
85
|
return Path(self.root_path) / self._cached_predictions_filename
|
|
86
86
|
|
|
87
87
|
def get(
|
|
88
|
-
self, data: TimeSeriesDataFrame, known_covariates:
|
|
89
|
-
) -> tuple[dict[str,
|
|
88
|
+
self, data: TimeSeriesDataFrame, known_covariates: TimeSeriesDataFrame | None
|
|
89
|
+
) -> tuple[dict[str, TimeSeriesDataFrame | None], dict[str, float]]:
|
|
90
90
|
dataset_hash = compute_dataset_hash(data, known_covariates)
|
|
91
91
|
return self._get_cached_pred_dicts(dataset_hash)
|
|
92
92
|
|
|
93
93
|
def put(
|
|
94
94
|
self,
|
|
95
95
|
data: TimeSeriesDataFrame,
|
|
96
|
-
known_covariates:
|
|
97
|
-
model_pred_dict: dict[str,
|
|
96
|
+
known_covariates: TimeSeriesDataFrame | None,
|
|
97
|
+
model_pred_dict: dict[str, TimeSeriesDataFrame | None],
|
|
98
98
|
pred_time_dict: dict[str, float],
|
|
99
99
|
) -> None:
|
|
100
100
|
dataset_hash = compute_dataset_hash(data, known_covariates)
|
|
@@ -117,7 +117,7 @@ class FileBasedPredictionCache(PredictionCache):
|
|
|
117
117
|
|
|
118
118
|
def _get_cached_pred_dicts(
|
|
119
119
|
self, dataset_hash: str
|
|
120
|
-
) -> tuple[dict[str,
|
|
120
|
+
) -> tuple[dict[str, TimeSeriesDataFrame | None], dict[str, float]]:
|
|
121
121
|
"""Load cached predictions for given dataset_hash from disk, if possible.
|
|
122
122
|
|
|
123
123
|
If loading fails for any reason, empty dicts are returned.
|
|
@@ -136,7 +136,7 @@ class FileBasedPredictionCache(PredictionCache):
|
|
|
136
136
|
def _save_cached_pred_dicts(
|
|
137
137
|
self,
|
|
138
138
|
dataset_hash: str,
|
|
139
|
-
model_pred_dict: dict[str,
|
|
139
|
+
model_pred_dict: dict[str, TimeSeriesDataFrame | None],
|
|
140
140
|
pred_time_dict: dict[str, float],
|
|
141
141
|
) -> None:
|
|
142
142
|
cached_predictions = self._load_cached_predictions()
|