From 564218776afa53d637a4f979090916c3c4e4a54c Mon Sep 17 00:00:00 2001 From: Abdul Fatir Date: Wed, 3 Dec 2025 17:32:14 +0100 Subject: [PATCH] Chronos-2: Ensure updated chronos_config is saved after fine-tuning (#420) *Issue #, if available:* *Description of changes:* Previously, only the returned pipeline had correct configuration but it was not being saved to disk. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --- src/chronos/chronos2/pipeline.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/chronos/chronos2/pipeline.py b/src/chronos/chronos2/pipeline.py index 8c10e16..7641e92 100644 --- a/src/chronos/chronos2/pipeline.py +++ b/src/chronos/chronos2/pipeline.py @@ -336,6 +336,8 @@ class Chronos2Pipeline(BaseChronosPipeline): model.chronos_config.max_output_patches = max( model.chronos_config.max_output_patches, math.ceil(prediction_length / self.model_output_patch_size) ) + # update chronos_config in model's config, so it is saved correctly + model.config.chronos_config = model.chronos_config.__dict__ # Create a new pipeline with the fine-tuned model finetuned_pipeline = Chronos2Pipeline(model=model)