From 893f398b348402015d0b69da88d23fe79972cf15 Mon Sep 17 00:00:00 2001 From: Mihir Patel Date: Mon, 16 Sep 2024 10:38:09 -0700 Subject: [PATCH] Update error message for overwrite to be more user friendly (#3619) --- composer/utils/remote_uploader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer/utils/remote_uploader.py b/composer/utils/remote_uploader.py index 33793e7c91..da8b2da3dc 100644 --- a/composer/utils/remote_uploader.py +++ b/composer/utils/remote_uploader.py @@ -92,7 +92,10 @@ def upload_file(retry_index: int = 0): # Good! It shouldn't exist. pass else: - raise FileExistsError(f'Object {remote_file_name} already exists, but overwrite was set to False.') + raise FileExistsError( + f'Object {remote_file_name} already exists, but overwrite was set to False. ' + 'Please set `save_overwrite` to `True` in Trainer to overwrite the existing file.', + ) log.info(f'Uploading file {local_file_path} to {remote_file_name}') object_store.upload_object( object_name=remote_file_name,