-
Notifications
You must be signed in to change notification settings - Fork 138
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
include deployment status in deploy API response #1336
Conversation
Codecov Report
@@ Coverage Diff @@
## 2.x #1336 +/- ##
============================================
- Coverage 78.62% 78.31% -0.32%
- Complexity 2272 2273 +1
============================================
Files 190 190
Lines 9250 9286 +36
Branches 909 910 +1
============================================
- Hits 7273 7272 -1
- Misses 1568 1603 +35
- Partials 409 411 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -23,6 +23,8 @@ | |||
import java.util.Set; | |||
import java.util.stream.Collectors; | |||
|
|||
import javax.swing.*; |
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.
Can we avoid to import javax.swing.*
here?
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.
Good catch! Removed this redundant line in the refresh!
Signed-off-by: Xun Zhang <[email protected]>
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-main main
# Navigate to the new working tree
cd .worktrees/backport-main
# Create a new branch
git switch --create backport/backport-1336-to-main
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9992067d89317892c37848e57dfe44d274817b39
# Push it to GitHub
git push --set-upstream origin backport/backport-1336-to-main
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-main Then, create a pull request where the |
Description
This is to add deployment status with minimum impact to the current code and API workflows. Verified it works with local environment.
Before this change:
POST /_plugins/_ml/models/mUFIL4kB4ubqQRzeKvr1/_deploy
sample response for remote model
{
"task_id": "OP5JL4kB28KP1SGMupr3",
"status": "CREATED"
}
This is ridiculous - deploying a remote model doesn't need to be asyncrhonize. I need to see the deployment status right away without sending another API request to query the Task Id!
After this change:
POST /_plugins/_ml/models/mUFIL4kB4ubqQRzeKvr1/_deploy
sample response for remote model
{
"task_id": "OP5JL4kB28KP1SGMupr3",
"task_type" : "DEPLOY_MODEL"
"status": "COMPLETED"
}
For non remote models, the response will be
{
"task_id": "OP5JL4kB28KP1SGMupr3",
"task_type" : "DEPLOY_MODEL"
"status": "CREATED"
}
If the deployment fails, the response will send back the error message right away.