Skip to content

Commit

Permalink
Fix unit tests, format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey-Zumar committed Apr 14, 2017
1 parent 6c29846 commit 4546912
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/tutorial/cifar_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def parse_pred(p):

def cifar_prediction(host, app, uid, x):
url = "http://%s:1337/%s/predict" % (host, app)
req_json = json.dumps({'uid': 80, 'input': list(x)})
req_json = json.dumps({'uid': uid, 'input': list(x)})
headers = {'Content-type': 'application/json'}
start = datetime.now()
r = requests.post(url, headers=headers, data=req_json)
Expand Down
2 changes: 1 addition & 1 deletion management/clipper_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def register_application(self,
url = "http://%s:1338/admin/add_app" % self.host
req_json = json.dumps({
"name": name,
"candidate_models": model,
"candidate_model_names": [model],
"input_type": input_type,
"default_output": str(default_output),
"latency_slo_micros": slo_micros
Expand Down
2 changes: 1 addition & 1 deletion src/libclipper/test/redis_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ TEST_F(RedisTest, AddApplication) {
// entries in it (see add_application() in redis.cpp for details on what the
// fields are).
EXPECT_EQ(result.size(), static_cast<size_t>(5));
EXPECT_EQ(str_to_models(result["candidate_models"]), model_names);
EXPECT_EQ(str_to_model_names(result["candidate_model_names"]), model_names);
EXPECT_EQ(parse_input_type(result["input_type"]), input_type);
EXPECT_EQ(result["policy"], policy);
EXPECT_EQ(result["default_output"], default_output);
Expand Down
4 changes: 2 additions & 2 deletions src/management/src/management_frontend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ class RequestHandler {
clipper::redis::get_application(redis_connection_, app_name);
if (existing_app_data.empty()) {
if (clipper::redis::add_application(
redis_connection_, app_name, candidate_model_names, input_type,
selection_policy, default_output, latency_slo_micros)) {
redis_connection_, app_name, candidate_model_names, input_type,
selection_policy, default_output, latency_slo_micros)) {
return "Success!";
} else {
std::stringstream ss;
Expand Down

0 comments on commit 4546912

Please sign in to comment.