Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove duplicate logs #5038

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading