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] Avoid unnecessary calls to Task#getDescription in model download #124527

Merged
merged 3 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/124527.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 124527
summary: Avoid potentially throwing calls to Task#getDescription in model download
area: Machine Learning
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ synchronized boolean handleDownloadInProgress(

ModelDownloadTask inProgress = null;
for (var task : tasks) {
if (description.equals(task.getDescription()) && task instanceof ModelDownloadTask downloadTask) {
if (task instanceof ModelDownloadTask downloadTask && (description.equals(downloadTask.getDescription()))) {
inProgress = downloadTask;
break;
}
Expand Down