From 3d08338f3711d01a038bbbe173ccfe9b5263ba79 Mon Sep 17 00:00:00 2001 From: Abdul Fatir Date: Mon, 20 Oct 2025 11:41:58 +0200 Subject: [PATCH] Remove ALWAYS_DOWNLOAD from CF and S3 (#322) *Issue #, if available:* *Description of changes:* Remove `ALWAYS_DOWNLOAD` so that Chronos-2 works in a fully offline env if model files are cached. 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/boto_utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/chronos/boto_utils.py b/src/chronos/boto_utils.py index d20c2a7..7d0d16d 100644 --- a/src/chronos/boto_utils.py +++ b/src/chronos/boto_utils.py @@ -17,7 +17,6 @@ from botocore.exceptions import ClientError, NoCredentialsError logger = logging.getLogger(__name__) MODEL_FILENAMES = ["config.json", "model.safetensors", "LICENSE.txt"] -ALWAYS_DOWNLOAD = {"config.json"} CLOUDFRONT_MAPPING = {"s3://autogluon/chronos-2": "https://d7057vjasule5.cloudfront.net"} CHUNK_SIZE = 1024 * 1024 # 1MB @@ -34,7 +33,7 @@ def download_model_files_from_cloudfront( dest = local_path / bucket / key url = f"{cloudfront_url}/{filename}" - if key not in ALWAYS_DOWNLOAD and not force_download and dest.exists(): + if not force_download and dest.exists(): logger.debug(f"skipping (already exists): {key}") continue @@ -64,7 +63,7 @@ def download_model_files_from_s3( key = f"{prefix}/{filename}" dest = local_path / bucket / key - if key not in ALWAYS_DOWNLOAD and not force_download and dest.exists(): + if not force_download and dest.exists(): logger.debug(f"skipping (already exists): {key}") continue