autogluon.timeseries 0.7.0b20230302__py3-none-any.whl → 0.7.0b20230303__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.

@@ -8,6 +8,7 @@ from typing import Any, Optional, Tuple, Type
8
8
 
9
9
  import numpy as np
10
10
  import pandas as pd
11
+ from joblib.parallel import Parallel, delayed
11
12
  from pandas.core.internals import ArrayManager, BlockManager
12
13
 
13
14
  from autogluon.common.loaders import load_pd
@@ -258,24 +259,27 @@ class TimeSeriesDataFrame(pd.DataFrame):
258
259
  raise ValueError(f"all entries in index `{ITEMID}` must be of integer or string dtype")
259
260
 
260
261
  @classmethod
261
- def _construct_pandas_frame_from_iterable_dataset(cls, iterable_dataset: Iterable) -> pd.DataFrame:
262
- cls._validate_iterable(iterable_dataset)
263
-
264
- all_ts = []
265
- for i, ts in enumerate(iterable_dataset):
262
+ def _construct_pandas_frame_from_iterable_dataset(
263
+ cls, iterable_dataset: Iterable, num_cpus: int = -1
264
+ ) -> pd.DataFrame:
265
+ def load_single_item(item_id: int, ts: dict) -> pd.DataFrame:
266
266
  start_timestamp = ts["start"]
267
267
  freq = start_timestamp.freq
268
268
  if isinstance(start_timestamp, pd.Period):
269
269
  start_timestamp = start_timestamp.to_timestamp(how="S")
270
270
  target = ts["target"]
271
271
  datetime_index = tuple(pd.date_range(start_timestamp, periods=len(target), freq=freq))
272
- idx = pd.MultiIndex.from_product([(i,), datetime_index], names=[ITEMID, TIMESTAMP])
273
- ts_df = pd.Series(target, name="target", index=idx).to_frame()
274
- all_ts.append(ts_df)
272
+ idx = pd.MultiIndex.from_product([(item_id,), datetime_index], names=[ITEMID, TIMESTAMP])
273
+ return pd.Series(target, name="target", index=idx).to_frame()
274
+
275
+ cls._validate_iterable(iterable_dataset)
276
+ all_ts = Parallel(n_jobs=num_cpus)(
277
+ delayed(load_single_item)(item_id, ts) for item_id, ts in enumerate(iterable_dataset)
278
+ )
275
279
  return pd.concat(all_ts)
276
280
 
277
281
  @classmethod
278
- def from_iterable_dataset(cls, iterable_dataset: Iterable) -> pd.DataFrame:
282
+ def from_iterable_dataset(cls, iterable_dataset: Iterable, num_cpus: int = -1) -> pd.DataFrame:
279
283
  """Construct a ``TimeSeriesDataFrame`` from an Iterable of dictionaries each of which
280
284
  represent a single time series.
281
285
 
@@ -294,13 +298,15 @@ class TimeSeriesDataFrame(pd.DataFrame):
294
298
  {"target": [3, 4, 5], "start": pd.Timestamp("01-01-2019", freq='D')},
295
299
  {"target": [6, 7, 8], "start": pd.Timestamp("01-01-2019", freq='D')}
296
300
  ]
301
+ num_cpus : int, default = -1
302
+ Number of CPU cores used to process the iterable dataset in parallel. Set to -1 to use all cores.
297
303
 
298
304
  Returns
299
305
  -------
300
306
  ts_df: TimeSeriesDataFrame
301
307
  A data frame in TimeSeriesDataFrame format.
302
308
  """
303
- return cls(cls._construct_pandas_frame_from_iterable_dataset(iterable_dataset))
309
+ return cls(cls._construct_pandas_frame_from_iterable_dataset(iterable_dataset, num_cpus=num_cpus))
304
310
 
305
311
  @classmethod
306
312
  def _load_data_frame_from_file(cls, path: str) -> pd.DataFrame:
@@ -1,3 +1,3 @@
1
1
  """This is the autogluon version file."""
2
- __version__ = '0.7.0b20230302'
2
+ __version__ = '0.7.0b20230303'
3
3
  __lite__ = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autogluon.timeseries
3
- Version: 0.7.0b20230302
3
+ Version: 0.7.0b20230303
4
4
  Summary: AutoML for Image, Text, and Tabular Data
5
5
  Home-page: https://github.com/autogluon/autogluon
6
6
  Author: AutoGluon Community
@@ -45,12 +45,12 @@ Requires-Dist: networkx (<3.0,>=2.3)
45
45
  Requires-Dist: statsforecast (<1.5,>=1.4.0)
46
46
  Requires-Dist: tqdm (<5,>=4.38)
47
47
  Requires-Dist: ujson (<6,>=5)
48
- Requires-Dist: autogluon.core[raytune] (==0.7.0b20230302)
49
- Requires-Dist: autogluon.common (==0.7.0b20230302)
50
- Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost] (==0.7.0b20230302)
48
+ Requires-Dist: autogluon.core[raytune] (==0.7.0b20230303)
49
+ Requires-Dist: autogluon.common (==0.7.0b20230303)
50
+ Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost] (==0.7.0b20230303)
51
51
  Provides-Extra: all
52
- Requires-Dist: tbats (<2,>=1.1) ; extra == 'all'
53
52
  Requires-Dist: sktime (<0.16,>=0.14) ; extra == 'all'
53
+ Requires-Dist: tbats (<2,>=1.1) ; extra == 'all'
54
54
  Requires-Dist: pmdarima (<1.9,>=1.8.2) ; extra == 'all'
55
55
  Provides-Extra: sktime
56
56
  Requires-Dist: sktime (<0.16,>=0.14) ; extra == 'sktime'
@@ -1,14 +1,14 @@
1
- autogluon.timeseries-0.7.0b20230302-py3.8-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
1
+ autogluon.timeseries-0.7.0b20230303-py3.8-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
2
2
  autogluon/timeseries/__init__.py,sha256=Gj3vH2ndDbIz30cC_MoP60TEdrkPUjoHqzTGG9k1lhk,1298
3
3
  autogluon/timeseries/evaluator.py,sha256=Xsr01q1viDE-n_UUiYcVblyZX0I8hvMkOgNu4mu-f_c,10641
4
4
  autogluon/timeseries/learner.py,sha256=P_msIgQaskfuUwuPaUOGwr9VE-IJrJHetdM9irs6U7k,10468
5
5
  autogluon/timeseries/predictor.py,sha256=Jg2Zhg1nLjYGqG741TXTKYk7IVNY4I2QgzRC25Y7g8M,40636
6
6
  autogluon/timeseries/splitter.py,sha256=s5S3CeJxcUfZrl7PSXjzubE06bgB8J8uUT8EywSwtYQ,9252
7
- autogluon/timeseries/version.py,sha256=KZ2gLHJghvdHAOjDzignbwQX3lXY_65WRLeGyUdaAW4,90
7
+ autogluon/timeseries/version.py,sha256=tGDT681gW3NtzFXd-CGS1stLwVKrIlCt0Efc83z3iDQ,90
8
8
  autogluon/timeseries/configs/__init__.py,sha256=BTtHIPCYeGjqgOcvqb8qPD4VNX-ICKOg6wnkew1cPOE,98
9
9
  autogluon/timeseries/configs/presets_configs.py,sha256=chnf3EvCeMP1zUg6aYkz499zrOiMlLul4ETJnNVOslA,799
10
10
  autogluon/timeseries/dataset/__init__.py,sha256=UvnhAN5tjgxXTHoZMQDy64YMDj4Xxa68yY7NP4vAw0o,81
11
- autogluon/timeseries/dataset/ts_dataframe.py,sha256=rVIyoyGT86R3lehjV3rZmejyz8VGMfBt9c6judeYBw8,33264
11
+ autogluon/timeseries/dataset/ts_dataframe.py,sha256=07dmHBpttBF0Mih-AgKXWbQDguVlr4Qpl2AIxBrgUfM,33654
12
12
  autogluon/timeseries/models/__init__.py,sha256=LFMK5eYZD2t2lvSFX352wUTHxdDi6YLDMAltnjsG2VQ,624
13
13
  autogluon/timeseries/models/presets.py,sha256=Gb-FHhJVGPPLHd74bmsmQo2wbFVwtU1oWcTV6IC0eQ0,9475
14
14
  autogluon/timeseries/models/abstract/__init__.py,sha256=DyBTMHj4b4D35aiR83FcCR0_MvPHdqgpmEbdiPoVwcw,168
@@ -44,11 +44,11 @@ autogluon/timeseries/utils/hashing.py,sha256=tcjTgJ0vA4WV2-WnvF8iW7la5duwCpSUKk3
44
44
  autogluon/timeseries/utils/random.py,sha256=W300Co4eG4txIsnj8pdFFia7DhyVJ5oXWKOEjnGDuVA,344
45
45
  autogluon/timeseries/utils/seasonality.py,sha256=p9mtahWOtDhHUjeGECUJA0VAKeLkZGZbj070dEqMTJQ,652
46
46
  autogluon/timeseries/utils/warning_filters.py,sha256=09a3JgFoVG-bfY92bvr80WfSdLI7CxG1jI546WKPUnw,2330
47
- autogluon.timeseries-0.7.0b20230302.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
48
- autogluon.timeseries-0.7.0b20230302.dist-info/METADATA,sha256=v8Utomx9yAvIupsWmNrG8tmM9weMYM5K8yx6Wim4omg,12699
49
- autogluon.timeseries-0.7.0b20230302.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
50
- autogluon.timeseries-0.7.0b20230302.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
51
- autogluon.timeseries-0.7.0b20230302.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
52
- autogluon.timeseries-0.7.0b20230302.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
53
- autogluon.timeseries-0.7.0b20230302.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
54
- autogluon.timeseries-0.7.0b20230302.dist-info/RECORD,,
47
+ autogluon.timeseries-0.7.0b20230303.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
48
+ autogluon.timeseries-0.7.0b20230303.dist-info/METADATA,sha256=r5GuMPbZ0qCMgrYsy4ef8gih3wYWJT5ZHQoy6neGOEk,12699
49
+ autogluon.timeseries-0.7.0b20230303.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
50
+ autogluon.timeseries-0.7.0b20230303.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
51
+ autogluon.timeseries-0.7.0b20230303.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
52
+ autogluon.timeseries-0.7.0b20230303.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
53
+ autogluon.timeseries-0.7.0b20230303.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
54
+ autogluon.timeseries-0.7.0b20230303.dist-info/RECORD,,