tirex-mirror 2025.6.9.dev3__py3-none-any.whl → 2025.8.28__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.
@@ -8,20 +8,6 @@ import torch
8
8
 
9
9
  from .standard_adapter import ContextType, get_batches
10
10
 
11
- try:
12
- from .gluon import format_gluonts_output, get_gluon_batches
13
-
14
- _GLUONTS_AVAILABLE = True
15
- except ImportError:
16
- _GLUONTS_AVAILABLE = False
17
-
18
- try:
19
- from .hf_data import get_hfdata_batches
20
-
21
- _HF_DATASETS_AVAILABLE = True
22
- except ImportError:
23
- _HF_DATASETS_AVAILABLE = False
24
-
25
11
 
26
12
  DEF_TARGET_COLUMN = "target"
27
13
  DEF_META_COLUMNS = ("start", "item_id")
@@ -39,7 +25,9 @@ def _format_output(
39
25
  elif output_type == "numpy":
40
26
  return quantiles.cpu().numpy(), means.cpu().numpy()
41
27
  elif output_type == "gluonts":
42
- if not _GLUONTS_AVAILABLE:
28
+ try:
29
+ from .gluon import format_gluonts_output
30
+ except ImportError:
43
31
  raise ValueError("output_type glutonts needs GluonTs but GluonTS is not available (not installed)!")
44
32
  return format_gluonts_output(quantiles, means, sample_meta, quantile_levels)
45
33
  else:
@@ -171,8 +159,11 @@ class ForecastModel(ABC):
171
159
  autogluon data processing function.
172
160
  """
173
161
  assert batch_size >= 1, "Batch size must be >= 1"
174
- if not _GLUONTS_AVAILABLE:
162
+ try:
163
+ from .gluon import get_gluon_batches
164
+ except ImportError:
175
165
  raise ValueError("forecast_gluon glutonts needs GluonTs but GluonTS is not available (not installed)!")
166
+
176
167
  batches = get_gluon_batches(gluonDataset, batch_size, **data_kwargs)
177
168
  return _gen_forecast(
178
169
  self._forecast_quantiles, batches, output_type, quantile_levels, yield_per_batch, **predict_kwargs
@@ -199,10 +190,13 @@ class ForecastModel(ABC):
199
190
  datasets data processing function.
200
191
  """
201
192
  assert batch_size >= 1, "Batch size must be >= 1"
202
- if not _HF_DATASETS_AVAILABLE:
193
+ try:
194
+ from .hf_data import get_hfdata_batches
195
+ except ImportError:
203
196
  raise ValueError(
204
197
  "forecast_hfdata glutonts needs HuggingFace datasets but datasets is not available (not installed)!"
205
198
  )
199
+
206
200
  batches = get_hfdata_batches(hf_dataset, batch_size, **data_kwargs)
207
201
  return _gen_forecast(
208
202
  self._forecast_quantiles, batches, output_type, quantile_levels, yield_per_batch, **predict_kwargs
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tirex-mirror
3
- Version: 2025.6.9.dev3
3
+ Version: 2025.8.28
4
4
  Summary: Unofficial mirror of NX-AI/tirex for packaging
5
5
  Author-email: Arpad Rozsas <rozsasarpi@gmail.com>
6
6
  License: NXAI COMMUNITY LICENSE AGREEMENT
@@ -80,10 +80,13 @@ Provides-Extra: gluonts
80
80
  Requires-Dist: gluonts; extra == "gluonts"
81
81
  Provides-Extra: hfdataset
82
82
  Requires-Dist: datasets; extra == "hfdataset"
83
+ Provides-Extra: test
84
+ Requires-Dist: fev; extra == "test"
83
85
  Provides-Extra: all
84
86
  Requires-Dist: ipykernel; extra == "all"
85
87
  Requires-Dist: gluonts; extra == "all"
86
88
  Requires-Dist: datasets; extra == "all"
89
+ Requires-Dist: fev; extra == "all"
87
90
  Dynamic: license-file
88
91
 
89
92
  # tirex-mirror
@@ -1,7 +1,7 @@
1
1
  tirex/__init__.py,sha256=rfsOeCJ7eRqU3K3TOhfN5-4XUuZFqt11wBRxk5SoAWA,292
2
2
  tirex/base.py,sha256=F18v9tTbLH0-nX-PC6kBAkYQHkS1T_7OQD6_aN6EjMw,2623
3
3
  tirex/api_adapter/__init__.py,sha256=YnTtPf5jGqvhfqoX8Ku7Yd0xohy0MmocE2ryrXVnQ1Q,135
4
- tirex/api_adapter/forecast.py,sha256=JyKw_d5v7nJbNzcckqx3Khm4TXdlkOY6ZmXaknSTWgQ,8625
4
+ tirex/api_adapter/forecast.py,sha256=iOVP_L7fYlp1ZjyrQe2b8fwuEcxTYOszfZ5f9VDqKHU,8503
5
5
  tirex/api_adapter/gluon.py,sha256=faiYyn0kBBVQKbpWqrVoyylxZUrmr-qce66twpguVds,1827
6
6
  tirex/api_adapter/hf_data.py,sha256=T1eaxqC3OO9yOzIvw4sr55x6iA2AHKJTZd36rROM4fQ,1377
7
7
  tirex/api_adapter/standard_adapter.py,sha256=bI3XGYlWQu5EDyhDZyYqOJMbwi5h1aovPQvfHuWETJk,2618
@@ -10,10 +10,10 @@ tirex/models/components.py,sha256=sluhMbV6KL3W1ESoC5Nyoxdge9WSNx98alc8NG85dv0,49
10
10
  tirex/models/mixed_stack.py,sha256=ffpdhwCrPAbpp4_s1q8Z0Ei7iZ2TsqzVzOPe3BQPW9w,4790
11
11
  tirex/models/predict_utils.py,sha256=QUMZZ4_Sxa09UaHs1DG-MbfP8j_XwYt0x1zemdSEcFI,2749
12
12
  tirex/models/tirex.py,sha256=bFxtcpQB9-Hnayy_4bqif-o75DwO3-W0wJxelS8F_6c,9243
13
- tirex_mirror-2025.6.9.dev3.dist-info/licenses/LICENSE,sha256=HlwHKnGTlE2oNm6734V-Vy62zlkWohnuZpYXSdkqDk4,7362
14
- tirex_mirror-2025.6.9.dev3.dist-info/licenses/LICENSE_MIRROR.txt,sha256=ulPZMcOZdN7JvISjiID3KUwovTjrPwiMv5ku9dM7nls,496
15
- tirex_mirror-2025.6.9.dev3.dist-info/licenses/NOTICE.txt,sha256=rcgDscFHb-uuZO3L0_vIxYhTYl-a2Rm0lBpp3_kKdFQ,147
16
- tirex_mirror-2025.6.9.dev3.dist-info/METADATA,sha256=dxO9C6tCyFHqdNwbDb3eYbPS58fOSF7pX5MRM2F-Lx8,10941
17
- tirex_mirror-2025.6.9.dev3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
18
- tirex_mirror-2025.6.9.dev3.dist-info/top_level.txt,sha256=AOLDhfv0F_7nn3pFq0Kapg6Ky_28I_cGDXzQX3w9eO4,6
19
- tirex_mirror-2025.6.9.dev3.dist-info/RECORD,,
13
+ tirex_mirror-2025.8.28.dist-info/licenses/LICENSE,sha256=HlwHKnGTlE2oNm6734V-Vy62zlkWohnuZpYXSdkqDk4,7362
14
+ tirex_mirror-2025.8.28.dist-info/licenses/LICENSE_MIRROR.txt,sha256=ulPZMcOZdN7JvISjiID3KUwovTjrPwiMv5ku9dM7nls,496
15
+ tirex_mirror-2025.8.28.dist-info/licenses/NOTICE.txt,sha256=rcgDscFHb-uuZO3L0_vIxYhTYl-a2Rm0lBpp3_kKdFQ,147
16
+ tirex_mirror-2025.8.28.dist-info/METADATA,sha256=c9lhDLJfwEsYyxjEJ732XMn1FgCowXZ5yIyWK2NBy8o,11029
17
+ tirex_mirror-2025.8.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
18
+ tirex_mirror-2025.8.28.dist-info/top_level.txt,sha256=AOLDhfv0F_7nn3pFq0Kapg6Ky_28I_cGDXzQX3w9eO4,6
19
+ tirex_mirror-2025.8.28.dist-info/RECORD,,