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

Improved model deployment progress bar #144

Merged
merged 4 commits into from
Apr 26, 2023
Merged

Conversation

lu-ohai
Copy link
Member

@lu-ohai lu-ohai commented Apr 12, 2023

Improved model deployment progress bar

  • Updated model deployment progress bar.
  • Moved progress bar API to OCIWorkRequestMixin class so that it can be used by other services.

Notebook

Screen Shot 2023-04-17 at 12 05 25 AM

Screen Shot 2023-04-17 at 12 13 10 AM

Screen Shot 2023-04-17 at 12 23 08 AM

Screen Shot 2023-04-17 at 12 33 43 AM

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 12, 2023
poll_interval: int = DEFAULT_POLL_INTERVAL,
):
"""_wait_for_progress_completion blocks until progress is completed.
def _wait_for_work_request(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the ticket it says that progress bar should be implemented as part of a Mixin class, but the implementation is different. Shouldn't we have some solution that can be reused for the different services the we do support?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the method has been moved to class OCIWorkRequestMixin for general use.

@lu-ohai lu-ohai marked this pull request as ready for review April 24, 2023 23:10
Copy link
Member

@qiuosier qiuosier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though I think there is still room for improvement. This update simplified the existing logic and provided a basic reusable method. We can keep improving it when we have additional use cases.

@@ -29,6 +30,10 @@
logger = logging.getLogger(__name__)

LIFECYCLE_STOP_STATE = ("SUCCEEDED", "FAILED", "CANCELED", "DELETED")
WORK_REQUEST_STOP_STATE = ("SUCCEEDED", "FAILED", "CANCELED")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might depend on the service.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the WorkRequest terminal states and do the services have different values?

def wait_for_progress(
self,
work_request_id: str,
num_steps: int = DEFAULT_WORKFLOW_STEPS,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not seem like there is an easy way to know the number of workflow steps for different workflow. Having a default here could be confusing for the developers. I think a better behavior is, while the number of steps is not specified, it will continue waiting until work_request.status reach WORK_REQUEST_STOP_STATE. Even though WORK_REQUEST_STOP_STATE still depends on the workflow, most, if not all workflow has SUCCEEDED and FAILED states.

@lu-ohai lu-ohai merged commit ea0bfae into oracle:develop Apr 26, 2023
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants