diff --git a/src/bentoml/_internal/cloud/bentocloud.py b/src/bentoml/_internal/cloud/bentocloud.py index f2a8cdb110a..d3a6530d9f2 100644 --- a/src/bentoml/_internal/cloud/bentocloud.py +++ b/src/bentoml/_internal/cloud/bentocloud.py @@ -134,7 +134,7 @@ def push_model(model: Model) -> None: if ( not force and remote_bento - and remote_bento.upload_status == BentoUploadStatus.SUCCESS + and remote_bento.upload_status == BentoUploadStatus.SUCCESS.value ): self.spinner.log_progress.add_task( f'[bold blue]Push skipped: Bento "{bento.tag}" already exists in remote Bento store' @@ -394,7 +394,7 @@ def chunk_upload( status=BentoUploadStatus.FAILED, reason=str(e), ) - if finish_req.status is BentoUploadStatus.FAILED: + if finish_req.status == BentoUploadStatus.FAILED.value: self.spinner.log_progress.add_task( f'[bold red]Failed to upload Bento "{bento.tag}"' ) @@ -406,7 +406,7 @@ def chunk_upload( version=version, req=finish_req, ) - if finish_req.status != BentoUploadStatus.SUCCESS: + if finish_req.status != BentoUploadStatus.SUCCESS.value: self.spinner.log_progress.add_task( f'[bold red]Failed pushing Bento "{bento.tag}": {finish_req.reason}' ) @@ -633,7 +633,7 @@ def _do_push_model( if ( not force and remote_model - and remote_model.upload_status == ModelUploadStatus.SUCCESS + and remote_model.upload_status == ModelUploadStatus.SUCCESS.value ): self.spinner.log_progress.add_task( f'[bold blue]Model "{model.tag}" already exists in remote model store, skipping' @@ -851,7 +851,7 @@ def chunk_upload( status=ModelUploadStatus.FAILED, reason=str(e), ) - if finish_req.status is ModelUploadStatus.FAILED: + if finish_req.status == ModelUploadStatus.FAILED.value: self.spinner.log_progress.add_task( f'[bold red]Failed to upload model "{model.tag}"' ) @@ -864,7 +864,7 @@ def chunk_upload( req=finish_req, ) - if finish_req.status != ModelUploadStatus.SUCCESS: + if finish_req.status != ModelUploadStatus.SUCCESS.value: self.spinner.log_progress.add_task( f'[bold red]Failed pushing model "{model.tag}" : {finish_req.reason}' )