Fixed issue Snapshot not emitted after unregistering model with 0 workers #491
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.
Duplicate of #315 changed the base to master.
Description
Snapshot not emitted after unregistering model with 0 workers
Fixes #200
Type of change
Feature/Issue validation/testing
-[x] Test 1: No snapshot is created on list model request
(tsenv) admins@BRL07887:~TorchServe/TSSource$ curl "http://localhost:8081/models"
{
"models": []
}
-[x] Test 2: Snapshot is created when model is loaded with zero initial_workers
(tsenv) admins@BRL07887:~TorchServe/TSSource$ curl -X POST "http://localhost:8081/models?url=resnet-18.mar&initial_workers=0&synchronous=true"
{
"status": "Model "resnet-18" registered"
}
-[x] Test 3: Snapshot is created when model is registered with some initial_workers
(tsenv) admins@BRL07887:~$ curl -X POST "http://localhost:8081/models?url=densenet161.mar&initial_workers=3&synchronous=true"
{
"status": "Workers scaled"
}
-[x] Test 4: Snapshot file is created when model deleted with zero initial_workers
(tsenv) admins@BRL07887:~$ curl -X DELETE "http://localhost:8081/models/resnet-18"
{
"status": "Model "resnet-18" unregistered"
}
-[x] Test 5: snapshot file is created when model is deleted with some initial_workers
(tsenv) admins@BRL07887:~$ curl -X DELETE "http://localhost:8081/models/densenet161"
{
"status": "Model "densenet161" unregistered"
}
-[x] Test 6: Snapshot file is created when server is stopped
(tsenv) admins@BRL07887:~$ torchserve --stop
TorchServe has stopped.
torchserve_sanity.log
Checklist: