-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Downloaded elser models should be easily sharable between spaces #169771
Comments
Pinging @elastic/ml-ui (:ml) |
This is a very good point. we could do this by default, although it might be tricky to give it an initial space of If we do assign
Or,
granted these scenarios are unlikely. We could also do both ideas. |
@jgowdyelastic Thanks for this explanation and context—very helpful. |
This is not technically possible. I had forgotten that there is a restriction on space assignment where you cannot assign a new space to a saved object from a space where the saved object isn't already a member. We have requested a removal of this restriction before, and it looks like some work has taken place, but it is quite complicated and looks to have been parked. #131254 The only option left I can see is to automatically assign elser models to |
This could be generalised as automatically assigning models to |
Yes, that actually makes it easier as we won't have to retrieve the IDs of known elser models. |
Fixes #169771 Adds a new endpoint `/internal/ml/trained_models/install_elastic_trained_model/:modelId` which wraps the `putTrainedModel` call to start the download of the elser model. It then reassigns the saved object's space to be `*`. Also updates the saved object sync call to ensure any internal models (ones which start with `.`) are assigned to the `*` space, if they've needed syncing. It is still possible for a user to reassign the spaces for an elser model and get themselves into the situation covered described in #169771. In this situation, I believe the best we can do is suggest the user adjusts the spaces via the stack management page. At the moment a `Model already exists` error is displayed in a toast. In a follow up PR we could catch this and show more information to direct the user to the stack management page. --------- Co-authored-by: Dima Arnautov <[email protected]>
If the user has downloaded an elser model and then navigates to a different space, then the elser model appears to be not downloaded and so they can click the download button again. For a deployed model, this then throws an error as the model already exists in elasticsearch.
A work around is to share the model to the different space via the stack management page. But this is not obvious.
We should be warn the user that the model already exists and give them the option to instantly assign it to the current space.
If they do not have permission to assign spaces, we should inform them that they need an admin to help.
Alternatively, we could just assign the space automatically as part of a download endpoint, if we see that it has already been downloaded and the call to download is coming from a different space which the elser trained model doesn't exist in.
Currently there is no download endpoint, instead the PUT trained model config endpoint is called from the client side. If we decided we need to run additional space checks or assign the model to
*
after creation, we will probably need to wrap is all inside a dedicated download endpoint.The text was updated successfully, but these errors were encountered: