autogluon.timeseries 1.1.2b20240924__py3-none-any.whl → 1.1.2b20240925__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.
- autogluon/timeseries/learner.py +10 -2
- autogluon/timeseries/models/presets.py +1 -1
- autogluon/timeseries/predictor.py +22 -4
- autogluon/timeseries/trainer/abstract_trainer.py +28 -2
- autogluon/timeseries/version.py +1 -1
- {autogluon.timeseries-1.1.2b20240924.dist-info → autogluon.timeseries-1.1.2b20240925.dist-info}/METADATA +4 -4
- {autogluon.timeseries-1.1.2b20240924.dist-info → autogluon.timeseries-1.1.2b20240925.dist-info}/RECORD +14 -14
- /autogluon.timeseries-1.1.2b20240924-py3.8-nspkg.pth → /autogluon.timeseries-1.1.2b20240925-py3.8-nspkg.pth +0 -0
- {autogluon.timeseries-1.1.2b20240924.dist-info → autogluon.timeseries-1.1.2b20240925.dist-info}/LICENSE +0 -0
- {autogluon.timeseries-1.1.2b20240924.dist-info → autogluon.timeseries-1.1.2b20240925.dist-info}/NOTICE +0 -0
- {autogluon.timeseries-1.1.2b20240924.dist-info → autogluon.timeseries-1.1.2b20240925.dist-info}/WHEEL +0 -0
- {autogluon.timeseries-1.1.2b20240924.dist-info → autogluon.timeseries-1.1.2b20240925.dist-info}/namespace_packages.txt +0 -0
- {autogluon.timeseries-1.1.2b20240924.dist-info → autogluon.timeseries-1.1.2b20240925.dist-info}/top_level.txt +0 -0
- {autogluon.timeseries-1.1.2b20240924.dist-info → autogluon.timeseries-1.1.2b20240925.dist-info}/zip-safe +0 -0
autogluon/timeseries/learner.py
CHANGED
@@ -280,10 +280,18 @@ class TimeSeriesLearner(AbstractLearner):
|
|
280
280
|
|
281
281
|
return importance_df
|
282
282
|
|
283
|
-
def leaderboard(
|
283
|
+
def leaderboard(
|
284
|
+
self,
|
285
|
+
data: Optional[TimeSeriesDataFrame] = None,
|
286
|
+
extra_info: bool = False,
|
287
|
+
extra_metrics: Optional[List[Union[str, TimeSeriesScorer]]] = None,
|
288
|
+
use_cache: bool = True,
|
289
|
+
) -> pd.DataFrame:
|
284
290
|
if data is not None:
|
285
291
|
data = self.feature_generator.transform(data)
|
286
|
-
return self.load_trainer().leaderboard(
|
292
|
+
return self.load_trainer().leaderboard(
|
293
|
+
data, extra_info=extra_info, extra_metrics=extra_metrics, use_cache=use_cache
|
294
|
+
)
|
287
295
|
|
288
296
|
def get_info(self, include_model_info: bool = False, **kwargs) -> Dict[str, Any]:
|
289
297
|
learner_info = super().get_info(include_model_info=include_model_info)
|
@@ -209,7 +209,7 @@ def get_preset_models(
|
|
209
209
|
for model in model_priority_list:
|
210
210
|
if isinstance(model, str):
|
211
211
|
if model not in MODEL_TYPES:
|
212
|
-
raise ValueError(f"Model {model} is not supported
|
212
|
+
raise ValueError(f"Model {model} is not supported. Available models: {sorted(MODEL_TYPES)}")
|
213
213
|
if model in excluded_models:
|
214
214
|
logger.info(
|
215
215
|
f"\tFound '{model}' model in `hyperparameters`, but '{model}' "
|
@@ -110,8 +110,6 @@ class TimeSeriesPredictor(TimeSeriesPredictorDeprecatedMixin):
|
|
110
110
|
known as dynamic features, exogenous variables, additional regressors or related time series. Examples of such
|
111
111
|
covariates include holidays, promotions or weather forecasts.
|
112
112
|
|
113
|
-
Currently, only numeric (float of integer dtype) are supported.
|
114
|
-
|
115
113
|
If ``known_covariates_names`` are provided, then:
|
116
114
|
|
117
115
|
- :meth:`~autogluon.timeseries.TimeSeriesPredictor.fit`, :meth:`~autogluon.timeseries.TimeSeriesPredictor.evaluate`, and :meth:`~autogluon.timeseries.TimeSeriesPredictor.leaderboard` will expect a data frame with columns listed in ``known_covariates_names`` (in addition to the ``target`` column).
|
@@ -437,7 +435,6 @@ class TimeSeriesPredictor(TimeSeriesPredictorDeprecatedMixin):
|
|
437
435
|
|
438
436
|
If ``known_covariates_names`` were specified when creating the predictor, ``train_data`` must include the
|
439
437
|
columns listed in ``known_covariates_names`` with the covariates values aligned with the target time series.
|
440
|
-
The known covariates must have a numeric (float or integer) dtype.
|
441
438
|
|
442
439
|
Columns of ``train_data`` except ``target`` and those listed in ``known_covariates_names`` will be
|
443
440
|
interpreted as ``past_covariates`` - covariates that are known only in the past.
|
@@ -1199,6 +1196,8 @@ class TimeSeriesPredictor(TimeSeriesPredictorDeprecatedMixin):
|
|
1199
1196
|
def leaderboard(
|
1200
1197
|
self,
|
1201
1198
|
data: Optional[Union[TimeSeriesDataFrame, pd.DataFrame, Path, str]] = None,
|
1199
|
+
extra_info: bool = False,
|
1200
|
+
extra_metrics: Optional[List[Union[str, TimeSeriesScorer]]] = None,
|
1202
1201
|
display: bool = False,
|
1203
1202
|
use_cache: bool = True,
|
1204
1203
|
**kwargs,
|
@@ -1236,6 +1235,20 @@ class TimeSeriesPredictor(TimeSeriesPredictorDeprecatedMixin):
|
|
1236
1235
|
If provided data is a path or a pandas.DataFrame, AutoGluon will attempt to automatically convert it to a
|
1237
1236
|
``TimeSeriesDataFrame``.
|
1238
1237
|
|
1238
|
+
extra_info : bool, default = False
|
1239
|
+
If True, the leaderboard will contain an additional column `hyperparameters` with the hyperparameters used
|
1240
|
+
by each model during training. An empty dictionary `{}` means that the model was trained with default
|
1241
|
+
hyperparameters.
|
1242
|
+
extra_metrics : List[Union[str, TimeSeriesScorer]], optional
|
1243
|
+
A list of metrics to calculate scores for and include in the output DataFrame.
|
1244
|
+
|
1245
|
+
Only valid when `data` is specified. The scores refer to the scores on `data` (same data as used to
|
1246
|
+
calculate the `score_test` column).
|
1247
|
+
|
1248
|
+
This list can contain any values which would also be valid for `eval_metric` when creating a :class:`~autogluon.timeseries.TimeSeriesPredictor`.
|
1249
|
+
|
1250
|
+
For each provided `metric`, a column with name `str(metric)` will be added to the leaderboard, containing
|
1251
|
+
the value of the metric computed on `data`.
|
1239
1252
|
display : bool, default = False
|
1240
1253
|
If True, the leaderboard DataFrame will be printed.
|
1241
1254
|
use_cache : bool, default = True
|
@@ -1255,11 +1268,16 @@ class TimeSeriesPredictor(TimeSeriesPredictorDeprecatedMixin):
|
|
1255
1268
|
if len(kwargs) > 0:
|
1256
1269
|
for key in kwargs:
|
1257
1270
|
raise TypeError(f"TimeSeriesPredictor.leaderboard() got an unexpected keyword argument '{key}'")
|
1271
|
+
if data is None and extra_metrics is not None:
|
1272
|
+
raise ValueError("`extra_metrics` is only valid when `data` is specified.")
|
1258
1273
|
|
1259
1274
|
if data is not None:
|
1260
1275
|
data = self._check_and_prepare_data_frame(data)
|
1261
1276
|
self._check_data_for_evaluation(data)
|
1262
|
-
|
1277
|
+
|
1278
|
+
leaderboard = self._learner.leaderboard(
|
1279
|
+
data, extra_info=extra_info, extra_metrics=extra_metrics, use_cache=use_cache
|
1280
|
+
)
|
1263
1281
|
if display:
|
1264
1282
|
with pd.option_context("display.max_rows", None, "display.max_columns", None, "display.width", 1000):
|
1265
1283
|
print(leaderboard)
|
@@ -21,6 +21,7 @@ from autogluon.timeseries import TimeSeriesDataFrame
|
|
21
21
|
from autogluon.timeseries.metrics import TimeSeriesScorer, check_get_evaluation_metric
|
22
22
|
from autogluon.timeseries.models.abstract import AbstractTimeSeriesModel
|
23
23
|
from autogluon.timeseries.models.ensemble import AbstractTimeSeriesEnsembleModel, TimeSeriesGreedyEnsemble
|
24
|
+
from autogluon.timeseries.models.multi_window import MultiWindowBacktestingModel
|
24
25
|
from autogluon.timeseries.models.presets import contains_searchspace
|
25
26
|
from autogluon.timeseries.splitter import AbstractWindowSplitter, ExpandingWindowSplitter
|
26
27
|
from autogluon.timeseries.utils.features import (
|
@@ -755,7 +756,13 @@ class AbstractTimeSeriesTrainer(SimpleAbstractTrainer):
|
|
755
756
|
self.save_model(model=ensemble)
|
756
757
|
return ensemble.name
|
757
758
|
|
758
|
-
def leaderboard(
|
759
|
+
def leaderboard(
|
760
|
+
self,
|
761
|
+
data: Optional[TimeSeriesDataFrame] = None,
|
762
|
+
extra_info: bool = False,
|
763
|
+
extra_metrics: Optional[List[Union[str, TimeSeriesScorer]]] = None,
|
764
|
+
use_cache: bool = True,
|
765
|
+
) -> pd.DataFrame:
|
759
766
|
logger.debug("Generating leaderboard for all models trained")
|
760
767
|
|
761
768
|
model_names = self.get_model_names()
|
@@ -771,6 +778,14 @@ class AbstractTimeSeriesTrainer(SimpleAbstractTrainer):
|
|
771
778
|
"fit_time_marginal": self.get_model_attribute(model_name, "fit_time"),
|
772
779
|
"pred_time_val": self.get_model_attribute(model_name, "predict_time"),
|
773
780
|
}
|
781
|
+
if extra_info:
|
782
|
+
model = self.load_model(model_name=model_name)
|
783
|
+
if isinstance(model, MultiWindowBacktestingModel):
|
784
|
+
model = model.most_recent_model
|
785
|
+
model_info[model_name]["hyperparameters"] = model.params
|
786
|
+
|
787
|
+
if extra_metrics is None:
|
788
|
+
extra_metrics = []
|
774
789
|
|
775
790
|
if data is not None:
|
776
791
|
past_data, known_covariates = data.get_model_inputs_for_scoring(
|
@@ -799,6 +814,14 @@ class AbstractTimeSeriesTrainer(SimpleAbstractTrainer):
|
|
799
814
|
model_info[model_name]["score_test"] = self._score_with_predictions(data, model_preds)
|
800
815
|
model_info[model_name]["pred_time_test"] = pred_time_dict[model_name]
|
801
816
|
|
817
|
+
for metric in extra_metrics:
|
818
|
+
if model_preds is None:
|
819
|
+
model_info[model_name][str(metric)] = float("nan")
|
820
|
+
else:
|
821
|
+
model_info[model_name][str(metric)] = self._score_with_predictions(
|
822
|
+
data, model_preds, metric=metric
|
823
|
+
)
|
824
|
+
|
802
825
|
explicit_column_order = [
|
803
826
|
"model",
|
804
827
|
"score_test",
|
@@ -808,15 +831,18 @@ class AbstractTimeSeriesTrainer(SimpleAbstractTrainer):
|
|
808
831
|
"fit_time_marginal",
|
809
832
|
"fit_order",
|
810
833
|
]
|
834
|
+
if extra_info:
|
835
|
+
explicit_column_order += ["hyperparameters"]
|
811
836
|
|
812
|
-
df = pd.DataFrame(model_info.values(), columns=explicit_column_order)
|
813
837
|
if data is None:
|
814
838
|
explicit_column_order.remove("score_test")
|
815
839
|
explicit_column_order.remove("pred_time_test")
|
816
840
|
sort_column = "score_val"
|
817
841
|
else:
|
818
842
|
sort_column = "score_test"
|
843
|
+
explicit_column_order += [str(metric) for metric in extra_metrics]
|
819
844
|
|
845
|
+
df = pd.DataFrame(model_info.values(), columns=explicit_column_order)
|
820
846
|
df.sort_values(by=[sort_column, "model"], ascending=[False, False], inplace=True)
|
821
847
|
df.reset_index(drop=True, inplace=True)
|
822
848
|
|
autogluon/timeseries/version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: autogluon.timeseries
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.2b20240925
|
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
|
@@ -52,9 +52,9 @@ Requires-Dist: fugue>=0.9.0
|
|
52
52
|
Requires-Dist: tqdm<5,>=4.38
|
53
53
|
Requires-Dist: orjson~=3.9
|
54
54
|
Requires-Dist: tensorboard<3,>=2.9
|
55
|
-
Requires-Dist: autogluon.core[raytune]==1.1.
|
56
|
-
Requires-Dist: autogluon.common==1.1.
|
57
|
-
Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost]==1.1.
|
55
|
+
Requires-Dist: autogluon.core[raytune]==1.1.2b20240925
|
56
|
+
Requires-Dist: autogluon.common==1.1.2b20240925
|
57
|
+
Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost]==1.1.2b20240925
|
58
58
|
Provides-Extra: all
|
59
59
|
Requires-Dist: optimum[onnxruntime]<1.19,>=1.17; extra == "all"
|
60
60
|
Provides-Extra: chronos-onnx
|
@@ -1,10 +1,10 @@
|
|
1
|
-
autogluon.timeseries-1.1.
|
1
|
+
autogluon.timeseries-1.1.2b20240925-py3.8-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=
|
5
|
-
autogluon/timeseries/predictor.py,sha256=
|
4
|
+
autogluon/timeseries/learner.py,sha256=NXhftyqMD8Bl1QHIBN82UKP0UlCV_ACughZqkmMf4oY,14043
|
5
|
+
autogluon/timeseries/predictor.py,sha256=NFe-y1H8987Rlnjcr4GqAxL7ivFaMuu94XWWiZrp9Uc,84351
|
6
6
|
autogluon/timeseries/splitter.py,sha256=eghGwAAN2_cxGk5aJBILgjGWtLzjxJcytMy49gg_q18,3061
|
7
|
-
autogluon/timeseries/version.py,sha256=
|
7
|
+
autogluon/timeseries/version.py,sha256=O9QEUJv0UF7vl2iZXmooSPWoH_6JaKWyK14XJQJkIJA,90
|
8
8
|
autogluon/timeseries/configs/__init__.py,sha256=BTtHIPCYeGjqgOcvqb8qPD4VNX-ICKOg6wnkew1cPOE,98
|
9
9
|
autogluon/timeseries/configs/presets_configs.py,sha256=94-yL9teDHKs2irWjP3kpewI7FE1ChYCgEgz9XHJ6gc,1965
|
10
10
|
autogluon/timeseries/dataset/__init__.py,sha256=UvnhAN5tjgxXTHoZMQDy64YMDj4Xxa68yY7NP4vAw0o,81
|
@@ -15,7 +15,7 @@ autogluon/timeseries/metrics/point.py,sha256=xy8sKrBbuxZ7yTW21TDPayKnEj2FBj1AEse
|
|
15
15
|
autogluon/timeseries/metrics/quantile.py,sha256=owMbOAJYwVyzdRkrJpuCGUXk937GU843QndCZyp5n9Y,3967
|
16
16
|
autogluon/timeseries/metrics/utils.py,sha256=eJ63TCR-UwbeJ1c2Qm7B2q-8B3sFthPgiooEccrf2Kc,912
|
17
17
|
autogluon/timeseries/models/__init__.py,sha256=WKV7DIpJkrwEj0cUfscESp67Ydap9hAqaNTYvgi2EIA,1303
|
18
|
-
autogluon/timeseries/models/presets.py,sha256=
|
18
|
+
autogluon/timeseries/models/presets.py,sha256=7ORBU-7fCwwYlpXaWCXEfNx0pss3mvB6KGSsQ1kyw2k,11673
|
19
19
|
autogluon/timeseries/models/abstract/__init__.py,sha256=wvDsQAZIV0N3AwBeMaGItoQ82trEfnT-nol2AAOIxBg,102
|
20
20
|
autogluon/timeseries/models/abstract/abstract_timeseries_model.py,sha256=MvLF529b3fo0icgle-qmS0oce-ftiiQ1jPBLnY-39fk,23435
|
21
21
|
autogluon/timeseries/models/abstract/model_trial.py,sha256=ENPg_7nsdxIvaNM0o0UShZ3x8jFlRmwRc5m0fGPC0TM,3720
|
@@ -41,7 +41,7 @@ autogluon/timeseries/models/local/statsforecast.py,sha256=79swW7g7bn1CmuGY79i7r0
|
|
41
41
|
autogluon/timeseries/models/multi_window/__init__.py,sha256=Bq7AT2Jxdd4WNqmjTdzeqgNiwn1NCyWp4tBIWaM-zfI,60
|
42
42
|
autogluon/timeseries/models/multi_window/multi_window_model.py,sha256=HiujLv8MJ31fWxRM5iXG2PzobFn4Mus0nJPu0MP2Rw4,11374
|
43
43
|
autogluon/timeseries/trainer/__init__.py,sha256=lxiOT-Gc6BEnr_yWQqra85kEngeM_wtH2SCaRbmC_qE,170
|
44
|
-
autogluon/timeseries/trainer/abstract_trainer.py,sha256=
|
44
|
+
autogluon/timeseries/trainer/abstract_trainer.py,sha256=hZI4QcsFvU1gxP2yv_DRCIMlc6q02ptR7UDA9EgJPoM,60409
|
45
45
|
autogluon/timeseries/trainer/auto_trainer.py,sha256=psJFZBwWWPlLjNwAgvO4OUJXsRW1sTN2YS9a4pdoeoE,3344
|
46
46
|
autogluon/timeseries/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
47
47
|
autogluon/timeseries/utils/features.py,sha256=hEir-2lU8fvHjt5r_LG9tLZEk5wNdRdeLRE7qF5z3_Y,19585
|
@@ -52,11 +52,11 @@ autogluon/timeseries/utils/datetime/base.py,sha256=3NdsH3NDq4cVAOSoy3XpaNixyNlbj
|
|
52
52
|
autogluon/timeseries/utils/datetime/lags.py,sha256=GoLtvcZ8oKb3QkoBJ9E59LSPLOP7Qjxrr2UmMSZgjyw,5909
|
53
53
|
autogluon/timeseries/utils/datetime/seasonality.py,sha256=h_4w00iEytAz_N_EpCENQ8RCXy7KQITczrYjBgVqWkQ,764
|
54
54
|
autogluon/timeseries/utils/datetime/time_features.py,sha256=PAXbYbQ0z_5GFbkxSNi41zLY_2-U3x0Ynm1m_WhdtGc,2572
|
55
|
-
autogluon.timeseries-1.1.
|
56
|
-
autogluon.timeseries-1.1.
|
57
|
-
autogluon.timeseries-1.1.
|
58
|
-
autogluon.timeseries-1.1.
|
59
|
-
autogluon.timeseries-1.1.
|
60
|
-
autogluon.timeseries-1.1.
|
61
|
-
autogluon.timeseries-1.1.
|
62
|
-
autogluon.timeseries-1.1.
|
55
|
+
autogluon.timeseries-1.1.2b20240925.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
56
|
+
autogluon.timeseries-1.1.2b20240925.dist-info/METADATA,sha256=iTfUioN_ZC83-CqEQGJACJdqEl2GfRj1iGJ9RLDsIw0,12370
|
57
|
+
autogluon.timeseries-1.1.2b20240925.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
|
58
|
+
autogluon.timeseries-1.1.2b20240925.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
59
|
+
autogluon.timeseries-1.1.2b20240925.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
|
60
|
+
autogluon.timeseries-1.1.2b20240925.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
|
61
|
+
autogluon.timeseries-1.1.2b20240925.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
62
|
+
autogluon.timeseries-1.1.2b20240925.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|