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.
- autogluon/timeseries/configs/__init__.py +3 -2
- autogluon/timeseries/configs/hyperparameter_presets.py +62 -0
- autogluon/timeseries/configs/predictor_presets.py +106 -0
- autogluon/timeseries/dataset/ts_dataframe.py +256 -141
- autogluon/timeseries/learner.py +86 -52
- autogluon/timeseries/metrics/__init__.py +42 -8
- autogluon/timeseries/metrics/abstract.py +89 -19
- autogluon/timeseries/metrics/point.py +142 -53
- autogluon/timeseries/metrics/quantile.py +46 -21
- autogluon/timeseries/metrics/utils.py +4 -4
- autogluon/timeseries/models/__init__.py +8 -2
- autogluon/timeseries/models/abstract/__init__.py +2 -2
- autogluon/timeseries/models/abstract/abstract_timeseries_model.py +361 -592
- autogluon/timeseries/models/abstract/model_trial.py +2 -1
- autogluon/timeseries/models/abstract/tunable.py +189 -0
- autogluon/timeseries/models/autogluon_tabular/__init__.py +2 -0
- autogluon/timeseries/models/autogluon_tabular/mlforecast.py +282 -194
- autogluon/timeseries/models/autogluon_tabular/per_step.py +513 -0
- autogluon/timeseries/models/autogluon_tabular/transforms.py +25 -18
- autogluon/timeseries/models/chronos/__init__.py +2 -1
- autogluon/timeseries/models/chronos/chronos2.py +361 -0
- autogluon/timeseries/models/chronos/model.py +219 -138
- autogluon/timeseries/models/chronos/{pipeline/utils.py → utils.py} +81 -50
- autogluon/timeseries/models/ensemble/__init__.py +37 -2
- autogluon/timeseries/models/ensemble/abstract.py +107 -0
- 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/ensemble_selection.py +167 -0
- 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/weighted/basic.py +91 -0
- autogluon/timeseries/models/ensemble/weighted/greedy.py +62 -0
- autogluon/timeseries/models/gluonts/__init__.py +1 -1
- autogluon/timeseries/models/gluonts/{abstract_gluonts.py → abstract.py} +148 -208
- autogluon/timeseries/models/gluonts/dataset.py +109 -0
- autogluon/timeseries/models/gluonts/{torch/models.py → models.py} +38 -22
- autogluon/timeseries/models/local/__init__.py +0 -7
- autogluon/timeseries/models/local/abstract_local_model.py +71 -74
- autogluon/timeseries/models/local/naive.py +13 -9
- autogluon/timeseries/models/local/npts.py +9 -2
- autogluon/timeseries/models/local/statsforecast.py +52 -36
- autogluon/timeseries/models/multi_window/multi_window_model.py +65 -45
- autogluon/timeseries/models/registry.py +64 -0
- 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 +685 -297
- autogluon/timeseries/regressor.py +94 -44
- autogluon/timeseries/splitter.py +8 -32
- autogluon/timeseries/trainer/__init__.py +3 -0
- autogluon/timeseries/trainer/ensemble_composer.py +444 -0
- autogluon/timeseries/trainer/model_set_builder.py +256 -0
- autogluon/timeseries/trainer/prediction_cache.py +149 -0
- autogluon/timeseries/{trainer.py → trainer/trainer.py} +387 -390
- autogluon/timeseries/trainer/utils.py +17 -0
- autogluon/timeseries/transforms/__init__.py +2 -13
- autogluon/timeseries/transforms/covariate_scaler.py +34 -40
- autogluon/timeseries/transforms/target_scaler.py +37 -20
- autogluon/timeseries/utils/constants.py +10 -0
- autogluon/timeseries/utils/datetime/lags.py +3 -5
- autogluon/timeseries/utils/datetime/seasonality.py +1 -3
- autogluon/timeseries/utils/datetime/time_features.py +2 -2
- autogluon/timeseries/utils/features.py +70 -47
- autogluon/timeseries/utils/forecast.py +19 -14
- autogluon/timeseries/utils/timer.py +173 -0
- autogluon/timeseries/utils/warning_filters.py +4 -2
- autogluon/timeseries/version.py +1 -1
- autogluon.timeseries-1.4.1b20251215-py3.11-nspkg.pth +1 -0
- {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info}/METADATA +49 -36
- autogluon_timeseries-1.4.1b20251215.dist-info/RECORD +103 -0
- {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info}/WHEEL +1 -1
- autogluon/timeseries/configs/presets_configs.py +0 -79
- autogluon/timeseries/evaluator.py +0 -6
- autogluon/timeseries/models/chronos/pipeline/__init__.py +0 -11
- autogluon/timeseries/models/chronos/pipeline/base.py +0 -160
- autogluon/timeseries/models/chronos/pipeline/chronos.py +0 -585
- autogluon/timeseries/models/chronos/pipeline/chronos_bolt.py +0 -518
- autogluon/timeseries/models/ensemble/abstract_timeseries_ensemble.py +0 -78
- autogluon/timeseries/models/ensemble/greedy_ensemble.py +0 -170
- autogluon/timeseries/models/gluonts/torch/__init__.py +0 -0
- autogluon/timeseries/models/presets.py +0 -360
- autogluon.timeseries-1.2.1b20250224-py3.9-nspkg.pth +0 -1
- autogluon.timeseries-1.2.1b20250224.dist-info/RECORD +0 -68
- {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info/licenses}/LICENSE +0 -0
- {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info/licenses}/NOTICE +0 -0
- {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info}/namespace_packages.txt +0 -0
- {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info}/top_level.txt +0 -0
- {autogluon.timeseries-1.2.1b20250224.dist-info → autogluon_timeseries-1.4.1b20251215.dist-info}/zip-safe +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: autogluon.timeseries
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.1b20251215
|
|
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
|
|
@@ -9,7 +9,6 @@ Project-URL: Documentation, https://auto.gluon.ai
|
|
|
9
9
|
Project-URL: Bug Reports, https://github.com/autogluon/autogluon/issues
|
|
10
10
|
Project-URL: Source, https://github.com/autogluon/autogluon/
|
|
11
11
|
Project-URL: Contribute!, https://github.com/autogluon/autogluon/blob/master/CONTRIBUTING.md
|
|
12
|
-
Platform: UNKNOWN
|
|
13
12
|
Classifier: Development Status :: 4 - Beta
|
|
14
13
|
Classifier: Intended Audience :: Education
|
|
15
14
|
Classifier: Intended Audience :: Developers
|
|
@@ -24,51 +23,64 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
24
23
|
Classifier: Operating System :: POSIX
|
|
25
24
|
Classifier: Operating System :: Unix
|
|
26
25
|
Classifier: Programming Language :: Python :: 3
|
|
27
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
28
26
|
Classifier: Programming Language :: Python :: 3.10
|
|
29
27
|
Classifier: Programming Language :: Python :: 3.11
|
|
30
28
|
Classifier: Programming Language :: Python :: 3.12
|
|
29
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
31
30
|
Classifier: Topic :: Software Development
|
|
32
31
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
33
32
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
34
33
|
Classifier: Topic :: Scientific/Engineering :: Image Recognition
|
|
35
|
-
Requires-Python: >=3.
|
|
34
|
+
Requires-Python: >=3.10, <3.14
|
|
36
35
|
Description-Content-Type: text/markdown
|
|
37
|
-
License-File:
|
|
38
|
-
License-File:
|
|
39
|
-
Requires-Dist: joblib<
|
|
40
|
-
Requires-Dist: numpy<2.
|
|
41
|
-
Requires-Dist: scipy<1.
|
|
42
|
-
Requires-Dist: pandas<2.
|
|
43
|
-
Requires-Dist: torch<2.
|
|
44
|
-
Requires-Dist: lightning<2.6,>=2.
|
|
45
|
-
Requires-Dist:
|
|
46
|
-
Requires-Dist:
|
|
47
|
-
Requires-Dist: accelerate<1.0,>=0.34.0
|
|
36
|
+
License-File: LICENSE
|
|
37
|
+
License-File: NOTICE
|
|
38
|
+
Requires-Dist: joblib<1.7,>=1.2
|
|
39
|
+
Requires-Dist: numpy<2.4.0,>=1.25.0
|
|
40
|
+
Requires-Dist: scipy<1.17,>=1.5.4
|
|
41
|
+
Requires-Dist: pandas<2.4.0,>=2.0.0
|
|
42
|
+
Requires-Dist: torch<2.10,>=2.6
|
|
43
|
+
Requires-Dist: lightning<2.6,>=2.5.1
|
|
44
|
+
Requires-Dist: transformers[sentencepiece]<4.58,>=4.51.0
|
|
45
|
+
Requires-Dist: accelerate<2.0,>=0.34.0
|
|
48
46
|
Requires-Dist: gluonts<0.17,>=0.15.0
|
|
49
47
|
Requires-Dist: networkx<4,>=3.0
|
|
50
|
-
Requires-Dist: statsforecast<2.0.
|
|
51
|
-
Requires-Dist: mlforecast<0.14
|
|
52
|
-
Requires-Dist: utilsforecast<0.2.
|
|
53
|
-
Requires-Dist: coreforecast<0.0.
|
|
48
|
+
Requires-Dist: statsforecast<2.0.2,>=1.7.0
|
|
49
|
+
Requires-Dist: mlforecast<0.15.0,>=0.14.0
|
|
50
|
+
Requires-Dist: utilsforecast<0.2.12,>=0.2.3
|
|
51
|
+
Requires-Dist: coreforecast<0.0.17,>=0.0.12
|
|
54
52
|
Requires-Dist: fugue>=0.9.0
|
|
55
53
|
Requires-Dist: tqdm<5,>=4.38
|
|
56
54
|
Requires-Dist: orjson~=3.9
|
|
55
|
+
Requires-Dist: einops<1,>=0.7
|
|
56
|
+
Requires-Dist: chronos-forecasting<2.4,>=2.2.0
|
|
57
|
+
Requires-Dist: peft<0.18,>=0.13.0
|
|
57
58
|
Requires-Dist: tensorboard<3,>=2.9
|
|
58
|
-
Requires-Dist: autogluon.core
|
|
59
|
-
Requires-Dist: autogluon.common==1.
|
|
60
|
-
Requires-Dist: autogluon.
|
|
61
|
-
|
|
62
|
-
Provides-Extra: chronos-onnx
|
|
63
|
-
Requires-Dist: optimum[onnxruntime]<1.20,>=1.17; extra == "chronos-onnx"
|
|
64
|
-
Provides-Extra: chronos-openvino
|
|
65
|
-
Requires-Dist: optimum-intel[nncf,openvino]<1.17,>=1.15; extra == "chronos-openvino"
|
|
66
|
-
Requires-Dist: optimum[nncf,openvino]<1.19,>=1.17; extra == "chronos-openvino"
|
|
59
|
+
Requires-Dist: autogluon.core==1.4.1b20251215
|
|
60
|
+
Requires-Dist: autogluon.common==1.4.1b20251215
|
|
61
|
+
Requires-Dist: autogluon.features==1.4.1b20251215
|
|
62
|
+
Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost]==1.4.1b20251215
|
|
67
63
|
Provides-Extra: tests
|
|
68
64
|
Requires-Dist: pytest; extra == "tests"
|
|
69
65
|
Requires-Dist: ruff>=0.0.285; extra == "tests"
|
|
70
66
|
Requires-Dist: flaky<4,>=3.7; extra == "tests"
|
|
71
67
|
Requires-Dist: pytest-timeout<3,>=2.1; extra == "tests"
|
|
68
|
+
Provides-Extra: ray
|
|
69
|
+
Requires-Dist: autogluon.core[raytune]==1.4.1b20251215; extra == "ray"
|
|
70
|
+
Provides-Extra: all
|
|
71
|
+
Requires-Dist: autogluon.core[raytune]==1.4.1b20251215; extra == "all"
|
|
72
|
+
Dynamic: author
|
|
73
|
+
Dynamic: classifier
|
|
74
|
+
Dynamic: description
|
|
75
|
+
Dynamic: description-content-type
|
|
76
|
+
Dynamic: home-page
|
|
77
|
+
Dynamic: license
|
|
78
|
+
Dynamic: license-file
|
|
79
|
+
Dynamic: project-url
|
|
80
|
+
Dynamic: provides-extra
|
|
81
|
+
Dynamic: requires-dist
|
|
82
|
+
Dynamic: requires-python
|
|
83
|
+
Dynamic: summary
|
|
72
84
|
|
|
73
85
|
|
|
74
86
|
|
|
@@ -79,7 +91,7 @@ Requires-Dist: pytest-timeout<3,>=2.1; extra == "tests"
|
|
|
79
91
|
|
|
80
92
|
[](https://github.com/autogluon/autogluon/releases)
|
|
81
93
|
[](https://anaconda.org/conda-forge/autogluon)
|
|
82
|
-
[](https://pypi.org/project/autogluon/)
|
|
83
95
|
[](https://pepy.tech/project/autogluon)
|
|
84
96
|
[](./LICENSE)
|
|
85
97
|
[](https://discord.gg/wjUmjqAc2N)
|
|
@@ -96,7 +108,7 @@ AutoGluon, developed by AWS AI, automates machine learning tasks enabling you to
|
|
|
96
108
|
|
|
97
109
|
## 💾 Installation
|
|
98
110
|
|
|
99
|
-
AutoGluon is supported on Python 3.
|
|
111
|
+
AutoGluon is supported on Python 3.10 - 3.13 and is available on Linux, MacOS, and Windows.
|
|
100
112
|
|
|
101
113
|
You can install AutoGluon with:
|
|
102
114
|
|
|
@@ -112,15 +124,15 @@ Build accurate end-to-end ML models in just 3 lines of code!
|
|
|
112
124
|
|
|
113
125
|
```python
|
|
114
126
|
from autogluon.tabular import TabularPredictor
|
|
115
|
-
predictor = TabularPredictor(label="class").fit("train.csv")
|
|
127
|
+
predictor = TabularPredictor(label="class").fit("train.csv", presets="best")
|
|
116
128
|
predictions = predictor.predict("test.csv")
|
|
117
129
|
```
|
|
118
130
|
|
|
119
131
|
| AutoGluon Task | Quickstart | API |
|
|
120
132
|
|:--------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|
121
133
|
| TabularPredictor | [](https://auto.gluon.ai/stable/tutorials/tabular/tabular-quick-start.html) | [](https://auto.gluon.ai/stable/api/autogluon.tabular.TabularPredictor.html) |
|
|
122
|
-
| MultiModalPredictor | [](https://auto.gluon.ai/stable/tutorials/multimodal/multimodal_prediction/multimodal-quick-start.html) | [](https://auto.gluon.ai/stable/api/autogluon.multimodal.MultiModalPredictor.html) |
|
|
123
134
|
| TimeSeriesPredictor | [](https://auto.gluon.ai/stable/tutorials/timeseries/forecasting-quick-start.html) | [](https://auto.gluon.ai/stable/api/autogluon.timeseries.TimeSeriesPredictor.html) |
|
|
135
|
+
| MultiModalPredictor | [](https://auto.gluon.ai/stable/tutorials/multimodal/multimodal_prediction/multimodal-quick-start.html) | [](https://auto.gluon.ai/stable/api/autogluon.multimodal.MultiModalPredictor.html) |
|
|
124
136
|
|
|
125
137
|
## :mag: Resources
|
|
126
138
|
|
|
@@ -143,7 +155,10 @@ Below is a curated list of recent tutorials and talks on AutoGluon. A comprehens
|
|
|
143
155
|
- [Benchmarking Multimodal AutoML for Tabular Data with Text Fields](https://datasets-benchmarks-proceedings.neurips.cc/paper/2021/file/9bf31c7ff062936a96d3c8bd1f8f2ff3-Paper-round2.pdf) (*NeurIPS*, 2021) ([BibTeX](CITING.md#autogluonmultimodal))
|
|
144
156
|
- [XTab: Cross-table Pretraining for Tabular Transformers](https://proceedings.mlr.press/v202/zhu23k/zhu23k.pdf) (*ICML*, 2023)
|
|
145
157
|
- [AutoGluon-TimeSeries: AutoML for Probabilistic Time Series Forecasting](https://arxiv.org/abs/2308.05566) (*AutoML Conf*, 2023) ([BibTeX](CITING.md#autogluontimeseries))
|
|
146
|
-
- [TabRepo: A Large Scale Repository of Tabular Model Evaluations and its AutoML Applications](https://arxiv.org/pdf/2311.02971.pdf) (*
|
|
158
|
+
- [TabRepo: A Large Scale Repository of Tabular Model Evaluations and its AutoML Applications](https://arxiv.org/pdf/2311.02971.pdf) (*AutoML Conf*, 2024)
|
|
159
|
+
- [AutoGluon-Multimodal (AutoMM): Supercharging Multimodal AutoML with Foundation Models](https://arxiv.org/pdf/2404.16233) (*AutoML Conf*, 2024) ([BibTeX](CITING.md#autogluonmultimodal))
|
|
160
|
+
- [Multi-layer Stack Ensembles for Time Series Forecasting](https://arxiv.org/abs/2511.15350) (*AutoML Conf*, 2025) ([BibTeX](CITING.md#autogluontimeseries))
|
|
161
|
+
- [Chronos-2: From Univariate to Universal Forecasting](https://arxiv.org/abs/2510.15821) (*Arxiv*, 2025) ([BibTeX](CITING.md#autogluontimeseries))
|
|
147
162
|
|
|
148
163
|
### Articles
|
|
149
164
|
- [AutoGluon-TimeSeries: Every Time Series Forecasting Model In One Library](https://towardsdatascience.com/autogluon-timeseries-every-time-series-forecasting-model-in-one-library-29a3bf6879db) (*Towards Data Science*, Jan 2024)
|
|
@@ -169,5 +184,3 @@ We are actively accepting code contributions to the AutoGluon project. If you ar
|
|
|
169
184
|
## :classical_building: License
|
|
170
185
|
|
|
171
186
|
This library is licensed under the Apache 2.0 License.
|
|
172
|
-
|
|
173
|
-
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
autogluon.timeseries-1.4.1b20251215-py3.11-nspkg.pth,sha256=kAlKxjI5mE3Pwwqphu2maN5OBQk8W8ew70e_qbI1c6A,482
|
|
2
|
+
autogluon/timeseries/__init__.py,sha256=_CrLLc1fkjen7UzWoO0Os8WZoHOgvZbHKy46I8v_4k4,304
|
|
3
|
+
autogluon/timeseries/learner.py,sha256=9kGn0ACGfbyZRlZmwkrgBbkwq7c2715yKDCh1EK3EWQ,14961
|
|
4
|
+
autogluon/timeseries/predictor.py,sha256=0jFU63BNGIq0Y33hj-XmXobetYNObuIHpNKk29ydUUA,103144
|
|
5
|
+
autogluon/timeseries/regressor.py,sha256=HDdqi7MYRheW3uZy5c50sqVDAHap0ooyQBdOvKEKkWM,11718
|
|
6
|
+
autogluon/timeseries/splitter.py,sha256=2rypDxDKkqOC2v5nPJ6m0cmHQTZ9D6qUFrQV1HC9lz4,2329
|
|
7
|
+
autogluon/timeseries/version.py,sha256=l3nl_aPmIgPmCpYmL6FcaeflMlmZ3u1TwxKWLeIjjMg,91
|
|
8
|
+
autogluon/timeseries/configs/__init__.py,sha256=wiLBwxZkDTQBJkSJ9-xz3p_yJxX0dbHe108dS1P5O6A,183
|
|
9
|
+
autogluon/timeseries/configs/hyperparameter_presets.py,sha256=uxL5H9k9kiDcXl16bWZ57Y1HUwwwmfSaQEpUrS-J4yU,2018
|
|
10
|
+
autogluon/timeseries/configs/predictor_presets.py,sha256=sYnrs0A1ae5yzHcLLMl4v5oU9kPB3m7nK-rPzjCasFo,3577
|
|
11
|
+
autogluon/timeseries/dataset/__init__.py,sha256=UvnhAN5tjgxXTHoZMQDy64YMDj4Xxa68yY7NP4vAw0o,81
|
|
12
|
+
autogluon/timeseries/dataset/ts_dataframe.py,sha256=IOIkwV_VPV3JvilNt98gZ77gMHIpk-Ug-trDvqSk_Jg,52228
|
|
13
|
+
autogluon/timeseries/metrics/__init__.py,sha256=iFGLMOtDJ470dbmmx1BsdUKBx4RwI6ZQGFat3Z-wpzI,3567
|
|
14
|
+
autogluon/timeseries/metrics/abstract.py,sha256=_A0Ex1Ay91TPDStZ8DBiBMkIyLUusdARbuDiylHJ0yQ,11499
|
|
15
|
+
autogluon/timeseries/metrics/point.py,sha256=K1Fn0_-Ycxz1hYHd-u1X7q9X-Jt7Dp9bNvUHV6RRg7A,18274
|
|
16
|
+
autogluon/timeseries/metrics/quantile.py,sha256=f8SMVt9rV0sY9lk8B1Bjxx219IjajuJjhOSD95p_z24,4602
|
|
17
|
+
autogluon/timeseries/metrics/utils.py,sha256=_Nz6GLbs91WhqN1PoA53wD4xEEuPIQ0juV5l9rDmkFo,970
|
|
18
|
+
autogluon/timeseries/models/__init__.py,sha256=zPdwxiveOTGU9658tDPMFXbflZ5fzd_AJdbCacbfZ0s,1375
|
|
19
|
+
autogluon/timeseries/models/registry.py,sha256=dkuyKG5UK2xiGtXcsuyRDXrI-YC84zkPre8Z3wt9T_A,2115
|
|
20
|
+
autogluon/timeseries/models/abstract/__init__.py,sha256=Htfkjjc3vo92RvyM8rIlQ0PLWt3jcrCKZES07UvCMV0,146
|
|
21
|
+
autogluon/timeseries/models/abstract/abstract_timeseries_model.py,sha256=7j_ULO_d7SUUprHqnMjF_4pz8rDXODyyFeboJaQohAw,32489
|
|
22
|
+
autogluon/timeseries/models/abstract/model_trial.py,sha256=xKD6Nw8hIqAq4HxNVcGUhr9BuEqzFn7FX0TenvZHU0Q,3753
|
|
23
|
+
autogluon/timeseries/models/abstract/tunable.py,sha256=thl_wJjB9ao1T5NNF1RVH5k3yFqmao0irX-eUNqDs8k,7111
|
|
24
|
+
autogluon/timeseries/models/autogluon_tabular/__init__.py,sha256=E5fZsdFPgVdyCVyj5bGmn_lQFlCMn2NvuRLBMcCFvhM,205
|
|
25
|
+
autogluon/timeseries/models/autogluon_tabular/mlforecast.py,sha256=FJlYqMZJaltTlh54LMrDOgICgGanIymBI2F4OevVQ6A,36690
|
|
26
|
+
autogluon/timeseries/models/autogluon_tabular/per_step.py,sha256=kc0OIveCUfMbl1yGANW42EaRFZZNmlr1AJdcG-nqihA,23360
|
|
27
|
+
autogluon/timeseries/models/autogluon_tabular/transforms.py,sha256=AkXEInK4GocApU5GylECH01qgz5cLLLqC9apuN0eUbQ,2873
|
|
28
|
+
autogluon/timeseries/models/autogluon_tabular/utils.py,sha256=Fn3Vu_Q0PCtEUbtNgLp1xIblg7dOdpFlF3W5kLHgruI,63
|
|
29
|
+
autogluon/timeseries/models/chronos/__init__.py,sha256=dIoAImmZc0dTlut4CZkJxcg1bpuHKZkS8x8Y6fBoUAY,113
|
|
30
|
+
autogluon/timeseries/models/chronos/chronos2.py,sha256=86pWzlExDMp6FGD0ob1Tui2cJQBgeYljGTRUqIRzBNM,15177
|
|
31
|
+
autogluon/timeseries/models/chronos/model.py,sha256=49QF2aM-piPLWd2oD1_0qaWTCUaInCxx_8aHBh8Q-wY,33675
|
|
32
|
+
autogluon/timeseries/models/chronos/utils.py,sha256=t80Cz3EdEOzI2youjVSNYrz1_Xhi-BiaiLsodI5fYtM,14446
|
|
33
|
+
autogluon/timeseries/models/ensemble/__init__.py,sha256=3_Vn6RHpjouthrEoXs1guKUpUX6JoUgMVCgxPt2pyLw,1302
|
|
34
|
+
autogluon/timeseries/models/ensemble/abstract.py,sha256=gAaspq4f67MTfs7KW6ADVU0KfPeBKySPstCqUeC7JYs,4579
|
|
35
|
+
autogluon/timeseries/models/ensemble/ensemble_selection.py,sha256=hepycVJTtbibzTKq5Sk04L_vUuYlLFItkSybaCc_Jv8,6366
|
|
36
|
+
autogluon/timeseries/models/ensemble/per_item_greedy.py,sha256=UlPtSBwzbzVtcf_o8HGMJDbpnWb95KcuvcS_z-AiT5k,7868
|
|
37
|
+
autogluon/timeseries/models/ensemble/array_based/__init__.py,sha256=u4vGTH9gP6oATYKkxnvoiDZvc5rqfnfgrODHxIvHP7U,207
|
|
38
|
+
autogluon/timeseries/models/ensemble/array_based/abstract.py,sha256=Oci1XEgFFTle0JF5Z8PhnMjG1iPrhhtunoKUPUPhTLw,10190
|
|
39
|
+
autogluon/timeseries/models/ensemble/array_based/models.py,sha256=Jb_Rw944B1fG4_ZnysgpmQ-rbMUpv9MXfdj6t1xq2yY,8603
|
|
40
|
+
autogluon/timeseries/models/ensemble/array_based/regressor/__init__.py,sha256=OJPZZzowllw7Ks0aXF8Hye1_1Ql8XhRfdtv3e3A_4AE,424
|
|
41
|
+
autogluon/timeseries/models/ensemble/array_based/regressor/abstract.py,sha256=MSeYWwxH1mL3lrsHbDpzAg61Bovs2Fxkxl3qzj5QrXE,2771
|
|
42
|
+
autogluon/timeseries/models/ensemble/array_based/regressor/linear_stacker.py,sha256=4rUYEXcyyZ8hPITzg1tSDWmHSGfwqrTp5dd-b7MP5Hs,7245
|
|
43
|
+
autogluon/timeseries/models/ensemble/array_based/regressor/per_quantile_tabular.py,sha256=GIa2CtP3bl7uN3i4t54WPod4JxIhA9nKIyr7tx9B08E,3763
|
|
44
|
+
autogluon/timeseries/models/ensemble/array_based/regressor/tabular.py,sha256=prH6vSmRu4UBUjIdAHnLF0aH8oxHUA8ciaNP9ou9uyA,4056
|
|
45
|
+
autogluon/timeseries/models/ensemble/weighted/__init__.py,sha256=_LipTsDnYvTFmjZWsb1Vrm-eALsVVfUlF2gOpcaqE2Q,206
|
|
46
|
+
autogluon/timeseries/models/ensemble/weighted/abstract.py,sha256=meGVoSfPOjmEwTKGRTUQJ1N9bZtpewJ217TGqKNye04,1839
|
|
47
|
+
autogluon/timeseries/models/ensemble/weighted/basic.py,sha256=KsFcdmhkjywqSYvx9rdWoFzjLO-czKsOj3CWuC61SS4,3715
|
|
48
|
+
autogluon/timeseries/models/ensemble/weighted/greedy.py,sha256=NN51NnrbHd7zdJs2kErm6bs-B_OcbjlkD2j2Q00IUOE,2589
|
|
49
|
+
autogluon/timeseries/models/gluonts/__init__.py,sha256=YfyNYOkhhNsloA4MAavfmqKO29_q6o4lwPoV7L4_h7M,355
|
|
50
|
+
autogluon/timeseries/models/gluonts/abstract.py,sha256=qJ60DSkzSI4E1kx5RGeGBehkiMvcAVGSUXYSpZXo8nk,27699
|
|
51
|
+
autogluon/timeseries/models/gluonts/dataset.py,sha256=ApR-r4o0OV4jQ2hYUppJ4yjvWX02JoHod5O4acEKiHw,5074
|
|
52
|
+
autogluon/timeseries/models/gluonts/models.py,sha256=1Z3x3-jVoae5X4cSnDIgJMvTJ9_O94aDSW8HEnBaL5k,25907
|
|
53
|
+
autogluon/timeseries/models/local/__init__.py,sha256=TiKY7M6Foy8vtshfZiStEH58_XG62w4oF1TQYAQ1B0s,344
|
|
54
|
+
autogluon/timeseries/models/local/abstract_local_model.py,sha256=7pbyE4vhXgoCEcHAhxpxBVCOEG-LSrBptGwjLXd-s8o,11335
|
|
55
|
+
autogluon/timeseries/models/local/naive.py,sha256=w0XuMcgcTvTUEi2iXcd6BGvyHKB-kpqbv9c9iK4pMOA,7490
|
|
56
|
+
autogluon/timeseries/models/local/npts.py,sha256=mKuDsGnaYV8QkIgGR8se-1pXb2JAxzafESt2g_21ENA,4530
|
|
57
|
+
autogluon/timeseries/models/local/statsforecast.py,sha256=gt9evIxlymisBlBZU7aRFtZQ3mgyX7a0xtmvFyKRXK4,33275
|
|
58
|
+
autogluon/timeseries/models/multi_window/__init__.py,sha256=Bq7AT2Jxdd4WNqmjTdzeqgNiwn1NCyWp4tBIWaM-zfI,60
|
|
59
|
+
autogluon/timeseries/models/multi_window/multi_window_model.py,sha256=bv8_ux-7JXPwhbFXeBN893xQo6echCCMwqH4aEMK250,12937
|
|
60
|
+
autogluon/timeseries/models/toto/__init__.py,sha256=rQaVjZJV5ZsJGC0jhQ6CA4nYeXdV1KtlyDz2i2usQnY,54
|
|
61
|
+
autogluon/timeseries/models/toto/dataloader.py,sha256=wUrK3mcSEhaWmxpv3rAqmp1ZbLnXbEP4F77hAT2-VXg,3566
|
|
62
|
+
autogluon/timeseries/models/toto/hf_pretrained_model.py,sha256=E2agvz4jdUFhYEiavLTuBIripbl2KLGgdfr8eZXkqOM,7290
|
|
63
|
+
autogluon/timeseries/models/toto/model.py,sha256=ObMPp_Wn2cccT7osWyIfc15gk-hcWDT38p3r-uSdZmM,9412
|
|
64
|
+
autogluon/timeseries/models/toto/_internal/__init__.py,sha256=tKkiux9bD2Xu0AuVyTEx_sNOZutcluC7-d7tn7wsmec,193
|
|
65
|
+
autogluon/timeseries/models/toto/_internal/dataset.py,sha256=jpKX3LV4FkcGGgUPTzpwdR_7UZEFMfwXIQQZVkQ_I6E,6090
|
|
66
|
+
autogluon/timeseries/models/toto/_internal/forecaster.py,sha256=HhRQwqC6Y_Gr93fT-EpilWFjjxY5zR9GsNPN2JPztN4,18479
|
|
67
|
+
autogluon/timeseries/models/toto/_internal/backbone/__init__.py,sha256=hq5W62boH6HiEP8z3sHkI6_KM-Dd6TkDfWDm6DYE3J8,63
|
|
68
|
+
autogluon/timeseries/models/toto/_internal/backbone/attention.py,sha256=ez7N8ygH4Q1gU88EuoSeF1675JcoAAxocvyF4i0JuGI,9347
|
|
69
|
+
autogluon/timeseries/models/toto/_internal/backbone/backbone.py,sha256=Vy2AHnbRrc68ax41KPf0IP3RkXA7GtTgzIXr6lSAp-w,10079
|
|
70
|
+
autogluon/timeseries/models/toto/_internal/backbone/distribution.py,sha256=8NXiaEVLuvjTW7L1t1RzooZFNERWv50zyLddbAwuYpo,2502
|
|
71
|
+
autogluon/timeseries/models/toto/_internal/backbone/kvcache.py,sha256=QSVCrnbS2oD7wkJodZbP9XMVmrfCH6M3Zp44siF28Fg,5399
|
|
72
|
+
autogluon/timeseries/models/toto/_internal/backbone/rope.py,sha256=UohCHvsOP2Q2g6IXDWXQsYpBZ0JDZ0JjtFq0ZnRCF6g,3389
|
|
73
|
+
autogluon/timeseries/models/toto/_internal/backbone/rotary_embedding_torch.py,sha256=TsdcUpQUQes4dtrWb6citENGrXK8hE3M8DyZ2kslEyE,11488
|
|
74
|
+
autogluon/timeseries/models/toto/_internal/backbone/scaler.py,sha256=NQno9Ycm2wf4tZJneoOtbbyZ-ez0Z5R37XJng9rPn_4,13694
|
|
75
|
+
autogluon/timeseries/models/toto/_internal/backbone/transformer.py,sha256=K7S-fPZZOl65luFMpPQ3LC2QuNN4SunTLDTxp-bZWUc,12364
|
|
76
|
+
autogluon/timeseries/trainer/__init__.py,sha256=_tw3iioJfvtIV7wnjtEMv0yS8oabmCFxDnGRodYE7RI,72
|
|
77
|
+
autogluon/timeseries/trainer/ensemble_composer.py,sha256=zGa8vocPQGsHf-7ti8DsHwjEA176FkCt7up2LwWCK4Y,19465
|
|
78
|
+
autogluon/timeseries/trainer/model_set_builder.py,sha256=kROApbu10_ro-GVYlnx3oTKZj2TcNswWbOFB1QyBCOc,10737
|
|
79
|
+
autogluon/timeseries/trainer/prediction_cache.py,sha256=KKs22UUGrVfQN_81IgzL7Bfc8tjWk3k6YW3uHURaSs0,5496
|
|
80
|
+
autogluon/timeseries/trainer/trainer.py,sha256=igUml9D4eXOq_fryhQquU2tnl8hyrdUTzdqUz0IJ6Ig,56308
|
|
81
|
+
autogluon/timeseries/trainer/utils.py,sha256=7N4vRP6GFUlRAahxQ9PqppdIMFqMz3wpZ5u-_onR24M,588
|
|
82
|
+
autogluon/timeseries/transforms/__init__.py,sha256=fKlT4pkJ_8Gl7IUTc3uSDzt2Xow5iH5w6fPB3ePNrTg,127
|
|
83
|
+
autogluon/timeseries/transforms/covariate_scaler.py,sha256=CpTtokiE1uEg_RJa4kEUUuBwXZpPL11OC2fgCkRpGlQ,6986
|
|
84
|
+
autogluon/timeseries/transforms/target_scaler.py,sha256=sAOohPBaStZx_V8aaaQacDbfEqqWRjYUtDLxdhkRKww,6092
|
|
85
|
+
autogluon/timeseries/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
86
|
+
autogluon/timeseries/utils/constants.py,sha256=qjFWoouIQ5nJfx9Fmm4svN191ultb4XWW4NQSHeiGW4,542
|
|
87
|
+
autogluon/timeseries/utils/features.py,sha256=pI5Nu7Pj4ZrNat7vGjEAqqPO-XJGsdlH2rCUMEJLhC8,23527
|
|
88
|
+
autogluon/timeseries/utils/forecast.py,sha256=-w94i4DZaervXAZ_c1M7I4iLrPnVax8yC6pgv46bEjc,2228
|
|
89
|
+
autogluon/timeseries/utils/timer.py,sha256=qDROHYG_Z8fulMpyZMrRhfQoTneazTzYhur4qjqqydA,5799
|
|
90
|
+
autogluon/timeseries/utils/warning_filters.py,sha256=SroNhLU3kwbD8anM58vdxWq36Z8j_uiY42mEt0ya-JI,2589
|
|
91
|
+
autogluon/timeseries/utils/datetime/__init__.py,sha256=bTMR8jLh1LW55vHjbOr1zvWRMF_PqbvxpS-cUcNIDWI,173
|
|
92
|
+
autogluon/timeseries/utils/datetime/base.py,sha256=3NdsH3NDq4cVAOSoy3XpaNixyNlbjy4DJ_YYOGuu9x4,1341
|
|
93
|
+
autogluon/timeseries/utils/datetime/lags.py,sha256=dijskkPDJXhXbRHGQZPhUFuEom3typKbOeET7cxkHGY,5965
|
|
94
|
+
autogluon/timeseries/utils/datetime/seasonality.py,sha256=-w3bULdkIZKP-JrO1ahHLyNCanLhejocHlasZShuwA0,802
|
|
95
|
+
autogluon/timeseries/utils/datetime/time_features.py,sha256=kEOFls4Nzh8nO0Pcz1DwLsC_NA3hMI4JUlZI3kuvuts,2666
|
|
96
|
+
autogluon_timeseries-1.4.1b20251215.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
97
|
+
autogluon_timeseries-1.4.1b20251215.dist-info/licenses/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
|
|
98
|
+
autogluon_timeseries-1.4.1b20251215.dist-info/METADATA,sha256=S_fGdXEpxl3d6ttYaRHXUdt0SjyXQ9pS3x8JAiMYgns,13425
|
|
99
|
+
autogluon_timeseries-1.4.1b20251215.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
|
100
|
+
autogluon_timeseries-1.4.1b20251215.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
|
|
101
|
+
autogluon_timeseries-1.4.1b20251215.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
|
|
102
|
+
autogluon_timeseries-1.4.1b20251215.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
103
|
+
autogluon_timeseries-1.4.1b20251215.dist-info/RECORD,,
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"""Preset configurations for autogluon.timeseries Predictors"""
|
|
2
|
-
|
|
3
|
-
from autogluon.timeseries.models.presets import get_default_hps
|
|
4
|
-
|
|
5
|
-
# TODO: change default HPO settings when other HPO strategies (e.g., Ray tune) are available
|
|
6
|
-
# TODO: add refit_full arguments once refitting is available
|
|
7
|
-
|
|
8
|
-
TIMESERIES_PRESETS_CONFIGS = dict(
|
|
9
|
-
best_quality={"hyperparameters": "default", "num_val_windows": 2},
|
|
10
|
-
high_quality={"hyperparameters": "default"},
|
|
11
|
-
medium_quality={"hyperparameters": "light"},
|
|
12
|
-
fast_training={"hyperparameters": "very_light"},
|
|
13
|
-
# Chronos-Bolt models
|
|
14
|
-
bolt_tiny={
|
|
15
|
-
"hyperparameters": {"Chronos": {"model_path": "bolt_tiny"}},
|
|
16
|
-
"skip_model_selection": True,
|
|
17
|
-
},
|
|
18
|
-
bolt_mini={
|
|
19
|
-
"hyperparameters": {"Chronos": {"model_path": "bolt_mini"}},
|
|
20
|
-
"skip_model_selection": True,
|
|
21
|
-
},
|
|
22
|
-
bolt_small={
|
|
23
|
-
"hyperparameters": {"Chronos": {"model_path": "bolt_small"}},
|
|
24
|
-
"skip_model_selection": True,
|
|
25
|
-
},
|
|
26
|
-
bolt_base={
|
|
27
|
-
"hyperparameters": {"Chronos": {"model_path": "bolt_base"}},
|
|
28
|
-
"skip_model_selection": True,
|
|
29
|
-
},
|
|
30
|
-
# Original Chronos models
|
|
31
|
-
chronos_tiny={
|
|
32
|
-
"hyperparameters": {"Chronos": {"model_path": "tiny"}},
|
|
33
|
-
"skip_model_selection": True,
|
|
34
|
-
},
|
|
35
|
-
chronos_mini={
|
|
36
|
-
"hyperparameters": {"Chronos": {"model_path": "mini"}},
|
|
37
|
-
"skip_model_selection": True,
|
|
38
|
-
},
|
|
39
|
-
chronos_small={
|
|
40
|
-
"hyperparameters": {"Chronos": {"model_path": "small"}},
|
|
41
|
-
"skip_model_selection": True,
|
|
42
|
-
},
|
|
43
|
-
chronos_base={
|
|
44
|
-
"hyperparameters": {"Chronos": {"model_path": "base"}},
|
|
45
|
-
"skip_model_selection": True,
|
|
46
|
-
},
|
|
47
|
-
chronos_large={
|
|
48
|
-
"hyperparameters": {"Chronos": {"model_path": "large", "batch_size": 8}},
|
|
49
|
-
"skip_model_selection": True,
|
|
50
|
-
},
|
|
51
|
-
chronos_ensemble={
|
|
52
|
-
"hyperparameters": {
|
|
53
|
-
"Chronos": {"model_path": "small"},
|
|
54
|
-
**get_default_hps("light_inference"),
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
chronos_large_ensemble={
|
|
58
|
-
"hyperparameters": {
|
|
59
|
-
"Chronos": {"model_path": "large", "batch_size": 8},
|
|
60
|
-
**get_default_hps("light_inference"),
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
TIMESERIES_PRESETS_ALIASES = dict(
|
|
66
|
-
chronos="chronos_small",
|
|
67
|
-
best="best_quality",
|
|
68
|
-
high="high_quality",
|
|
69
|
-
medium="medium_quality",
|
|
70
|
-
bq="best_quality",
|
|
71
|
-
hq="high_quality",
|
|
72
|
-
mq="medium_quality",
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
# update with aliases
|
|
76
|
-
TIMESERIES_PRESETS_CONFIGS = {
|
|
77
|
-
**TIMESERIES_PRESETS_CONFIGS,
|
|
78
|
-
**{k: TIMESERIES_PRESETS_CONFIGS[v].copy() for k, v in TIMESERIES_PRESETS_ALIASES.items()},
|
|
79
|
-
}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
# Authors: Lorenzo Stella <stellalo@amazon.com>, Caner Turkmen <atturkm@amazon.com>
|
|
2
|
-
|
|
3
|
-
from enum import Enum
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Union
|
|
6
|
-
|
|
7
|
-
import torch
|
|
8
|
-
|
|
9
|
-
from .utils import left_pad_and_stack_1D
|
|
10
|
-
|
|
11
|
-
if TYPE_CHECKING:
|
|
12
|
-
from transformers import PreTrainedModel
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class ForecastType(Enum):
|
|
16
|
-
SAMPLES = "samples"
|
|
17
|
-
QUANTILES = "quantiles"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class PipelineRegistry(type):
|
|
21
|
-
REGISTRY: Dict[str, "PipelineRegistry"] = {}
|
|
22
|
-
|
|
23
|
-
def __new__(cls, name, bases, attrs):
|
|
24
|
-
"""See, https://github.com/faif/python-patterns."""
|
|
25
|
-
new_cls = type.__new__(cls, name, bases, attrs)
|
|
26
|
-
if name is not None:
|
|
27
|
-
cls.REGISTRY[name] = new_cls
|
|
28
|
-
if aliases := attrs.get("_aliases"):
|
|
29
|
-
for alias in aliases:
|
|
30
|
-
cls.REGISTRY[alias] = new_cls
|
|
31
|
-
return new_cls
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class BaseChronosPipeline(metaclass=PipelineRegistry):
|
|
35
|
-
forecast_type: ForecastType
|
|
36
|
-
dtypes = {
|
|
37
|
-
"bfloat16": torch.bfloat16,
|
|
38
|
-
"float32": torch.float32,
|
|
39
|
-
"float64": torch.float64,
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
def __init__(self, inner_model: "PreTrainedModel"):
|
|
43
|
-
"""
|
|
44
|
-
Parameters
|
|
45
|
-
----------
|
|
46
|
-
inner_model : PreTrainedModel
|
|
47
|
-
A hugging-face transformers PreTrainedModel, e.g., T5ForConditionalGeneration
|
|
48
|
-
"""
|
|
49
|
-
# for easy access to the inner HF-style model
|
|
50
|
-
self.inner_model = inner_model
|
|
51
|
-
|
|
52
|
-
def _prepare_and_validate_context(self, context: Union[torch.Tensor, List[torch.Tensor]]):
|
|
53
|
-
if isinstance(context, list):
|
|
54
|
-
context = left_pad_and_stack_1D(context)
|
|
55
|
-
assert isinstance(context, torch.Tensor)
|
|
56
|
-
if context.ndim == 1:
|
|
57
|
-
context = context.unsqueeze(0)
|
|
58
|
-
assert context.ndim == 2
|
|
59
|
-
|
|
60
|
-
return context
|
|
61
|
-
|
|
62
|
-
def predict(
|
|
63
|
-
self,
|
|
64
|
-
context: Union[torch.Tensor, List[torch.Tensor]],
|
|
65
|
-
prediction_length: Optional[int] = None,
|
|
66
|
-
**kwargs,
|
|
67
|
-
):
|
|
68
|
-
"""
|
|
69
|
-
Get forecasts for the given time series.
|
|
70
|
-
|
|
71
|
-
Parameters
|
|
72
|
-
----------
|
|
73
|
-
context
|
|
74
|
-
Input series. This is either a 1D tensor, or a list
|
|
75
|
-
of 1D tensors, or a 2D tensor whose first dimension
|
|
76
|
-
is batch. In the latter case, use left-padding with
|
|
77
|
-
``torch.nan`` to align series of different lengths.
|
|
78
|
-
prediction_length
|
|
79
|
-
Time steps to predict. Defaults to a model-dependent
|
|
80
|
-
value if not given.
|
|
81
|
-
|
|
82
|
-
Returns
|
|
83
|
-
-------
|
|
84
|
-
forecasts
|
|
85
|
-
Tensor containing forecasts. The layout and meaning
|
|
86
|
-
of the forecasts values depends on ``self.forecast_type``.
|
|
87
|
-
"""
|
|
88
|
-
raise NotImplementedError()
|
|
89
|
-
|
|
90
|
-
def predict_quantiles(
|
|
91
|
-
self, context: torch.Tensor, prediction_length: int, quantile_levels: List[float], **kwargs
|
|
92
|
-
) -> Tuple[torch.Tensor, torch.Tensor]:
|
|
93
|
-
"""
|
|
94
|
-
Get quantile and mean forecasts for given time series. All
|
|
95
|
-
predictions are returned on the CPU.
|
|
96
|
-
|
|
97
|
-
Parameters
|
|
98
|
-
----------
|
|
99
|
-
context
|
|
100
|
-
Input series. This is either a 1D tensor, or a list
|
|
101
|
-
of 1D tensors, or a 2D tensor whose first dimension
|
|
102
|
-
is batch. In the latter case, use left-padding with
|
|
103
|
-
``torch.nan`` to align series of different lengths.
|
|
104
|
-
prediction_length
|
|
105
|
-
Time steps to predict. Defaults to a model-dependent
|
|
106
|
-
value if not given.
|
|
107
|
-
quantile_levels: List[float]
|
|
108
|
-
Quantile levels to compute
|
|
109
|
-
|
|
110
|
-
Returns
|
|
111
|
-
-------
|
|
112
|
-
quantiles
|
|
113
|
-
Tensor containing quantile forecasts. Shape
|
|
114
|
-
(batch_size, prediction_length, num_quantiles)
|
|
115
|
-
mean
|
|
116
|
-
Tensor containing mean (point) forecasts. Shape
|
|
117
|
-
(batch_size, prediction_length)
|
|
118
|
-
"""
|
|
119
|
-
raise NotImplementedError()
|
|
120
|
-
|
|
121
|
-
@classmethod
|
|
122
|
-
def from_pretrained(
|
|
123
|
-
cls,
|
|
124
|
-
pretrained_model_name_or_path: Union[str, Path],
|
|
125
|
-
*model_args,
|
|
126
|
-
force=False,
|
|
127
|
-
**kwargs,
|
|
128
|
-
):
|
|
129
|
-
"""
|
|
130
|
-
Load the model, either from a local path or from the HuggingFace Hub.
|
|
131
|
-
Supports the same arguments as ``AutoConfig`` and ``AutoModel``
|
|
132
|
-
from ``transformers``.
|
|
133
|
-
|
|
134
|
-
When a local path is provided, supports both a folder or a .tar.gz archive.
|
|
135
|
-
"""
|
|
136
|
-
from transformers import AutoConfig
|
|
137
|
-
|
|
138
|
-
kwargs.setdefault("resume_download", None) # silence huggingface_hub warning
|
|
139
|
-
if str(pretrained_model_name_or_path).startswith("s3://"):
|
|
140
|
-
from .utils import cache_model_from_s3
|
|
141
|
-
|
|
142
|
-
local_model_path = cache_model_from_s3(str(pretrained_model_name_or_path), force=force)
|
|
143
|
-
return cls.from_pretrained(local_model_path, *model_args, **kwargs)
|
|
144
|
-
|
|
145
|
-
torch_dtype = kwargs.get("torch_dtype", "auto")
|
|
146
|
-
if torch_dtype != "auto" and isinstance(torch_dtype, str):
|
|
147
|
-
kwargs["torch_dtype"] = cls.dtypes[torch_dtype]
|
|
148
|
-
|
|
149
|
-
config = AutoConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)
|
|
150
|
-
is_valid_config = hasattr(config, "chronos_pipeline_class") or hasattr(config, "chronos_config")
|
|
151
|
-
|
|
152
|
-
if not is_valid_config:
|
|
153
|
-
raise ValueError("Not a Chronos config file")
|
|
154
|
-
|
|
155
|
-
pipeline_class_name = getattr(config, "chronos_pipeline_class", "ChronosPipeline")
|
|
156
|
-
class_: Optional[BaseChronosPipeline] = PipelineRegistry.REGISTRY.get(pipeline_class_name) # type: ignore
|
|
157
|
-
if class_ is None:
|
|
158
|
-
raise ValueError(f"Trying to load unknown pipeline class: {pipeline_class_name}")
|
|
159
|
-
|
|
160
|
-
return class_.from_pretrained(pretrained_model_name_or_path, *model_args, **kwargs)
|