diff --git a/server/lorax_server/utils/sources/s3.py b/server/lorax_server/utils/sources/s3.py index 65d5cb450..085fbaeef 100644 --- a/server/lorax_server/utils/sources/s3.py +++ b/server/lorax_server/utils/sources/s3.py @@ -6,6 +6,7 @@ import boto3 from botocore.config import Config +from botocore.exceptions import ClientError from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE from huggingface_hub.utils import ( EntryNotFoundError, @@ -235,7 +236,7 @@ def download_file(self, filename: str, ignore_errors: bool = False) -> Optional[ try: paths = download_files_from_s3(self.bucket, filenames, self.model_id, self.revision) return paths[0] - except FileNotFoundError as e: + except ClientError as e: if ignore_errors: return None raise e