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

[ML] Replace the Download button for Elastic models by extending the Deploy action #195593

Closed
darnautov opened this issue Oct 9, 2024 · 6 comments
Assignees
Labels
Feature:3rd Party Models ML 3rd party models :ml Team:ML Team label for ML (also use :ml) v9.1.0

Comments

@darnautov
Copy link
Contributor

darnautov commented Oct 9, 2024

Elastic curated models can be downloaded directly from the Trained Models UI using a dedicated "Download" action. However, having a separate action is impractical since the user must deploy the model afterward, either for testing or production use. It would be more user-friendly to make the download part of the deployment process.

We should remove the download button and extend the "Start Deployment" action to trigger the model download if necessary.

Downloading a model, such as ELSER, may take several minutes depending on network bandwidth. This should be considered when optimizing the user experience.

There are two ways to address this issue:

  • Update Kibana's "Start Deployment" endpoint to PUT the model if needed, track the download status, and attempt to start the deployment with the requested parameters. This approach is more flexible, allowing the user to initiate the action and close the browser tab while Kibana handles the rest. However, it is more complex to implement, requires a background task, and introduces challenges in surfacing any errors back to the user.

  • Implement it as a UI feature only. In this case, the user would need to keep the browser tab open. The Trained Models page would track the download process and call the "Start Deployment" API afterward. This option is easier to implement, and error reporting is straightforward.

I believe we should consider the second option, as it reduces engineering overhead while still providing value to the user.

Later, we could consider utilizing the Service Worker API to track the download/deployment status and enable push notifications if the Kibana platform allows it.

@darnautov darnautov added :ml Feature:3rd Party Models ML 3rd party models Team:ML Team label for ML (also use :ml) labels Oct 9, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@mdefazio
Copy link
Contributor

Implement it as a UI feature only. In this case, the user would need to keep the browser tab open.

To clarify, this will mean staying on this page until the download has completed (in order to trigger the deployment afterwards)? Or just
keeping the Kibana tab open?

@darnautov
Copy link
Contributor Author

Implement it as a UI feature only. In this case, the user would need to keep the browser tab open.

To clarify, this will mean staying on this page until the download has completed (in order to trigger the deployment afterwards)? Or just keeping the Kibana tab open?

@mdefazio just keeping the Kibana tab open, no need to stay on the Trained Models page.

@mdefazio
Copy link
Contributor

Awesome, thanks! I appreciate you setting this one up.

@joana-cps
Copy link

What changes from the current implementation:

  • Download button no longer exists
  • Deploy button changes its name to Start Deployment - in order to cover cases where there are 0 deployments or 1+
  • Start Deployment button opens the Deployment modal and triggers the model download

Image

Model not downloaded yet

  • When we open the modal window, we trigger the model download right away
  • We show the progress bar in the modal window until it is 'Ready to deploy'
  • TBD: Show the model name in the download progress bar, or only show "Downloading model" to avoid confusion with the deployment title.

Image

User can start deployment while it is downloading de model

  • We are allowing this to avoid the user being blocked with the modal open and also because it is a rare case since the model is normally fast to download
  • We keep showing the progress in the table:
Image

If the user clicks Cancel in the modal window, we continue downloading de model

  • User can then delete the model in the table actions or easily start a deployment
Image

Other fixes:

  • State column should be renamed to Model State for clarity
  • Update the context menu too
    Image
  • Responsiveness fix: icons overlap
    Image

@joana-cps
Copy link

This issue triggered a conversation about the number of deployments and some things that can be improved later on:

  • Show the number of deployments
  • Make it clear what is a model state and a deployment state
  • The list of deployments is hidden in the Stats tab, we could make it more visible, maybe using a nested table to be able to trigger actions per deployment vs actions for the model itself

To be discussed further on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:3rd Party Models ML 3rd party models :ml Team:ML Team label for ML (also use :ml) v9.1.0
Projects
None yet
Development

No branches or pull requests

6 participants