Skip to content

Commit

Permalink
Merge pull request #355 from cliveseldon/fix_mean_classifier
Browse files Browse the repository at this point in the history
Change mean_classifier to mock_classifier in tests and example for consistency
  • Loading branch information
ukclivecox authored Dec 22, 2018
2 parents bab5168 + 0299a26 commit 6cc7643
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion api-frontend/src/test/resources/model_simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"spec": {
"containers": [
{
"image": "seldonio/mean_classifier:0.6",
"image": "seldonio/mock_classifier:0.6",
"imagePullPolicy": "IfNotPresent",
"name": "mean-classifier",
"resources": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"spec": {
"containers": [
{
"image": "seldonio/mean_classifier:0.6",
"image": "seldonio/mock_classifier:0.6",
"imagePullPolicy": "IfNotPresent",
"name": "mean-classifier",
"resources": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"spec": {
"containers": [
{
"image": "seldonio/mean_classifier:0.6",
"image": "seldonio/mock_classifier:0.6",
"imagePullPolicy": "IfNotPresent",
"name": "mean-classifier",
"resources": {
Expand Down
2 changes: 1 addition & 1 deletion cluster-manager/src/test/resources/model_long_names.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"spec": {
"containers": [
{
"image": "sssssssssssssssssssssssssssssseldonio/mean_classifier:0.6",
"image": "sssssssssssssssssssssssssssssseldonio/mock_classifier:0.6",
"imagePullPolicy": "IfNotPresent",
"name": "mean-classifier",
"resources": {
Expand Down
2 changes: 1 addition & 1 deletion cluster-manager/src/test/resources/model_short_names.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"spec": {
"containers": [
{
"image": "seldonio/mean_classifier:0.6",
"image": "seldonio/mock_classifier:0.6",
"imagePullPolicy": "IfNotPresent",
"name": "mean-classifier",
"resources": {
Expand Down
2 changes: 1 addition & 1 deletion cluster-manager/src/test/resources/model_simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"spec": {
"containers": [
{
"image": "seldonio/mean_classifier:0.6",
"image": "seldonio/mock_classifier:0.6",
"imagePullPolicy": "IfNotPresent",
"name": "mean-classifier",
"resources": {
Expand Down
2 changes: 1 addition & 1 deletion cluster-manager/src/test/resources/model_simple_grpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"spec": {
"containers": [
{
"image": "seldonio/mean_classifier:0.6",
"image": "seldonio/mock_classifier:0.6",
"imagePullPolicy": "IfNotPresent",
"name": "mean-classifier",
"resources": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"spec": {
"containers": [
{
"image": "seldonio/mean_classifier:0.6",
"image": "seldonio/mock_classifier:0.6",
"imagePullPolicy": "IfNotPresent",
"name": "mean-classifier",
"resources": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ public ResponseEntity<String> answer(InvocationOnMock invocation) {
Assert.assertEquals(200, res2.getResponse().getStatus());
response = res2.getResponse().getContentAsString();
System.out.println("response is ["+response+"]");
Assert.assertTrue(response.indexOf("mycounter_total{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",mytag1=\"mytagval1\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 1.0")>-1);
Assert.assertTrue(response.indexOf("mytimer_seconds_count{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 1.0")>-1);
Assert.assertTrue(response.indexOf("mygauge{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 22.0")>-1);
Assert.assertTrue(response.indexOf("mycounter_total{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",mytag1=\"mytagval1\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 1.0")>-1);
Assert.assertTrue(response.indexOf("mytimer_seconds_count{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 1.0")>-1);
Assert.assertTrue(response.indexOf("mygauge{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 22.0")>-1);
System.out.println(response);

res = mvc.perform(MockMvcRequestBuilders.post("/api/v0.1/predictions")
Expand Down Expand Up @@ -204,9 +204,9 @@ public ResponseEntity<String> answer(InvocationOnMock invocation) {
res2 = mvc.perform(MockMvcRequestBuilders.get("/prometheus")).andReturn();
Assert.assertEquals(200, res2.getResponse().getStatus());
response = res2.getResponse().getContentAsString();
Assert.assertTrue(response.indexOf("mycounter_total{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",mytag1=\"mytagval1\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 2.0")>-1);
Assert.assertTrue(response.indexOf("mytimer_seconds_count{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 2.0")>-1);
Assert.assertTrue(response.indexOf("mygauge{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 100.0")>-1);
Assert.assertTrue(response.indexOf("mycounter_total{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",mytag1=\"mytagval1\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 2.0")>-1);
Assert.assertTrue(response.indexOf("mytimer_seconds_count{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 2.0")>-1);
Assert.assertTrue(response.indexOf("mygauge{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 100.0")>-1);
System.out.println(response);
}

Expand Down Expand Up @@ -520,9 +520,9 @@ public ResponseEntity<String> answer(InvocationOnMock invocation) {
Assert.assertEquals(200, res2.getResponse().getStatus());
response = res2.getResponse().getContentAsString();
System.out.println("response is ["+response+"]");
Assert.assertTrue(response.indexOf("mycounter1_total{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",mytag1=\"mytagval1\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 1.0")>-1);
Assert.assertTrue(response.indexOf("mytimer1_seconds_count{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 1.0")>-1);
Assert.assertTrue(response.indexOf("mygauge1{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 22.0")>-1);
Assert.assertTrue(response.indexOf("mycounter1_total{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",mytag1=\"mytagval1\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 1.0")>-1);
Assert.assertTrue(response.indexOf("mytimer1_seconds_count{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 1.0")>-1);
Assert.assertTrue(response.indexOf("mygauge1{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 22.0")>-1);
System.out.println(response);

res = mvc.perform(MockMvcRequestBuilders.post("/api/v0.1/predictions")
Expand Down Expand Up @@ -554,9 +554,9 @@ public ResponseEntity<String> answer(InvocationOnMock invocation) {
res2 = mvc.perform(MockMvcRequestBuilders.get("/prometheus")).andReturn();
Assert.assertEquals(200, res2.getResponse().getStatus());
response = res2.getResponse().getContentAsString();
Assert.assertTrue(response.indexOf("mycounter1_total{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",mytag1=\"mytagval1\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 2.0")>-1);
Assert.assertTrue(response.indexOf("mytimer1_seconds_count{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 2.0")>-1);
Assert.assertTrue(response.indexOf("mygauge1{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 100.0")>-1);
Assert.assertTrue(response.indexOf("mycounter1_total{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",mytag1=\"mytagval1\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 2.0")>-1);
Assert.assertTrue(response.indexOf("mytimer1_seconds_count{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 2.0")>-1);
Assert.assertTrue(response.indexOf("mygauge1{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 100.0")>-1);
System.out.println(response);
}

Expand Down Expand Up @@ -620,9 +620,9 @@ public ResponseEntity<String> answer(InvocationOnMock invocation) {
Assert.assertEquals(200, res2.getResponse().getStatus());
response = res2.getResponse().getContentAsString();
System.out.println("response is ["+response+"]");
Assert.assertTrue(response.indexOf("mycounter2_total{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",mytag1=\"mytagval1\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 1.0")>-1);
Assert.assertTrue(response.indexOf("mytimer2_seconds_count{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 1.0")>-1);
Assert.assertTrue(response.indexOf("mygauge2{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 22.0")>-1);
Assert.assertTrue(response.indexOf("mycounter2_total{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",mytag1=\"mytagval1\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 1.0")>-1);
Assert.assertTrue(response.indexOf("mytimer2_seconds_count{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 1.0")>-1);
Assert.assertTrue(response.indexOf("mygauge2{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 22.0")>-1);
System.out.println(response);

res = mvc.perform(MockMvcRequestBuilders.post("/api/v0.1/predictions")
Expand Down Expand Up @@ -654,9 +654,9 @@ public ResponseEntity<String> answer(InvocationOnMock invocation) {
res2 = mvc.perform(MockMvcRequestBuilders.get("/prometheus")).andReturn();
Assert.assertEquals(200, res2.getResponse().getStatus());
response = res2.getResponse().getContentAsString();
Assert.assertTrue(response.indexOf("mycounter2_total{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",mytag1=\"mytagval1\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 2.0")>-1);
Assert.assertTrue(response.indexOf("mytimer2_seconds_count{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 2.0")>-1);
Assert.assertTrue(response.indexOf("mygauge2{deployment_name=\"None\",model_image=\"seldonio/mean_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 100.0")>-1);
Assert.assertTrue(response.indexOf("mycounter2_total{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",mytag1=\"mytagval1\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 2.0")>-1);
Assert.assertTrue(response.indexOf("mytimer2_seconds_count{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 2.0")>-1);
Assert.assertTrue(response.indexOf("mygauge2{deployment_name=\"None\",model_image=\"seldonio/mock_classifier\",model_name=\"mean-classifier\",model_version=\"0.6\",predictor_name=\"fx-market-predictor\",predictor_version=\"unknown\",} 100.0")>-1);
System.out.println(response);
}

Expand Down
4 changes: 2 additions & 2 deletions engine/src/test/resources/model_simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"spec": {
"containers": [
{
"image": "seldonio/mean_classifier:0.6",
"image": "seldonio/mock_classifier:0.6",
"imagePullPolicy": "IfNotPresent",
"name": "mean-classifier",
"resources": {
Expand Down Expand Up @@ -34,4 +34,4 @@
"annotations": {
"predictor_version": "v1"
}
}
}
2 changes: 1 addition & 1 deletion notebooks/resources/model_invalid1.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"spec": {
"containers": [
{
"image": "seldonio/mean_classifier:0.6",
"image": "seldonio/mock_classifier:0.6",
"imagePullPolicy": 22,
"name": "mean-classifier",
"resources": {
Expand Down
2 changes: 1 addition & 1 deletion notebooks/resources/model_invalid2.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"spec": {
"containers": [
{
"image": "seldonio/mean_classifier:0.6",
"image": "seldonio/mock_classifier:0.6",
"imagePullPolicy": "IfNotPresent",
"name": "mean-classifier",
"resources": {
Expand Down
2 changes: 1 addition & 1 deletion notebooks/resources/model_multiple_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"spec": {
"containers": [
{
"image": "seldonio/mean_classifier:0.6",
"image": "seldonio/mock_classifier:0.6",
"imagePullPolicy": "IfNotPresent",
"name": "classifier",
"resources": {
Expand Down
2 changes: 1 addition & 1 deletion notebooks/resources/model_with_canary.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"spec": {
"containers": [
{
"image": "seldonio/mean_classifier:0.6",
"image": "seldonio/mock_classifier:0.6",
"imagePullPolicy": "IfNotPresent",
"name": "mean-classifier",
"resources": {
Expand Down

0 comments on commit 6cc7643

Please sign in to comment.