autogluon.timeseries 1.4.1b20251003__tar.gz → 1.4.1b20251117__tar.gz

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 (106) hide show
  1. autogluon_timeseries-1.4.1b20251117/LICENSE +175 -0
  2. autogluon_timeseries-1.4.1b20251117/NOTICE +2 -0
  3. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/PKG-INFO +48 -7
  4. autogluon_timeseries-1.4.1b20251117/README.md +99 -0
  5. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/setup.py +4 -0
  6. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/dataset/ts_dataframe.py +66 -53
  7. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/learner.py +5 -4
  8. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/metrics/quantile.py +1 -1
  9. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/metrics/utils.py +4 -4
  10. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/autogluon_tabular/mlforecast.py +28 -36
  11. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/autogluon_tabular/per_step.py +14 -5
  12. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/autogluon_tabular/transforms.py +9 -7
  13. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/chronos/model.py +101 -68
  14. {autogluon.timeseries-1.4.1b20251003/src/autogluon/timeseries/models/chronos/pipeline → autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/chronos}/utils.py +64 -32
  15. autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/ensemble/__init__.py +30 -0
  16. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/ensemble/abstract.py +1 -37
  17. autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/ensemble/array_based/__init__.py +3 -0
  18. autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/ensemble/array_based/abstract.py +247 -0
  19. autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/ensemble/array_based/models.py +50 -0
  20. autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/ensemble/array_based/regressor/__init__.py +10 -0
  21. autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/ensemble/array_based/regressor/abstract.py +92 -0
  22. autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/ensemble/array_based/regressor/per_quantile_tabular.py +139 -0
  23. autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/ensemble/array_based/regressor/tabular.py +140 -0
  24. {autogluon.timeseries-1.4.1b20251003/src/autogluon/timeseries/models/ensemble → autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/ensemble/weighted}/__init__.py +6 -1
  25. autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/ensemble/weighted/abstract.py +41 -0
  26. {autogluon.timeseries-1.4.1b20251003/src/autogluon/timeseries/models/ensemble → autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/ensemble/weighted}/basic.py +0 -10
  27. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/gluonts/abstract.py +2 -2
  28. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/gluonts/dataset.py +2 -2
  29. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/local/abstract_local_model.py +2 -2
  30. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/multi_window/multi_window_model.py +1 -1
  31. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/model.py +5 -3
  32. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/predictor.py +10 -26
  33. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/regressor.py +9 -7
  34. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/splitter.py +1 -25
  35. autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/trainer/ensemble_composer.py +250 -0
  36. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/trainer/trainer.py +124 -193
  37. autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/trainer/utils.py +18 -0
  38. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/transforms/covariate_scaler.py +1 -1
  39. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/transforms/target_scaler.py +7 -7
  40. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/utils/features.py +9 -5
  41. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/utils/forecast.py +5 -5
  42. autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/utils/timer.py +68 -0
  43. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/version.py +1 -1
  44. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon.timeseries.egg-info/PKG-INFO +48 -7
  45. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon.timeseries.egg-info/SOURCES.txt +18 -10
  46. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon.timeseries.egg-info/requires.txt +6 -5
  47. autogluon.timeseries-1.4.1b20251003/src/autogluon/timeseries/evaluator.py +0 -6
  48. autogluon.timeseries-1.4.1b20251003/src/autogluon/timeseries/models/chronos/pipeline/__init__.py +0 -10
  49. autogluon.timeseries-1.4.1b20251003/src/autogluon/timeseries/models/chronos/pipeline/base.py +0 -160
  50. autogluon.timeseries-1.4.1b20251003/src/autogluon/timeseries/models/chronos/pipeline/chronos.py +0 -544
  51. autogluon.timeseries-1.4.1b20251003/src/autogluon/timeseries/models/chronos/pipeline/chronos_bolt.py +0 -580
  52. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/setup.cfg +0 -0
  53. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/__init__.py +0 -0
  54. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/configs/__init__.py +0 -0
  55. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/configs/hyperparameter_presets.py +0 -0
  56. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/configs/predictor_presets.py +0 -0
  57. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/dataset/__init__.py +0 -0
  58. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/metrics/__init__.py +0 -0
  59. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/metrics/abstract.py +0 -0
  60. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/metrics/point.py +0 -0
  61. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/__init__.py +0 -0
  62. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/abstract/__init__.py +0 -0
  63. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/abstract/abstract_timeseries_model.py +0 -0
  64. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/abstract/model_trial.py +0 -0
  65. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/abstract/tunable.py +0 -0
  66. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/autogluon_tabular/__init__.py +0 -0
  67. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/autogluon_tabular/utils.py +0 -0
  68. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/chronos/__init__.py +0 -0
  69. {autogluon.timeseries-1.4.1b20251003/src/autogluon/timeseries/models/ensemble → autogluon_timeseries-1.4.1b20251117/src/autogluon/timeseries/models/ensemble/weighted}/greedy.py +0 -0
  70. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/gluonts/__init__.py +0 -0
  71. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/gluonts/models.py +0 -0
  72. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/local/__init__.py +0 -0
  73. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/local/naive.py +0 -0
  74. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/local/npts.py +0 -0
  75. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/local/statsforecast.py +0 -0
  76. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/multi_window/__init__.py +0 -0
  77. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/registry.py +0 -0
  78. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/__init__.py +0 -0
  79. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/_internal/__init__.py +0 -0
  80. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/_internal/backbone/__init__.py +0 -0
  81. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/_internal/backbone/attention.py +0 -0
  82. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/_internal/backbone/backbone.py +0 -0
  83. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/_internal/backbone/distribution.py +0 -0
  84. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/_internal/backbone/kvcache.py +0 -0
  85. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/_internal/backbone/rope.py +0 -0
  86. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/_internal/backbone/scaler.py +0 -0
  87. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/_internal/backbone/transformer.py +0 -0
  88. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/_internal/dataset.py +0 -0
  89. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/_internal/forecaster.py +0 -0
  90. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/dataloader.py +0 -0
  91. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/models/toto/hf_pretrained_model.py +0 -0
  92. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/trainer/__init__.py +0 -0
  93. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/trainer/model_set_builder.py +0 -0
  94. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/trainer/prediction_cache.py +0 -0
  95. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/transforms/__init__.py +0 -0
  96. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/utils/__init__.py +0 -0
  97. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/utils/datetime/__init__.py +0 -0
  98. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/utils/datetime/base.py +0 -0
  99. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/utils/datetime/lags.py +0 -0
  100. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/utils/datetime/seasonality.py +0 -0
  101. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/utils/datetime/time_features.py +0 -0
  102. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon/timeseries/utils/warning_filters.py +0 -0
  103. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon.timeseries.egg-info/dependency_links.txt +0 -0
  104. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon.timeseries.egg-info/namespace_packages.txt +0 -0
  105. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon.timeseries.egg-info/top_level.txt +0 -0
  106. {autogluon.timeseries-1.4.1b20251003 → autogluon_timeseries-1.4.1b20251117}/src/autogluon.timeseries.egg-info/zip-safe +0 -0
@@ -0,0 +1,175 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
@@ -0,0 +1,2 @@
1
+ AutoML for Text, Image, and Tabular Data
2
+ Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: autogluon.timeseries
3
- Version: 1.4.1b20251003
3
+ Version: 1.4.1b20251117
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
@@ -34,11 +33,55 @@ Classifier: Topic :: Scientific/Engineering :: Information Analysis
34
33
  Classifier: Topic :: Scientific/Engineering :: Image Recognition
35
34
  Requires-Python: >=3.9, <3.13
36
35
  Description-Content-Type: text/markdown
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.8,>=2.6
43
+ Requires-Dist: lightning<2.8,>=2.5.1
44
+ Requires-Dist: pytorch_lightning
45
+ Requires-Dist: transformers[sentencepiece]<4.50,>=4.38.0
46
+ Requires-Dist: accelerate<2.0,>=0.34.0
47
+ Requires-Dist: gluonts<0.17,>=0.15.0
48
+ Requires-Dist: networkx<4,>=3.0
49
+ Requires-Dist: statsforecast<2.0.2,>=1.7.0
50
+ Requires-Dist: mlforecast<0.15.0,>=0.14.0
51
+ Requires-Dist: utilsforecast<0.2.12,>=0.2.3
52
+ Requires-Dist: coreforecast<0.0.17,>=0.0.12
53
+ Requires-Dist: fugue>=0.9.0
54
+ Requires-Dist: tqdm<5,>=4.38
55
+ Requires-Dist: orjson~=3.9
56
+ Requires-Dist: chronos-forecasting<3,>=2.0.1
57
+ Requires-Dist: tensorboard<3,>=2.9
58
+ Requires-Dist: autogluon.core[raytune]==1.4.1b20251117
59
+ Requires-Dist: autogluon.common==1.4.1b20251117
60
+ Requires-Dist: autogluon.features==1.4.1b20251117
61
+ Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost]==1.4.1b20251117
37
62
  Provides-Extra: tests
63
+ Requires-Dist: pytest; extra == "tests"
64
+ Requires-Dist: ruff>=0.0.285; extra == "tests"
65
+ Requires-Dist: flaky<4,>=3.7; extra == "tests"
66
+ Requires-Dist: pytest-timeout<3,>=2.1; extra == "tests"
38
67
  Provides-Extra: toto
68
+ Requires-Dist: einops<1,>=0.7; extra == "toto"
69
+ Requires-Dist: rotary-embedding-torch<1,>=0.8; extra == "toto"
39
70
  Provides-Extra: all
40
- License-File: ../LICENSE
41
- License-File: ../NOTICE
71
+ Requires-Dist: einops<1,>=0.7; extra == "all"
72
+ Requires-Dist: rotary-embedding-torch<1,>=0.8; extra == "all"
73
+ Dynamic: author
74
+ Dynamic: classifier
75
+ Dynamic: description
76
+ Dynamic: description-content-type
77
+ Dynamic: home-page
78
+ Dynamic: license
79
+ Dynamic: license-file
80
+ Dynamic: project-url
81
+ Dynamic: provides-extra
82
+ Dynamic: requires-dist
83
+ Dynamic: requires-python
84
+ Dynamic: summary
42
85
 
43
86
 
44
87
 
@@ -139,5 +182,3 @@ We are actively accepting code contributions to the AutoGluon project. If you ar
139
182
  ## :classical_building: License
140
183
 
141
184
  This library is licensed under the Apache 2.0 License.
142
-
143
-
@@ -0,0 +1,99 @@
1
+
2
+
3
+ <div align="center">
4
+ <img src="https://user-images.githubusercontent.com/16392542/77208906-224aa500-6aba-11ea-96bd-e81806074030.png" width="350">
5
+
6
+ ## Fast and Accurate ML in 3 Lines of Code
7
+
8
+ [![Latest Release](https://img.shields.io/github/v/release/autogluon/autogluon)](https://github.com/autogluon/autogluon/releases)
9
+ [![Conda Forge](https://img.shields.io/conda/vn/conda-forge/autogluon.svg)](https://anaconda.org/conda-forge/autogluon)
10
+ [![Python Versions](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)](https://pypi.org/project/autogluon/)
11
+ [![Downloads](https://pepy.tech/badge/autogluon/month)](https://pepy.tech/project/autogluon)
12
+ [![GitHub license](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE)
13
+ [![Discord](https://img.shields.io/discord/1043248669505368144?color=7289da&label=Discord&logo=discord&logoColor=ffffff)](https://discord.gg/wjUmjqAc2N)
14
+ [![Twitter](https://img.shields.io/twitter/follow/autogluon?style=social)](https://twitter.com/autogluon)
15
+ [![Continuous Integration](https://github.com/autogluon/autogluon/actions/workflows/continuous_integration.yml/badge.svg)](https://github.com/autogluon/autogluon/actions/workflows/continuous_integration.yml)
16
+ [![Platform Tests](https://github.com/autogluon/autogluon/actions/workflows/platform_tests-command.yml/badge.svg?event=schedule)](https://github.com/autogluon/autogluon/actions/workflows/platform_tests-command.yml)
17
+
18
+ [Installation](https://auto.gluon.ai/stable/install.html) | [Documentation](https://auto.gluon.ai/stable/index.html) | [Release Notes](https://auto.gluon.ai/stable/whats_new/index.html)
19
+
20
+ </div>
21
+
22
+ AutoGluon, developed by AWS AI, automates machine learning tasks enabling you to easily achieve strong predictive performance in your applications. With just a few lines of code, you can train and deploy high-accuracy machine learning and deep learning models on image, text, time series, and tabular data.
23
+
24
+
25
+ ## 💾 Installation
26
+
27
+ AutoGluon is supported on Python 3.9 - 3.12 and is available on Linux, MacOS, and Windows.
28
+
29
+ You can install AutoGluon with:
30
+
31
+ ```python
32
+ pip install autogluon
33
+ ```
34
+
35
+ Visit our [Installation Guide](https://auto.gluon.ai/stable/install.html) for detailed instructions, including GPU support, Conda installs, and optional dependencies.
36
+
37
+ ## :zap: Quickstart
38
+
39
+ Build accurate end-to-end ML models in just 3 lines of code!
40
+
41
+ ```python
42
+ from autogluon.tabular import TabularPredictor
43
+ predictor = TabularPredictor(label="class").fit("train.csv", presets="best")
44
+ predictions = predictor.predict("test.csv")
45
+ ```
46
+
47
+ | AutoGluon Task | Quickstart | API |
48
+ |:--------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------:|
49
+ | TabularPredictor | [![Quick Start](https://img.shields.io/static/v1?label=&message=tutorial&color=grey)](https://auto.gluon.ai/stable/tutorials/tabular/tabular-quick-start.html) | [![API](https://img.shields.io/badge/api-reference-blue.svg)](https://auto.gluon.ai/stable/api/autogluon.tabular.TabularPredictor.html) |
50
+ | MultiModalPredictor | [![Quick Start](https://img.shields.io/static/v1?label=&message=tutorial&color=grey)](https://auto.gluon.ai/stable/tutorials/multimodal/multimodal_prediction/multimodal-quick-start.html) | [![API](https://img.shields.io/badge/api-reference-blue.svg)](https://auto.gluon.ai/stable/api/autogluon.multimodal.MultiModalPredictor.html) |
51
+ | TimeSeriesPredictor | [![Quick Start](https://img.shields.io/static/v1?label=&message=tutorial&color=grey)](https://auto.gluon.ai/stable/tutorials/timeseries/forecasting-quick-start.html) | [![API](https://img.shields.io/badge/api-reference-blue.svg)](https://auto.gluon.ai/stable/api/autogluon.timeseries.TimeSeriesPredictor.html) |
52
+
53
+ ## :mag: Resources
54
+
55
+ ### Hands-on Tutorials / Talks
56
+
57
+ Below is a curated list of recent tutorials and talks on AutoGluon. A comprehensive list is available [here](AWESOME.md#videos--tutorials).
58
+
59
+ | Title | Format | Location | Date |
60
+ |--------------------------------------------------------------------------------------------------------------------------|----------|----------------------------------------------------------------------------------|------------|
61
+ | :tv: [AutoGluon: Towards No-Code Automated Machine Learning](https://www.youtube.com/watch?v=SwPq9qjaN2Q) | Tutorial | [AutoML 2024](https://2024.automl.cc/) | 2024/09/09 |
62
+ | :tv: [AutoGluon 1.0: Shattering the AutoML Ceiling with Zero Lines of Code](https://www.youtube.com/watch?v=5tvp_Ihgnuk) | Tutorial | [AutoML 2023](https://2023.automl.cc/) | 2023/09/12 |
63
+ | :sound: [AutoGluon: The Story](https://automlpodcast.com/episode/autogluon-the-story) | Podcast | [The AutoML Podcast](https://automlpodcast.com/) | 2023/09/05 |
64
+ | :tv: [AutoGluon: AutoML for Tabular, Multimodal, and Time Series Data](https://youtu.be/Lwu15m5mmbs?si=jSaFJDqkTU27C0fa) | Tutorial | PyData Berlin | 2023/06/20 |
65
+ | :tv: [Solving Complex ML Problems in a few Lines of Code with AutoGluon](https://www.youtube.com/watch?v=J1UQUCPB88I) | Tutorial | PyData Seattle | 2023/06/20 |
66
+ | :tv: [The AutoML Revolution](https://www.youtube.com/watch?v=VAAITEds-28) | Tutorial | [Fall AutoML School 2022](https://sites.google.com/view/automl-fall-school-2022) | 2022/10/18 |
67
+
68
+ ### Scientific Publications
69
+ - [AutoGluon-Tabular: Robust and Accurate AutoML for Structured Data](https://arxiv.org/pdf/2003.06505.pdf) (*Arxiv*, 2020) ([BibTeX](CITING.md#general-usage--autogluontabular))
70
+ - [Fast, Accurate, and Simple Models for Tabular Data via Augmented Distillation](https://proceedings.neurips.cc/paper/2020/hash/62d75fb2e3075506e8837d8f55021ab1-Abstract.html) (*NeurIPS*, 2020) ([BibTeX](CITING.md#tabular-distillation))
71
+ - [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))
72
+ - [XTab: Cross-table Pretraining for Tabular Transformers](https://proceedings.mlr.press/v202/zhu23k/zhu23k.pdf) (*ICML*, 2023)
73
+ - [AutoGluon-TimeSeries: AutoML for Probabilistic Time Series Forecasting](https://arxiv.org/abs/2308.05566) (*AutoML Conf*, 2023) ([BibTeX](CITING.md#autogluontimeseries))
74
+ - [TabRepo: A Large Scale Repository of Tabular Model Evaluations and its AutoML Applications](https://arxiv.org/pdf/2311.02971.pdf) (*Under Review*, 2024)
75
+
76
+ ### Articles
77
+ - [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)
78
+ - [AutoGluon for tabular data: 3 lines of code to achieve top 1% in Kaggle competitions](https://aws.amazon.com/blogs/opensource/machine-learning-with-autogluon-an-open-source-automl-library/) (*AWS Open Source Blog*, Mar 2020)
79
+ - [AutoGluon overview & example applications](https://towardsdatascience.com/autogluon-deep-learning-automl-5cdb4e2388ec?source=friends_link&sk=e3d17d06880ac714e47f07f39178fdf2) (*Towards Data Science*, Dec 2019)
80
+
81
+ ### Train/Deploy AutoGluon in the Cloud
82
+ - [AutoGluon Cloud](https://auto.gluon.ai/cloud/stable/index.html) (Recommended)
83
+ - [AutoGluon on SageMaker AutoPilot](https://auto.gluon.ai/stable/tutorials/cloud_fit_deploy/autopilot-autogluon.html)
84
+ - [AutoGluon on Amazon SageMaker](https://auto.gluon.ai/stable/tutorials/cloud_fit_deploy/cloud-aws-sagemaker-train-deploy.html)
85
+ - [AutoGluon Deep Learning Containers](https://github.com/aws/deep-learning-containers/blob/master/available_images.md#autogluon-training-containers) (Security certified & maintained by the AutoGluon developers)
86
+ - [AutoGluon Official Docker Container](https://hub.docker.com/r/autogluon/autogluon)
87
+ - [AutoGluon-Tabular on AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-n4zf5pmjt7ism) (Not maintained by us)
88
+
89
+ ## :pencil: Citing AutoGluon
90
+
91
+ If you use AutoGluon in a scientific publication, please refer to our [citation guide](CITING.md).
92
+
93
+ ## :wave: How to get involved
94
+
95
+ We are actively accepting code contributions to the AutoGluon project. If you are interested in contributing to AutoGluon, please read the [Contributing Guide](https://github.com/autogluon/autogluon/blob/master/CONTRIBUTING.md) to get started.
96
+
97
+ ## :classical_building: License
98
+
99
+ This library is licensed under the Apache 2.0 License.
@@ -9,6 +9,9 @@ from setuptools import setup
9
9
 
10
10
  filepath = os.path.abspath(os.path.dirname(__file__))
11
11
  filepath_import = os.path.join(filepath, "..", "core", "src", "autogluon", "core", "_setup_utils.py")
12
+ if not os.path.exists(filepath_import):
13
+ filepath_import = os.path.join(filepath, "_setup_utils.py")
14
+
12
15
  spec = importlib.util.spec_from_file_location("ag_min_dependencies", filepath_import)
13
16
  ag = importlib.util.module_from_spec(spec)
14
17
  # Identical to `from autogluon.core import _setup_utils as ag`, but works without `autogluon.core` being installed.
@@ -39,6 +42,7 @@ install_requires = [
39
42
  "fugue>=0.9.0", # prevent dependency clash with omegaconf
40
43
  "tqdm", # version range defined in `core/_setup_utils.py`
41
44
  "orjson~=3.9", # use faster JSON implementation in GluonTS
45
+ "chronos-forecasting>=2.0.1,<3",
42
46
  # TODO v1.1: use lightning[pytorch-extra] instead of explicitly installing tensorboard
43
47
  "tensorboard>=2.9,<3", # fixes https://github.com/autogluon/autogluon/issues/3612
44
48
  f"autogluon.core[raytune]=={version}",
@@ -7,7 +7,7 @@ import reprlib
7
7
  from collections.abc import Iterable
8
8
  from itertools import islice
9
9
  from pathlib import Path
10
- from typing import TYPE_CHECKING, Any, Optional, Type, Union, overload
10
+ from typing import TYPE_CHECKING, Any, Final, Optional, Type, Union, overload
11
11
 
12
12
  import numpy as np
13
13
  import pandas as pd
@@ -19,11 +19,6 @@ from autogluon.common.loaders import load_pd
19
19
 
20
20
  logger = logging.getLogger(__name__)
21
21
 
22
- ITEMID = "item_id"
23
- TIMESTAMP = "timestamp"
24
-
25
- IRREGULAR_TIME_INDEX_FREQSTR = "IRREG"
26
-
27
22
 
28
23
  class TimeSeriesDataFrame(pd.DataFrame):
29
24
  """A collection of univariate time series, where each row is identified by an (``item_id``, ``timestamp``) pair.
@@ -121,6 +116,10 @@ class TimeSeriesDataFrame(pd.DataFrame):
121
116
  index: pd.MultiIndex # type: ignore
122
117
  _metadata = ["_static_features"]
123
118
 
119
+ IRREGULAR_TIME_INDEX_FREQSTR: Final[str] = "IRREG"
120
+ ITEMID: Final[str] = "item_id"
121
+ TIMESTAMP: Final[str] = "timestamp"
122
+
124
123
  def __init__(
125
124
  self,
126
125
  data: Union[pd.DataFrame, str, Path, Iterable],
@@ -175,23 +174,27 @@ class TimeSeriesDataFrame(pd.DataFrame):
175
174
  df = df.copy()
176
175
  if id_column is not None:
177
176
  assert id_column in df.columns, f"Column '{id_column}' not found!"
178
- if id_column != ITEMID and ITEMID in df.columns:
179
- logger.warning(f"Renaming existing column '{ITEMID}' -> '__{ITEMID}' to avoid name collisions.")
180
- df.rename(columns={ITEMID: "__" + ITEMID}, inplace=True)
181
- df.rename(columns={id_column: ITEMID}, inplace=True)
177
+ if id_column != cls.ITEMID and cls.ITEMID in df.columns:
178
+ logger.warning(
179
+ f"Renaming existing column '{cls.ITEMID}' -> '__{cls.ITEMID}' to avoid name collisions."
180
+ )
181
+ df.rename(columns={cls.ITEMID: "__" + cls.ITEMID}, inplace=True)
182
+ df.rename(columns={id_column: cls.ITEMID}, inplace=True)
182
183
 
183
184
  if timestamp_column is not None:
184
185
  assert timestamp_column in df.columns, f"Column '{timestamp_column}' not found!"
185
- if timestamp_column != TIMESTAMP and TIMESTAMP in df.columns:
186
- logger.warning(f"Renaming existing column '{TIMESTAMP}' -> '__{TIMESTAMP}' to avoid name collisions.")
187
- df.rename(columns={TIMESTAMP: "__" + TIMESTAMP}, inplace=True)
188
- df.rename(columns={timestamp_column: TIMESTAMP}, inplace=True)
186
+ if timestamp_column != cls.TIMESTAMP and cls.TIMESTAMP in df.columns:
187
+ logger.warning(
188
+ f"Renaming existing column '{cls.TIMESTAMP}' -> '__{cls.TIMESTAMP}' to avoid name collisions."
189
+ )
190
+ df.rename(columns={cls.TIMESTAMP: "__" + cls.TIMESTAMP}, inplace=True)
191
+ df.rename(columns={timestamp_column: cls.TIMESTAMP}, inplace=True)
189
192
 
190
- if TIMESTAMP in df.columns:
191
- df[TIMESTAMP] = pd.to_datetime(df[TIMESTAMP])
193
+ if cls.TIMESTAMP in df.columns:
194
+ df[cls.TIMESTAMP] = pd.to_datetime(df[cls.TIMESTAMP])
192
195
 
193
196
  cls._validate_data_frame(df)
194
- return df.set_index([ITEMID, TIMESTAMP])
197
+ return df.set_index([cls.ITEMID, cls.TIMESTAMP])
195
198
 
196
199
  @classmethod
197
200
  def _construct_tsdf_from_iterable_dataset(cls, iterable_dataset: Iterable, num_cpus: int = -1) -> pd.DataFrame:
@@ -202,7 +205,7 @@ class TimeSeriesDataFrame(pd.DataFrame):
202
205
  start_timestamp = start_timestamp.to_timestamp(how="S")
203
206
  target = ts["target"]
204
207
  datetime_index = tuple(pd.date_range(start_timestamp, periods=len(target), freq=freq))
205
- idx = pd.MultiIndex.from_product([(item_id,), datetime_index], names=[ITEMID, TIMESTAMP])
208
+ idx = pd.MultiIndex.from_product([(item_id,), datetime_index], names=[cls.ITEMID, cls.TIMESTAMP])
206
209
  return pd.Series(target, name="target", index=idx).to_frame()
207
210
 
208
211
  cls._validate_iterable(iterable_dataset)
@@ -219,32 +222,34 @@ class TimeSeriesDataFrame(pd.DataFrame):
219
222
  raise ValueError(f"data must be a pd.DataFrame, got {type(data)}")
220
223
  if not isinstance(data.index, pd.MultiIndex):
221
224
  raise ValueError(f"data must have pd.MultiIndex, got {type(data.index)}")
222
- if not pd.api.types.is_datetime64_dtype(data.index.dtypes[TIMESTAMP]):
223
- raise ValueError(f"for {TIMESTAMP}, the only pandas dtype allowed is `datetime64`.")
224
- if not data.index.names == (f"{ITEMID}", f"{TIMESTAMP}"):
225
- raise ValueError(f"data must have index names as ('{ITEMID}', '{TIMESTAMP}'), got {data.index.names}")
225
+ if not pd.api.types.is_datetime64_dtype(data.index.dtypes[cls.TIMESTAMP]):
226
+ raise ValueError(f"for {cls.TIMESTAMP}, the only pandas dtype allowed is `datetime64`.")
227
+ if not data.index.names == (f"{cls.ITEMID}", f"{cls.TIMESTAMP}"):
228
+ raise ValueError(
229
+ f"data must have index names as ('{cls.ITEMID}', '{cls.TIMESTAMP}'), got {data.index.names}"
230
+ )
226
231
  item_id_index = data.index.levels[0]
227
232
  if not (pd.api.types.is_integer_dtype(item_id_index) or pd.api.types.is_string_dtype(item_id_index)):
228
- raise ValueError(f"all entries in index `{ITEMID}` must be of integer or string dtype")
233
+ raise ValueError(f"all entries in index `{cls.ITEMID}` must be of integer or string dtype")
229
234
 
230
235
  @classmethod
231
236
  def _validate_data_frame(cls, df: pd.DataFrame):
232
237
  """Validate that a pd.DataFrame with ITEMID and TIMESTAMP columns can be converted to TimeSeriesDataFrame"""
233
238
  if not isinstance(df, pd.DataFrame):
234
239
  raise ValueError(f"data must be a pd.DataFrame, got {type(df)}")
235
- if ITEMID not in df.columns:
236
- raise ValueError(f"data must have a `{ITEMID}` column")
237
- if TIMESTAMP not in df.columns:
238
- raise ValueError(f"data must have a `{TIMESTAMP}` column")
239
- if df[ITEMID].isnull().any():
240
- raise ValueError(f"`{ITEMID}` column can not have nan")
241
- if df[TIMESTAMP].isnull().any():
242
- raise ValueError(f"`{TIMESTAMP}` column can not have nan")
243
- if not pd.api.types.is_datetime64_dtype(df[TIMESTAMP]):
244
- raise ValueError(f"for {TIMESTAMP}, the only pandas dtype allowed is `datetime64`.")
245
- item_id_column = df[ITEMID]
240
+ if cls.ITEMID not in df.columns:
241
+ raise ValueError(f"data must have a `{cls.ITEMID}` column")
242
+ if cls.TIMESTAMP not in df.columns:
243
+ raise ValueError(f"data must have a `{cls.TIMESTAMP}` column")
244
+ if df[cls.ITEMID].isnull().any():
245
+ raise ValueError(f"`{cls.ITEMID}` column can not have nan")
246
+ if df[cls.TIMESTAMP].isnull().any():
247
+ raise ValueError(f"`{cls.TIMESTAMP}` column can not have nan")
248
+ if not pd.api.types.is_datetime64_dtype(df[cls.TIMESTAMP]):
249
+ raise ValueError(f"for {cls.TIMESTAMP}, the only pandas dtype allowed is `datetime64`.")
250
+ item_id_column = df[cls.ITEMID]
246
251
  if not (pd.api.types.is_integer_dtype(item_id_column) or pd.api.types.is_string_dtype(item_id_column)):
247
- raise ValueError(f"all entries in column `{ITEMID}` must be of integer or string dtype")
252
+ raise ValueError(f"all entries in column `{cls.ITEMID}` must be of integer or string dtype")
248
253
 
249
254
  @classmethod
250
255
  def _validate_iterable(cls, data: Iterable):
@@ -386,7 +391,7 @@ class TimeSeriesDataFrame(pd.DataFrame):
386
391
  @property
387
392
  def item_ids(self) -> pd.Index:
388
393
  """List of unique time series IDs contained in the data set."""
389
- return self.index.unique(level=ITEMID)
394
+ return self.index.unique(level=self.ITEMID)
390
395
 
391
396
  @classmethod
392
397
  def _construct_static_features(
@@ -403,10 +408,12 @@ class TimeSeriesDataFrame(pd.DataFrame):
403
408
 
404
409
  if id_column is not None:
405
410
  assert id_column in static_features.columns, f"Column '{id_column}' not found in static_features!"
406
- if id_column != ITEMID and ITEMID in static_features.columns:
407
- logger.warning(f"Renaming existing column '{ITEMID}' -> '__{ITEMID}' to avoid name collisions.")
408
- static_features.rename(columns={ITEMID: "__" + ITEMID}, inplace=True)
409
- static_features.rename(columns={id_column: ITEMID}, inplace=True)
411
+ if id_column != cls.ITEMID and cls.ITEMID in static_features.columns:
412
+ logger.warning(
413
+ f"Renaming existing column '{cls.ITEMID}' -> '__{cls.ITEMID}' to avoid name collisions."
414
+ )
415
+ static_features.rename(columns={cls.ITEMID: "__" + cls.ITEMID}, inplace=True)
416
+ static_features.rename(columns={id_column: cls.ITEMID}, inplace=True)
410
417
  return static_features
411
418
 
412
419
  @property
@@ -431,10 +438,10 @@ class TimeSeriesDataFrame(pd.DataFrame):
431
438
 
432
439
  # Avoid modifying static features inplace
433
440
  value = value.copy()
434
- if ITEMID in value.columns and value.index.name != ITEMID:
435
- value = value.set_index(ITEMID)
436
- if value.index.name != ITEMID:
437
- value.index.rename(ITEMID, inplace=True)
441
+ if self.ITEMID in value.columns and value.index.name != self.ITEMID:
442
+ value = value.set_index(self.ITEMID)
443
+ if value.index.name != self.ITEMID:
444
+ value.index.rename(self.ITEMID, inplace=True)
438
445
  missing_item_ids = self.item_ids.difference(value.index)
439
446
  if len(missing_item_ids) > 0:
440
447
  raise ValueError(
@@ -514,7 +521,7 @@ class TimeSeriesDataFrame(pd.DataFrame):
514
521
  else:
515
522
  raise ValueError(f"Cannot infer frequency. Multiple frequencies detected: {unique_freqs}")
516
523
  else:
517
- return IRREGULAR_TIME_INDEX_FREQSTR
524
+ return self.IRREGULAR_TIME_INDEX_FREQSTR
518
525
  else:
519
526
  return pd.tseries.frequencies.to_offset(unique_freqs[0]).freqstr
520
527
 
@@ -526,7 +533,7 @@ class TimeSeriesDataFrame(pd.DataFrame):
526
533
  values. For reliable results, use :meth:`~autogluon.timeseries.TimeSeriesDataFrame.infer_frequency`.
527
534
  """
528
535
  inferred_freq = self.infer_frequency(num_items=50)
529
- return None if inferred_freq == IRREGULAR_TIME_INDEX_FREQSTR else inferred_freq
536
+ return None if inferred_freq == self.IRREGULAR_TIME_INDEX_FREQSTR else inferred_freq
530
537
 
531
538
  @property
532
539
  def num_items(self):
@@ -735,7 +742,7 @@ class TimeSeriesDataFrame(pd.DataFrame):
735
742
  return self.loc[mask]
736
743
  else:
737
744
  # Fall back to a slow groupby operation
738
- result = self.groupby(level=ITEMID, sort=False, as_index=False).nth(slice(start_index, end_index))
745
+ result = self.groupby(level=self.ITEMID, sort=False, as_index=False).nth(slice(start_index, end_index))
739
746
  result.static_features = self.static_features
740
747
  return result
741
748
 
@@ -852,12 +859,12 @@ class TimeSeriesDataFrame(pd.DataFrame):
852
859
  "It is highly recommended to call `ts_df.sort_index()` before calling `ts_df.fill_missing_values()`"
853
860
  )
854
861
 
855
- grouped_df = df.groupby(level=ITEMID, sort=False, group_keys=False)
862
+ grouped_df = df.groupby(level=self.ITEMID, sort=False, group_keys=False)
856
863
  if method == "auto":
857
864
  filled_df = grouped_df.ffill()
858
865
  # If necessary, fill missing values at the start of each time series with bfill
859
866
  if filled_df.isna().any(axis=None):
860
- filled_df = filled_df.groupby(level=ITEMID, sort=False, group_keys=False).bfill()
867
+ filled_df = filled_df.groupby(level=self.ITEMID, sort=False, group_keys=False).bfill()
861
868
  elif method in ["ffill", "pad"]:
862
869
  filled_df = grouped_df.ffill()
863
870
  elif method in ["bfill", "backfill"]:
@@ -1086,8 +1093,8 @@ class TimeSeriesDataFrame(pd.DataFrame):
1086
1093
  def resample_chunk(chunk: Iterable[tuple[str, pd.DataFrame]]) -> pd.DataFrame:
1087
1094
  resampled_dfs = []
1088
1095
  for item_id, df in chunk:
1089
- resampled_df = df.resample(offset, level=TIMESTAMP, **kwargs).agg(aggregation)
1090
- resampled_dfs.append(pd.concat({item_id: resampled_df}, names=[ITEMID]))
1096
+ resampled_df = df.resample(offset, level=self.TIMESTAMP, **kwargs).agg(aggregation)
1097
+ resampled_dfs.append(pd.concat({item_id: resampled_df}, names=[self.ITEMID]))
1091
1098
  return pd.concat(resampled_dfs)
1092
1099
 
1093
1100
  # Resampling time for 1 item < overhead time for a single parallel job. Therefore, we group items into chunks
@@ -1095,8 +1102,8 @@ class TimeSeriesDataFrame(pd.DataFrame):
1095
1102
  df = pd.DataFrame(self)
1096
1103
  # Make sure that timestamp index has dtype 'datetime64[ns]', otherwise index may contain NaT values.
1097
1104
  # See https://github.com/autogluon/autogluon/issues/4917
1098
- df.index = df.index.set_levels(df.index.levels[1].astype("datetime64[ns]"), level=TIMESTAMP)
1099
- chunks = split_into_chunks(df.groupby(level=ITEMID, sort=False), chunk_size)
1105
+ df.index = df.index.set_levels(df.index.levels[1].astype("datetime64[ns]"), level=self.TIMESTAMP)
1106
+ chunks = split_into_chunks(df.groupby(level=self.ITEMID, sort=False), chunk_size)
1100
1107
  resampled_chunks = Parallel(n_jobs=num_cpus)(delayed(resample_chunk)(chunk) for chunk in chunks)
1101
1108
  resampled_df = TimeSeriesDataFrame(pd.concat(resampled_chunks))
1102
1109
  resampled_df.static_features = self.static_features
@@ -1142,3 +1149,9 @@ class TimeSeriesDataFrame(pd.DataFrame):
1142
1149
  def __getitem__(self, items: list[str]) -> Self: ... # type: ignore
1143
1150
  @overload
1144
1151
  def __getitem__(self, item: str) -> pd.Series: ... # type: ignore
1152
+
1153
+
1154
+ # TODO: remove with v2.0
1155
+ # module-level constants kept for backward compatibility.
1156
+ ITEMID = TimeSeriesDataFrame.ITEMID
1157
+ TIMESTAMP = TimeSeriesDataFrame.TIMESTAMP