Skip to content

Commit

Permalink
fix: remove duplicate logs (#5038)
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <me@frostming.com>
  • Loading branch information
frostming authored Oct 24, 2024
1 parent 49f8400 commit c59f84c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 6 additions & 3 deletions src/bentoml/_internal/cloud/bento.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def push(
self._do_push_bento(
bento, upload_task_id, force=force, threads=threads, bare=bare
)
self.spinner.log(f'✅ Pushed Bento "{bento.tag}"')

@inject
def _do_push_bento(
Expand Down Expand Up @@ -283,9 +282,13 @@ def filter_(
data=io_with_cb,
)
except Exception as e: # pylint: disable=broad-except
self.spinner.log(f'[bold red]Failed to upload bento "{bento.tag}"')
self.spinner.log(
f'[bold red]🚨 Failed to upload bento "{bento.tag}"'
)
raise e
self.spinner.log(f'[bold green]Successfully pushed bento "{bento.tag}"')
self.spinner.log(
f'[bold green]✅ Successfully pushed bento "{bento.tag}"'
)
return
finish_req = FinishUploadSchema(
status=UploadStatus.SUCCESS.value, reason=""
Expand Down
8 changes: 6 additions & 2 deletions src/bentoml/_internal/cloud/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,13 @@ def io_cb(x: int):
data=io_with_cb,
)
except Exception as e: # pylint: disable=broad-except
self.spinner.log(f'[bold red]Failed to upload model "{model.tag}"')
self.spinner.log(
f'[bold red]🚨 Failed to upload model "{model.tag}"'
)
raise e
self.spinner.log(f'[bold green]Successfully pushed model "{model.tag}"')
self.spinner.log(
f'[bold green]✅ Successfully pushed model "{model.tag}"'
)
return
finish_req = FinishUploadSchema(
status=UploadStatus.SUCCESS.value, reason=""
Expand Down

0 comments on commit c59f84c

Please sign in to comment.