autogluon.timeseries 1.1.1b20240507__py3-none-any.whl → 1.1.1b20240508__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.

@@ -86,6 +86,28 @@ class AbstractMLForecastModel(AbstractTimeSeriesModel):
86
86
  self._residuals_std_per_item: Optional[pd.Series] = None
87
87
  self._avg_residuals_std: Optional[float] = None
88
88
  self._train_target_median: Optional[float] = None
89
+ self._non_boolean_real_covariates: List[str] = []
90
+
91
+ @property
92
+ def tabular_predictor_path(self) -> str:
93
+ return os.path.join(self.path, "tabular_predictor")
94
+
95
+ def save(self, path: str = None, verbose: bool = True) -> str:
96
+ assert "mean" in self._mlf.models_, "TabularPredictor must be trained before saving"
97
+ tabular_predictor = self._mlf.models_["mean"].predictor
98
+ self._mlf.models_["mean"].predictor = None
99
+ save_path = super().save(path=path, verbose=verbose)
100
+ self._mlf.models_["mean"].predictor = tabular_predictor
101
+ return save_path
102
+
103
+ @classmethod
104
+ def load(
105
+ cls, path: str, reset_paths: bool = True, load_oof: bool = False, verbose: bool = True
106
+ ) -> "AbstractTimeSeriesModel":
107
+ model = super().load(path=path, reset_paths=reset_paths, load_oof=load_oof, verbose=verbose)
108
+ assert "mean" in model._mlf.models_, "Loaded model doesn't have a trained TabularPredictor"
109
+ model._mlf.models_["mean"].predictor = TabularPredictor.load(model.tabular_predictor_path)
110
+ return model
89
111
 
90
112
  def preprocess(self, data: TimeSeriesDataFrame, is_train: bool = False, **kwargs) -> Any:
91
113
  if is_train:
@@ -252,10 +274,9 @@ class AbstractMLForecastModel(AbstractTimeSeriesModel):
252
274
  if static_features is not None:
253
275
  df = pd.merge(df, static_features, how="left", on=ITEMID, suffixes=(None, "_static_feat"))
254
276
 
255
- for col in self.metadata.known_covariates_real:
277
+ for col in self._non_boolean_real_covariates:
256
278
  # Normalize non-boolean features using mean_abs scaling
257
- if not df[col].isin([0, 1]).all():
258
- df[f"__scaled_{col}"] = df[col] / df[col].abs().groupby(df[ITEMID]).mean().reindex(df[ITEMID]).values
279
+ df[f"__scaled_{col}"] = df[col] / df[col].abs().groupby(df[ITEMID]).mean().reindex(df[ITEMID]).values
259
280
 
260
281
  # Convert float64 to float32 to reduce memory usage
261
282
  float64_cols = list(df.select_dtypes(include="float64"))
@@ -277,6 +298,9 @@ class AbstractMLForecastModel(AbstractTimeSeriesModel):
277
298
  self._check_fit_params()
278
299
  fit_start_time = time.time()
279
300
  self._train_target_median = train_data[self.target].median()
301
+ for col in self.metadata.known_covariates_real:
302
+ if not train_data[col].isin([0, 1]).all():
303
+ self._non_boolean_real_covariates.append(col)
280
304
  # TabularEstimator is passed to MLForecast later to include tuning_data
281
305
  model_params = self._get_model_params()
282
306
 
@@ -292,7 +316,7 @@ class AbstractMLForecastModel(AbstractTimeSeriesModel):
292
316
 
293
317
  estimator = TabularEstimator(
294
318
  predictor_init_kwargs={
295
- "path": os.path.join(self.path, "tabular_predictor"),
319
+ "path": self.tabular_predictor_path,
296
320
  "verbosity": verbosity - 2,
297
321
  "label": MLF_TARGET,
298
322
  **self._get_extra_tabular_init_kwargs(),
@@ -1,3 +1,3 @@
1
1
  """This is the autogluon version file."""
2
- __version__ = '1.1.1b20240507'
2
+ __version__ = '1.1.1b20240508'
3
3
  __lite__ = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autogluon.timeseries
3
- Version: 1.1.1b20240507
3
+ Version: 1.1.1b20240508
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
@@ -51,9 +51,9 @@ Requires-Dist: utilsforecast <0.0.11,>=0.0.10
51
51
  Requires-Dist: tqdm <5,>=4.38
52
52
  Requires-Dist: orjson ~=3.9
53
53
  Requires-Dist: tensorboard <3,>=2.9
54
- Requires-Dist: autogluon.core[raytune] ==1.1.1b20240507
55
- Requires-Dist: autogluon.common ==1.1.1b20240507
56
- Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost] ==1.1.1b20240507
54
+ Requires-Dist: autogluon.core[raytune] ==1.1.1b20240508
55
+ Requires-Dist: autogluon.common ==1.1.1b20240508
56
+ Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost] ==1.1.1b20240508
57
57
  Provides-Extra: all
58
58
  Requires-Dist: optimum[onnxruntime] <1.19,>=1.17 ; extra == 'all'
59
59
  Provides-Extra: chronos-onnx
@@ -1,10 +1,10 @@
1
- autogluon.timeseries-1.1.1b20240507-py3.8-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
1
+ autogluon.timeseries-1.1.1b20240508-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
4
  autogluon/timeseries/learner.py,sha256=IYXpJSDyTzjZXjKL_SrTujt5Uke83mSJFA0sMj25_sM,13828
5
5
  autogluon/timeseries/predictor.py,sha256=DL-0b7aK4SbfpF785kvbMNAqVycw0Dwmuft78cBE2XU,81915
6
6
  autogluon/timeseries/splitter.py,sha256=eghGwAAN2_cxGk5aJBILgjGWtLzjxJcytMy49gg_q18,3061
7
- autogluon/timeseries/version.py,sha256=WRGcsqLB0a3UGonVOYMeaWQNU3CxzjL1o2lhEpauZfQ,90
7
+ autogluon/timeseries/version.py,sha256=0E7o_4-zz1UwVaCJi9jBtgZl_8PUfXcGzL5Wh86TheM,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
@@ -20,7 +20,7 @@ autogluon/timeseries/models/abstract/__init__.py,sha256=wvDsQAZIV0N3AwBeMaGItoQ8
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
22
22
  autogluon/timeseries/models/autogluon_tabular/__init__.py,sha256=r9i6jWcyeLHYClkcMSKRVsfrkBUMxpDrTATNTBc_qgQ,136
23
- autogluon/timeseries/models/autogluon_tabular/mlforecast.py,sha256=4WbvCgfUCKbg7J5OJisSQK4LMiz8PtTnxU7nkGosmGY,31491
23
+ autogluon/timeseries/models/autogluon_tabular/mlforecast.py,sha256=qqg3AS9cetgrsTEQ9bopdDSzztoNovsZkqIgKAw1MHo,32682
24
24
  autogluon/timeseries/models/autogluon_tabular/utils.py,sha256=4-gTrBtizxeMVQlsuscugPqw9unaXWXhS1TVVssfzYY,2125
25
25
  autogluon/timeseries/models/chronos/__init__.py,sha256=wT77HzTtmQxW3sw2k0mA5Ot6PSHivX-Uvn5fjM05EU4,60
26
26
  autogluon/timeseries/models/chronos/model.py,sha256=0ZxOpGyx7MmXYDr9zeDt6-rIu50Bm7ssR9zTIvd6vmQ,14659
@@ -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.1b20240507.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
56
- autogluon.timeseries-1.1.1b20240507.dist-info/METADATA,sha256=h-I4JIZmlqwSosHZGZuNNc9tpqNN4WPFeJGyl0iEMD8,12488
57
- autogluon.timeseries-1.1.1b20240507.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
58
- autogluon.timeseries-1.1.1b20240507.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
59
- autogluon.timeseries-1.1.1b20240507.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
60
- autogluon.timeseries-1.1.1b20240507.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
61
- autogluon.timeseries-1.1.1b20240507.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
62
- autogluon.timeseries-1.1.1b20240507.dist-info/RECORD,,
55
+ autogluon.timeseries-1.1.1b20240508.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
56
+ autogluon.timeseries-1.1.1b20240508.dist-info/METADATA,sha256=Hvmzoq4ExCxRR0B9aXwzYOUT-Y3qUQ5RX_MsZqbSlVE,12488
57
+ autogluon.timeseries-1.1.1b20240508.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
58
+ autogluon.timeseries-1.1.1b20240508.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
59
+ autogluon.timeseries-1.1.1b20240508.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
60
+ autogluon.timeseries-1.1.1b20240508.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
61
+ autogluon.timeseries-1.1.1b20240508.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
62
+ autogluon.timeseries-1.1.1b20240508.dist-info/RECORD,,