autogluon.timeseries 1.4.1b20250901__py3-none-any.whl → 1.4.1b20250914__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.
@@ -482,9 +482,12 @@ class ChronosModel(AbstractTimeSeriesModel):
482
482
 
483
483
  if self.prediction_length != fine_tune_prediction_length:
484
484
  logger.debug(
485
- f"\tChronosBolt models can only be fine-tuned with a maximum prediction_length of {model_prediction_length}. "
485
+ f"\tChronos-Bolt models can only be fine-tuned with a maximum prediction_length of {model_prediction_length}. "
486
486
  f"Fine-tuning prediction_length has been changed to {fine_tune_prediction_length}."
487
487
  )
488
+ if self.quantile_levels != self.model_pipeline.quantiles:
489
+ self.model_pipeline.model.update_output_quantiles(self.quantile_levels)
490
+ logger.info(f"\tChronos-Bolt will be fine-tuned with quantile_levels={self.quantile_levels}")
488
491
  else:
489
492
  raise ValueError(f"Unsupported model pipeline: {type(self.model_pipeline)}")
490
493
 
@@ -371,6 +371,56 @@ class ChronosBoltModelForForecasting(T5PreTrainedModel):
371
371
 
372
372
  return decoder_outputs.last_hidden_state # sequence_outputs, b x 1 x d_model
373
373
 
374
+ def update_output_quantiles(self, new_quantiles: list[float]) -> None:
375
+ """In-place updates model's output layer to support only the specified new quantiles by copying weights from closest existing quantiles."""
376
+ old_quantiles = self.chronos_config.quantiles
377
+ new_quantiles = sorted(new_quantiles)
378
+
379
+ if new_quantiles == old_quantiles:
380
+ return
381
+
382
+ self.chronos_config.quantiles = new_quantiles
383
+ self.num_quantiles = len(new_quantiles)
384
+ self.register_buffer("quantiles", torch.tensor(new_quantiles, dtype=self.dtype), persistent=False)
385
+
386
+ old_output_layer = self.output_patch_embedding
387
+ new_output_layer = ResidualBlock(
388
+ in_dim=self.config.d_model,
389
+ h_dim=self.config.d_ff,
390
+ out_dim=len(new_quantiles) * self.chronos_config.prediction_length,
391
+ act_fn_name=self.config.dense_act_fn,
392
+ dropout_p=self.config.dropout_rate,
393
+ )
394
+
395
+ # hidden_layer is shared across all quantiles
396
+ new_output_layer.hidden_layer.weight.data.copy_(old_output_layer.hidden_layer.weight.data)
397
+ if old_output_layer.hidden_layer.bias is not None:
398
+ new_output_layer.hidden_layer.bias.data.copy_(old_output_layer.hidden_layer.bias.data)
399
+
400
+ def copy_quantile_weights(src_idx: int, dst_idx: int):
401
+ """Copy weights for one quantile from src_idx to dst_idx"""
402
+ prediction_length = self.chronos_config.prediction_length
403
+ src_start, src_end = src_idx * prediction_length, (src_idx + 1) * prediction_length
404
+ dst_start, dst_end = dst_idx * prediction_length, (dst_idx + 1) * prediction_length
405
+
406
+ for layer_name in ["output_layer", "residual_layer"]:
407
+ old_layer_attr = getattr(old_output_layer, layer_name)
408
+ new_layer_attr = getattr(new_output_layer, layer_name)
409
+
410
+ new_layer_attr.weight[dst_start:dst_end] = old_layer_attr.weight[src_start:src_end]
411
+ if old_layer_attr.bias is not None:
412
+ new_layer_attr.bias[dst_start:dst_end] = old_layer_attr.bias[src_start:src_end]
413
+
414
+ with torch.no_grad():
415
+ for new_idx, new_q in enumerate(new_quantiles):
416
+ closest_q = min(old_quantiles, key=lambda x: abs(x - new_q))
417
+ closest_idx = old_quantiles.index(closest_q)
418
+ copy_quantile_weights(closest_idx, new_idx)
419
+
420
+ self.output_patch_embedding = new_output_layer
421
+ self.config.chronos_config["quantiles"] = new_quantiles
422
+ self.chronos_config.quantiles = new_quantiles
423
+
374
424
 
375
425
  class ChronosBoltPipeline(BaseChronosPipeline):
376
426
  forecast_type: ForecastType = ForecastType.QUANTILES
@@ -1,4 +1,4 @@
1
1
  """This is the autogluon version file."""
2
2
 
3
- __version__ = "1.4.1b20250901"
3
+ __version__ = "1.4.1b20250914"
4
4
  __lite__ = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autogluon.timeseries
3
- Version: 1.4.1b20250901
3
+ Version: 1.4.1b20250914
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
@@ -55,10 +55,10 @@ Requires-Dist: fugue>=0.9.0
55
55
  Requires-Dist: tqdm<5,>=4.38
56
56
  Requires-Dist: orjson~=3.9
57
57
  Requires-Dist: tensorboard<3,>=2.9
58
- Requires-Dist: autogluon.core[raytune]==1.4.1b20250901
59
- Requires-Dist: autogluon.common==1.4.1b20250901
60
- Requires-Dist: autogluon.features==1.4.1b20250901
61
- Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost]==1.4.1b20250901
58
+ Requires-Dist: autogluon.core[raytune]==1.4.1b20250914
59
+ Requires-Dist: autogluon.common==1.4.1b20250914
60
+ Requires-Dist: autogluon.features==1.4.1b20250914
61
+ Requires-Dist: autogluon.tabular[catboost,lightgbm,xgboost]==1.4.1b20250914
62
62
  Provides-Extra: all
63
63
  Provides-Extra: tests
64
64
  Requires-Dist: pytest; extra == "tests"
@@ -1,11 +1,11 @@
1
- autogluon.timeseries-1.4.1b20250901-py3.9-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
1
+ autogluon.timeseries-1.4.1b20250914-py3.9-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=eQrqFVOmL-2JC85LgCMkbyoLpKS02Dilg1T8RUeS_LI,13887
5
5
  autogluon/timeseries/predictor.py,sha256=7X4YsWYa3Xk2RI1Irf2O-c3-I82Zqhg-cgj8cj_4AoA,88427
6
6
  autogluon/timeseries/regressor.py,sha256=lc8Qr3-8v4oxajtCnV3sxpUaW6vxXXJOA6Kr-qVne4k,11926
7
7
  autogluon/timeseries/splitter.py,sha256=8ACkuCXeUhQGUx4jz_Vv17q814WrHJQeKvq2v4-oE6s,3158
8
- autogluon/timeseries/version.py,sha256=DurfNRu1wHc-WOAmHcK0c7FQyI6vSMxFUlL1CmSv3fg,91
8
+ autogluon/timeseries/version.py,sha256=8GEreNWVnf-7rz2Wg5SVu6X9RDkcDAIUbsld3AMrNtI,91
9
9
  autogluon/timeseries/configs/__init__.py,sha256=wiLBwxZkDTQBJkSJ9-xz3p_yJxX0dbHe108dS1P5O6A,183
10
10
  autogluon/timeseries/configs/hyperparameter_presets.py,sha256=GbI2sd3uakWtaeaMyF7B5z_lmyfb6ToK6PZEUZTyG9w,2031
11
11
  autogluon/timeseries/configs/predictor_presets.py,sha256=B5HFHIelh91hhG0YYE5SJ7_14P7sylFAABgHX8n_53M,2712
@@ -28,11 +28,11 @@ autogluon/timeseries/models/autogluon_tabular/per_step.py,sha256=M5rhj_jjcQz27wP
28
28
  autogluon/timeseries/models/autogluon_tabular/transforms.py,sha256=aI1QJLJaOB5Xy2WA0jo6Jh25MRVyyZ8ONrqlV96kpw0,2735
29
29
  autogluon/timeseries/models/autogluon_tabular/utils.py,sha256=Fn3Vu_Q0PCtEUbtNgLp1xIblg7dOdpFlF3W5kLHgruI,63
30
30
  autogluon/timeseries/models/chronos/__init__.py,sha256=wT77HzTtmQxW3sw2k0mA5Ot6PSHivX-Uvn5fjM05EU4,60
31
- autogluon/timeseries/models/chronos/model.py,sha256=UYLI1HVwsW5KfA-jXqJdBel-7N6l6ggdBVrjLLaq9P0,32333
31
+ autogluon/timeseries/models/chronos/model.py,sha256=-z6Y5Fyo5_X-U8BCeSZBhqQqaJaGBCNIAYDd5y6WaMQ,32614
32
32
  autogluon/timeseries/models/chronos/pipeline/__init__.py,sha256=bkTR0LSKIxAaKFOr9A0HSkCtnRdikDPUPp810WOKgxE,247
33
33
  autogluon/timeseries/models/chronos/pipeline/base.py,sha256=Us-TUpHSN3mM3ut05IVc2a9Q6KYq1n9pTb7JZG7b6kA,5546
34
34
  autogluon/timeseries/models/chronos/pipeline/chronos.py,sha256=bgow5FkHG7y5qWBXcggqXemnistJUfrl0lWFXcGXg5g,20197
35
- autogluon/timeseries/models/chronos/pipeline/chronos_bolt.py,sha256=KJYgxASTW2VhS0ObkP5DUQXyfnTRTXzjRD5Gm-FQFI4,21355
35
+ autogluon/timeseries/models/chronos/pipeline/chronos_bolt.py,sha256=5zM8G6K9id7qrWhRT37z_xoPVE-BJXwms1SwjF0TBG4,23949
36
36
  autogluon/timeseries/models/chronos/pipeline/utils.py,sha256=WYeCKFP5dxs4u09XTncBI2486VV22O1DiM9a3ZvZ1OE,12790
37
37
  autogluon/timeseries/models/ensemble/__init__.py,sha256=x2Y6dWk15XugTEWNUKq8U5z6nIjelo3UjpI-TfS13OE,159
38
38
  autogluon/timeseries/models/ensemble/abstract.py,sha256=wvtXNZTwiYpIurPkOYSzsi3XTRRx5guJLMYLmXTdOeQ,5695
@@ -65,11 +65,11 @@ autogluon/timeseries/utils/datetime/base.py,sha256=3NdsH3NDq4cVAOSoy3XpaNixyNlbj
65
65
  autogluon/timeseries/utils/datetime/lags.py,sha256=rjJtdBU0M41R1jwfmvCbo045s-6XBjhGVnGBQJ9-U1E,5997
66
66
  autogluon/timeseries/utils/datetime/seasonality.py,sha256=YK_2k8hvYIMW-sJPnjGWRtCnvIOthwA2hATB3nwVoD4,834
67
67
  autogluon/timeseries/utils/datetime/time_features.py,sha256=kEOFls4Nzh8nO0Pcz1DwLsC_NA3hMI4JUlZI3kuvuts,2666
68
- autogluon.timeseries-1.4.1b20250901.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
69
- autogluon.timeseries-1.4.1b20250901.dist-info/METADATA,sha256=DrZmr9IiJJZqKwPv4SG8EjkopWhqpHUUGweKVIkZDjQ,12463
70
- autogluon.timeseries-1.4.1b20250901.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
71
- autogluon.timeseries-1.4.1b20250901.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
72
- autogluon.timeseries-1.4.1b20250901.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
73
- autogluon.timeseries-1.4.1b20250901.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
74
- autogluon.timeseries-1.4.1b20250901.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
75
- autogluon.timeseries-1.4.1b20250901.dist-info/RECORD,,
68
+ autogluon.timeseries-1.4.1b20250914.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
69
+ autogluon.timeseries-1.4.1b20250914.dist-info/METADATA,sha256=m31U3KWc93EME8Ng1Vc205wBVRXj5gtNMx2zi7Lu8_Q,12463
70
+ autogluon.timeseries-1.4.1b20250914.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
71
+ autogluon.timeseries-1.4.1b20250914.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
72
+ autogluon.timeseries-1.4.1b20250914.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
73
+ autogluon.timeseries-1.4.1b20250914.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
74
+ autogluon.timeseries-1.4.1b20250914.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
75
+ autogluon.timeseries-1.4.1b20250914.dist-info/RECORD,,