-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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] Avoid unnecessary calls to Task#getDescription in model download #124527
Conversation
Pinging @elastic/ml-core (Team:ML) |
Hi @davidkyle, I've created a changelog YAML for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! Could we please also add a test for this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick turnaround on this! Agree with Kathleen that a test would be nice, but this is such a straightforward change that we could do it in a follow-up if we just want to get the fix live ASAP.
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
The model download code checks for an existing download task by iterating over the currently running tasks comparing the task description. The call to
getDescription()
can sometimes throw- see the stack trace below.This change rearranges the conditional check so that
getDescription()
is only called on instances ofModelDownloadTask
.