[8.19] [ML] Trained Models: Prevent Download of Models Already Present in Other Spaces with Warning (#220238)#220723
Merged
kibanamachine merged 1 commit intoelastic:8.19from May 9, 2025
Conversation
…her Spaces with Warning (elastic#220238) Resolves elastic#206834 Before: > If a trained model like ELSER has already been downloaded but is not available in the current space, the download action is available but results in the following error  This PR prevents models from being downloaded if they already exist in a different space * If the model is downloaded in a different space and the user has write permissions for the current space: <img width="1228" alt="image" src="https://github.com/user-attachments/assets/db146bbb-a295-471e-b0a1-f1a8c0949739" /> * If the model is downloaded in a different space but the user lacks write permissions for the current space: <img width="1479" alt="image" src="https://github.com/user-attachments/assets/dcf195c1-7314-4b0b-af9d-1fbbaffcbb89" /> Note: It adds an additional request to ES, but within a trace, it is just one extra span, so the performance impact is not significant:  I tried adding functional tests for this, but it only applies to hosted models, which are too large to download durning the testing phase, thus I don't see a convenient way to test it. (cherry picked from commit c97f2c7)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.19:Questions ?
Please refer to the Backport tool documentation