Skip to content

Commit

Permalink
Rename 'delete_application' to 'unregister_application' in clipper_admin
Browse files Browse the repository at this point in the history
* related issue : ucbrise#603
  • Loading branch information
Sungjun, Kim committed Mar 22, 2019
1 parent 847d6de commit 4cafb80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions clipper_admin/clipper_admin/clipper_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def register_application(self, name, input_type, default_output,
"Application {app} was successfully registered".format(
app=name))

def delete_application(self, name):
def unregister_application(self, name):
if not self.connected:
raise UnconnectedException()

Expand All @@ -236,7 +236,7 @@ def delete_application(self, name):
raise ClipperException(msg)
else:
self.logger.info(
"Application {app} was successfully deleted".format(app=name))
"Application {app} was successfully unregistered".format(app=name))

def link_model_to_app(self, app_name, model_name):
"""Routes requests from the specified app to be evaluted by the specified model.
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/clipper_admin_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ def test_link_not_registered_model_to_app_fails(self):
self.clipper_conn.link_model_to_app(app_name, not_deployed_model)
self.assertTrue("No model with name" in str(context.exception))

def test_delete_application_correct(self):
def test_unregister_application_correct(self):
input_type = "doubles"
default_output = "DEFAULT"
slo_micros = 30000
app_name = "testapp"
self.clipper_conn.register_application(app_name, input_type,
default_output, slo_micros)
self.clipper_conn.delete_application(app_name)
self.clipper_conn.unregister_application(app_name)
registered_applications = self.clipper_conn.get_all_apps()
self.assertEqual(len(registered_applications), 0)
self.assertTrue(app_name not in registered_applications)
Expand Down Expand Up @@ -832,7 +832,7 @@ def test_remove_inactive_container(self):
'test_register_py_endpoint',
'test_test_predict_function',
'test_build_model_with_custom_packages',
'test_delete_application_correct',
'test_unregister_application_correct',
'test_query_specific_model_version',
]

Expand Down

0 comments on commit 4cafb80

Please sign in to comment.