Skip to content

Commit

Permalink
Update error message for overwrite to be more user friendly (#3619)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvpatel2000 authored Sep 16, 2024
1 parent fea4a88 commit 893f398
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion composer/utils/remote_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 893f398

Please sign in to comment.