mirror of
https://github.com/amazon-science/chronos-forecasting
synced 2026-05-24 10:08:33 +00:00
Add FutureWarning for CloudFront (#357)
*Issue #, if available:* *Description of changes:* By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This commit is contained in:
parent
c5aa5f4292
commit
c23d34cd88
1 changed files with 7 additions and 0 deletions
|
|
@ -6,6 +6,7 @@
|
|||
import logging
|
||||
import os
|
||||
import re
|
||||
import warnings
|
||||
from pathlib import Path
|
||||
|
||||
import boto3
|
||||
|
|
@ -110,6 +111,12 @@ def cache_model_from_s3(
|
|||
|
||||
# Use CloudFront CDN for faster, cached downloads if available
|
||||
if cloudfront_url:
|
||||
warnings.warn(
|
||||
f"Loading {s3_uri} from CloudFront is deprecated and will be removed in a future version. "
|
||||
f'Please specify a HuggingFace model_id instead. For example: Chronos2Pipeline.from_pretrained("amazon/chronos-2")',
|
||||
category=FutureWarning,
|
||||
stacklevel=3,
|
||||
)
|
||||
try:
|
||||
download_model_files_from_cloudfront(
|
||||
cloudfront_url=cloudfront_url,
|
||||
|
|
|
|||
Loading…
Reference in a new issue