elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.35k stars 7.98k forks source link

[Semantic Text UI] Handle the case when the model is not yet downloaded #182040

Closed saikatsarkar056 closed 1 week ago

saikatsarkar056 commented 2 weeks ago

When the trained model is not yet downloaded, it can't be deployed. This PR has covered the following:

How to test the changes locally

saikatsarkar056 commented 1 week ago

@elastic/kibana-management It would be great if I can get a review for this PR.

saikatsarkar056 commented 1 week ago

@elasticmachine merge upstream

saikatsarkar056 commented 1 week ago

Thanks a lot for addressing this use case, @saikatsarkar056! After testing the changes locally, I'd just want to confirm that the UX with the modal blocking the user from saving the mappings is the best choice. If I understand correctly, the modal will now wait until the model is downloaded and deployed. That could take a really long time. Should we consider starting the download and deployment of the model in the background instead?

@yuliacech Please notice this code-block. The model download and deployment are occurring in the background. Only the check to determine if a model has already been downloaded is performed asynchronously, which is quite fast.

Furthermore, I've relocated the CreateInferenceEndpoint block to its own function, allowing us to call it after the model has been downloaded and deployed.

The modifications in this pull request indicate that the model download, model deployment, and CreateInferenceEndpoint processes occur one-after-another in the background.

saikatsarkar056 commented 1 week ago

@yuliacech Thank you for the feedback. Can you please review this PR once again?

kibana-ci commented 1 week ago

:green_heart: Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
ml 66 67 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexManagement 655.2KB 655.8KB +629.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
ml 100 101 +1
Unknown metric groups #### API count | id | [before](https://github.com/elastic/kibana/commit/64a4c6dfaa3d174ffc2ab7120fbdf8bb0c372b2b) | [after](https://github.com/elastic/kibana/commit/55cf7e1e42de2afb2d8e899902b94917e7419db6) | diff | | --- | --- | --- | --- | | `ml` | 153 | 154 | +1 |

History

To update your PR or re-run it, just comment with: @elasticmachine merge upstream

cc @saikatsarkar056