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

Implement delete_versioned_model API #602

Merged

Conversation

withsmilo
Copy link
Collaborator

@withsmilo withsmilo commented Dec 3, 2018

1. in brief

2. TODO

  • Implement unregister_versioned_models Clipper API in clipper_admin
  • Implement delete_versioned_model Management-Frontend API
  • Add some test cases to integration-tests/clipper_admin_tests.py
  • Add some test cases to src/management/src/management_frontend_tests.cpp

3. non-public _unregister_versioned_models Clipper API in clipper_admin

Description

Unregister the specified versions of the specified models from Clipper internal.
This function does not be opened to public because it might cause critical operation.
Please use stop_models, stop_versioned_models, stop_inactive_model_versions, and stop_all_model_containers APIs according to your need.

Parameters

model_versions_dict : dict(str, list(str))
For each entry in the dict, the key is a model name and the value is a list of model

Raises

:py:exc:clipper.UnconnectedException
versions. All replicas for each version of each model will be stopped.

4. delete_versioned_model Management-Frontend API

API path

POST /admin/delete_versioned_model

Request schema

const std::string DELETE_VERSIONED_MODEL_JSON_SCHEMA = R"(
{
"model_name" := string,
"model_version" := string,
}
)";

@withsmilo withsmilo self-assigned this Dec 3, 2018
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@withsmilo withsmilo force-pushed the implement_delete_versioned_models_python_api branch from 910f587 to fa5502a Compare December 4, 2018 00:52
@avinregmi
Copy link

Hey guys, I'm not getting the changes when installed using pip. Has this not been pushed in master yet?

@withsmilo
Copy link
Collaborator Author

@avinregmi : This pull request was NOT merged with develop branch yet. After fixing unstable CI infra, I will try to merge this.

* Remove the specified versions of the specified models from Clipper internal.
* Implemented `unregister_versioned_models` Clipper API in clipper_admin.

> Description
> -----------
> unregister_versioned_models(model_versions_dict)

> Parameters
> ----------
> model_versions_dict : dict(str, list(str))
>     For each entry in the dict, the key is a model name and the value is a list of model

> Raises
> ------
> :py:exc:`clipper.UnconnectedException`
>     versions. All replicas for each version of each model will be stopped.

* Implemented `delete_versioned_model` Management-Frontend API.

> API path
> --------
> POST /admin/delete_versioned_model

> Request schema
> --------------
> const std::string DELETE_VERSIONED_MODEL_JSON_SCHEMA = R"(
>   {
>    "model_name" := string,
>    "model_version" := string,
>   }
> )";
@withsmilo withsmilo force-pushed the implement_delete_versioned_models_python_api branch from fa5502a to 28a2adf Compare March 22, 2019 13:10
@withsmilo
Copy link
Collaborator Author

jenkins test this please

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1821/
Test FAILed.

@withsmilo
Copy link
Collaborator Author

Jenkins ok to test

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1822/
Test FAILed.

@withsmilo
Copy link
Collaborator Author

jenkins test this please

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1824/
Test FAILed.

withsmilo pushed a commit to withsmilo/clipper that referenced this pull request Mar 25, 2019
This patch is needed to retry if 'docker push' fails. I found this error case through ucbrise#602 (comment).
@withsmilo
Copy link
Collaborator Author

jenkins test this please

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1826/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1828/
Test FAILed.

simon-mo pushed a commit that referenced this pull request Mar 28, 2019
* Add retry-routine to 'docker push' in clipper_docker.cfg.py

This patch is needed to retry if 'docker push' fails. I found this error case through #602 (comment).

* Move wait_and_pull_cmd() and wait_and_push_cmd() to proper location
simon-mo
simon-mo previously approved these changes Apr 1, 2019
@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1880/
Test FAILed.

@withsmilo
Copy link
Collaborator Author

The latest Jenkins job shows me that the TaskExecutor has some bugs. I will try to debug it tonight.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1889/
Test FAILed.

@withsmilo
Copy link
Collaborator Author

https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/2012/ shows,

 [py35-rpc]   ERROR: Complete output from command /usr/local/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-req-build-mv0jvuu_/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-4xpgl5lj --python-tag cp35: 
 [py35-rpc]   ERROR: /usr/local/lib/python3.5/site-packages/setuptools/dist.py:407: UserWarning: The version specified ('e70f089044') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details. 
...
 [py35-rpc] creating build/bdist.linux-x86_64/wheel/clipper_admin-e70f089044.dist-info/WHEEL 
 [py35-rpc] Traceback (most recent call last): 
 [py35-rpc] File "<string>", line 1, in <module> 
 [py35-rpc] File "/tmp/pip-req-build-mv0jvuu_/setup.py", line 33, in <module> 
 [py35-rpc] 'TensorFlow': ['tensorflow'], 
 [py35-rpc] File "/usr/local/lib/python3.5/site-packages/setuptools/__init__.py", line 140, in setup 
 [py35-rpc] return distutils.core.setup(**attrs) 
 [py35-rpc] File "/usr/local/lib/python3.5/distutils/core.py", line 148, in setup 
 [py35-rpc] dist.run_commands() 
 [py35-rpc] File "/usr/local/lib/python3.5/distutils/dist.py", line 955, in run_commands 
 [py35-rpc] self.run_command(cmd) 
 [py35-rpc] File "/usr/local/lib/python3.5/distutils/dist.py", line 974, in run_command 
 [py35-rpc] cmd_obj.run() 
 [py35-rpc] File "/usr/local/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 246, in run 
 [py35-rpc] with WheelFile(wheel_path, 'w') as wf: 
 [py35-rpc] File "/usr/local/lib/python3.5/site-packages/wheel/wheelfile.py", line 40, in __init__ 
 [py35-rpc] raise WheelError("Bad wheel filename {!r}".format(basename)) 
 [py35-rpc] wheel.cli.WheelError: Bad wheel filename 'clipper_admin-e70f089044-py2.py3-none-any.whl' 
 [py35-rpc] ---------------------------------------- 
 [py35-rpc]   ERROR: Failed building wheel for clipper-admin 
 [integration_py2_mxnet] Sleep 65 secs before starting a test 
 [integration_py2_mxnet] Starting Trial 0 with timeout 2400.0 seconds 
 [integration_py2_mxnet] Sleep 95 
 [integration_py2_mxnet] Starting Trial 1 with timeout 2400.0 seconds 
 [integration_py2_mxnet] Sleep 127 
 [integration_py2_mxnet] All retry failed. 
CI_test.Makefile:152: recipe for target 'integration_py2_mxnet' failed
make: *** [integration_py2_mxnet] Error 1

@withsmilo
Copy link
Collaborator Author

jenkins test this please

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/2013/
Test PASSed.

@rkooo567
Copy link
Collaborator

@withsmilo Will review once the last test is added! I am a little busy this week.

Sungjun, Kim added 2 commits May 30, 2019 07:24
* TestDeleteVersionedModelCorrect
* TestDeleteVersionedModelMissingField
* TestDeleteVersionedModelForNonexistentModel
@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/2039/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/2040/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/2041/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/2042/
Test FAILed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/2043/
Test PASSed.

Copy link
Contributor

@simon-mo simon-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@withsmilo great work! thank you for implementing this. This is the missing piece in the Clipper API

@simon-mo simon-mo merged commit 3d39dd7 into ucbrise:develop May 30, 2019
@withsmilo withsmilo deleted the implement_delete_versioned_models_python_api branch May 30, 2019 04:17
jacekwachowiak added a commit to jacekwachowiak/clipper that referenced this pull request May 30, 2019
Implement delete_versioned_model API (ucbrise#602)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants