autogluon.timeseries 1.1.2b20240818__py3-none-any.whl → 1.1.2b20240820__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.
@@ -365,7 +365,7 @@ class AbstractMLForecastModel(AbstractTimeSeriesModel):
365
365
  Seasonal naive forecast for short series, if there are any in the dataset.
366
366
  """
367
367
  ts_lengths = data.num_timesteps_per_item()
368
- short_series = ts_lengths.index[ts_lengths <= self._sum_of_differences + 1]
368
+ short_series = ts_lengths.index[ts_lengths <= self._sum_of_differences]
369
369
  if len(short_series) > 0:
370
370
  logger.warning(
371
371
  f"Warning: {len(short_series)} time series ({len(short_series) / len(ts_lengths):.1%}) are shorter "
@@ -222,18 +222,22 @@ def seasonal_naive_forecast(
222
222
  ) -> pd.DataFrame:
223
223
  """Generate seasonal naive forecast, predicting the last observed value from the same period."""
224
224
 
225
- def numpy_ffill(arr: np.ndarray) -> np.ndarray:
226
- """Fast implementation of forward fill in numpy."""
225
+ def numpy_fillna(arr: np.ndarray) -> np.ndarray:
226
+ """Fast implementation of forward fill + avg fill in numpy."""
227
+ # First apply forward fill
227
228
  idx = np.arange(len(arr))
228
229
  mask = np.isnan(arr)
229
230
  idx[mask] = 0
230
- return arr[np.maximum.accumulate(idx)]
231
+ arr_filled = arr[np.maximum.accumulate(idx)]
232
+ # Leading NaNs are filled with the mean
233
+ arr_filled[np.isnan(arr_filled)] = np.nanmean(arr_filled)
234
+ return arr_filled
231
235
 
232
236
  forecast = {}
233
237
  # At least seasonal_period + 2 values are required to compute sigma for seasonal naive
234
238
  if len(target) > seasonal_period + 1 and seasonal_period > 1:
235
239
  if np.isnan(target[-(seasonal_period + 2) :]).any():
236
- target = numpy_ffill(target)
240
+ target = numpy_fillna(target)
237
241
 
238
242
  indices = [len(target) - seasonal_period + k % seasonal_period for k in range(prediction_length)]
239
243
  forecast["mean"] = target[indices]
@@ -1098,6 +1098,10 @@ class TimeSeriesPredictor(TimeSeriesPredictorDeprecatedMixin):
1098
1098
  raise ValueError("`path` cannot be None or empty in load().")
1099
1099
  path: str = setup_outputdir(path, warn_if_exist=False)
1100
1100
 
1101
+ predictor_path = Path(path) / cls.predictor_file_name
1102
+ if not predictor_path.exists():
1103
+ raise FileNotFoundError(f"No such file '{predictor_path}'")
1104
+
1101
1105
  try:
1102
1106
  version_saved = cls._load_version_file(path=path)
1103
1107
  except:
@@ -1116,7 +1120,7 @@ class TimeSeriesPredictor(TimeSeriesPredictorDeprecatedMixin):
1116
1120
 
1117
1121
  logger.info(f"Loading predictor from path {path}")
1118
1122
  learner = AbstractLearner.load(path)
1119
- predictor = load_pkl.load(path=os.path.join(learner.path, cls.predictor_file_name))
1123
+ predictor = load_pkl.load(path=str(predictor_path))
1120
1124
  predictor._learner = learner
1121
1125
  predictor.path = learner.path
1122
1126
  return predictor
@@ -1,3 +1,3 @@
1
1
  """This is the autogluon version file."""
2
- __version__ = '1.1.2b20240818'
2
+ __version__ = '1.1.2b20240820'
3
3
  __lite__ = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autogluon.timeseries
3
- Version: 1.1.2b20240818
3
+ Version: 1.1.2b20240820
4
4
  Summary: Fast and Accurate ML in 3 Lines of Code
5
5
  Home-page: https://github.com/autogluon/autogluon
6
6
  Author: AutoGluon Community
@@ -52,9 +52,9 @@ Requires-Dist: fugue>=0.9.0
52
52
  Requires-Dist: tqdm<5,>=4.38
53
53
  Requires-Dist: orjson~=3.9
54
54
  Requires-Dist: tensorboard<3,>=2.9
55
- Requires-Dist: autogluon.core[raytune]==1.1.2b20240818
56
- Requires-Dist: autogluon.common==1.1.2b20240818
57
- Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost]==1.1.2b20240818
55
+ Requires-Dist: autogluon.core[raytune]==1.1.2b20240820
56
+ Requires-Dist: autogluon.common==1.1.2b20240820
57
+ Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost]==1.1.2b20240820
58
58
  Provides-Extra: all
59
59
  Requires-Dist: optimum[onnxruntime]<1.19,>=1.17; extra == "all"
60
60
  Provides-Extra: chronos-onnx
@@ -1,10 +1,10 @@
1
- autogluon.timeseries-1.1.2b20240818-py3.8-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
1
+ autogluon.timeseries-1.1.2b20240820-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
- autogluon/timeseries/predictor.py,sha256=th-UrZx2-4tJ3dnw_XUBwBW_obrfa_YC4VtY9bRfv8A,83073
5
+ autogluon/timeseries/predictor.py,sha256=IaooHyVzNTjYn6uVEVKvqecIdMTH9oEa4f3YMJbHdXM,83216
6
6
  autogluon/timeseries/splitter.py,sha256=eghGwAAN2_cxGk5aJBILgjGWtLzjxJcytMy49gg_q18,3061
7
- autogluon/timeseries/version.py,sha256=CB6QRJsxsBnkpJGuflDdQ2klk5JoIkbWUXj7Vk6J5Qk,90
7
+ autogluon/timeseries/version.py,sha256=6uGWU7Ekhlz8f0HczuOvxX_zFi6HIXNWWyEJ1CbNr-c,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=uqvKBAKiMwTEPl-cmRIohB3XkDKvsc_XjDPtWUSu0L0,32819
23
+ autogluon/timeseries/models/autogluon_tabular/mlforecast.py,sha256=Px5_VuQx8f74CpQYuClijtyK-yJLkNW7fSjCZrmJZ0s,32815
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=vnKzRExX-2CAv9yD0HeeLRF4oY9HnZwrRIAEfLbAMtg,14703
@@ -34,7 +34,7 @@ autogluon/timeseries/models/gluonts/abstract_gluonts.py,sha256=X4KChuSVSoxLOcrto
34
34
  autogluon/timeseries/models/gluonts/torch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  autogluon/timeseries/models/gluonts/torch/models.py,sha256=5fp2yEyTvMVDm-jQEUYB4ugLkVDcd364NBUjmePltO8,24058
36
36
  autogluon/timeseries/models/local/__init__.py,sha256=JyckWWgMG1BTIWJqFTW6e1O-eb0LPPOwtXwmb1ErohQ,756
37
- autogluon/timeseries/models/local/abstract_local_model.py,sha256=JfjDXOSBgD_10JrIq5nWS038-4moRNI0001BLta8nRs,11723
37
+ autogluon/timeseries/models/local/abstract_local_model.py,sha256=Ge4X4FgyYHsFU5h9q7mSVlEXKKJtyGqckjPJ4PXx3A0,11917
38
38
  autogluon/timeseries/models/local/naive.py,sha256=iwRcFMFmJKPWPbD9TWaIUS51oav69F_VAp6-jb_5SUE,7249
39
39
  autogluon/timeseries/models/local/npts.py,sha256=Bp74doKnfpGE8ywP4FWOCI_RwRMsmgocYDfGtq764DA,4143
40
40
  autogluon/timeseries/models/local/statsforecast.py,sha256=79swW7g7bn1CmuGY79i7r0uj0QZr6WLIfH_x3p1FTDA,32742
@@ -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.2b20240818.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
56
- autogluon.timeseries-1.1.2b20240818.dist-info/METADATA,sha256=quTssyYiDM8H0EnJgCnVsVUxgEa3ZF1jmi67Ixr5kbo,12460
57
- autogluon.timeseries-1.1.2b20240818.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
58
- autogluon.timeseries-1.1.2b20240818.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
59
- autogluon.timeseries-1.1.2b20240818.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
60
- autogluon.timeseries-1.1.2b20240818.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
61
- autogluon.timeseries-1.1.2b20240818.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
62
- autogluon.timeseries-1.1.2b20240818.dist-info/RECORD,,
55
+ autogluon.timeseries-1.1.2b20240820.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
56
+ autogluon.timeseries-1.1.2b20240820.dist-info/METADATA,sha256=rLu6rDkur8guSIqTm851-t2gpon-tgYK_6hDPkMBdV0,12460
57
+ autogluon.timeseries-1.1.2b20240820.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
58
+ autogluon.timeseries-1.1.2b20240820.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
59
+ autogluon.timeseries-1.1.2b20240820.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
60
+ autogluon.timeseries-1.1.2b20240820.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
61
+ autogluon.timeseries-1.1.2b20240820.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
62
+ autogluon.timeseries-1.1.2b20240820.dist-info/RECORD,,