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

Deprecate Java engine #2857

Merged
merged 7 commits into from
Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ update_configs:
update_schedule: "weekly"
default_reviewers:
- adriangonz
- directory: "/engine"
package_manager: "java:maven"
update_schedule: "weekly"
default_reviewers:
- adriangonz
- directory: "/executor"
package_manager: "go:modules"
update_schedule: "weekly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ def load(self):
model_folder = kfserving.Storage.download(self.storage_uri)
self.model: Data = load_detector(model_folder)
self.ready = True

2 changes: 1 addition & 1 deletion components/alibi-detect-server/adserver/cd_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(
name: str,
storage_uri: str,
model: Optional[Data] = None,
drift_batch_size: int = 1000
drift_batch_size: int = 1000,
):
"""
Outlier Detection / Concept Drift Model
Expand Down
7 changes: 4 additions & 3 deletions components/alibi-detect-server/adserver/protocols/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
RequestHandler,
) # pylint: disable=no-name-in-module

def _create_np_from_v2(data: list,ty: str, shape: list) -> np.array:

def _create_np_from_v2(data: list, ty: str, shape: list) -> np.array:
npty = np.float
if ty == "BOOL":
npty = np.bool
elif ty == "UINT8":
elif ty == "UINT8":
npty = np.uint8
elif ty == "UINT16":
npty = np.uint16
Expand Down Expand Up @@ -67,4 +68,4 @@ def extract_request(self) -> List:
shape = inputs["shape"]
data = inputs["data"]
arr = _create_np_from_v2(data, data_type, shape)
return arr.tolist()
return arr.tolist()
11 changes: 8 additions & 3 deletions components/alibi-detect-server/adserver/tests/test_cd_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def predict(
cd["data"]["threshold"] = 0.1
return cd


class TestDummyCDModel(TestCase):
def test_basic(self):
model = DummyCDModel()
Expand Down Expand Up @@ -53,14 +54,18 @@ def test_batch(self):
res = ad_model.process_event(req, headers)
self.assertEqual(res, None)

class TestTextDriftModel(TestCase):

class TestTextDriftModel(TestCase):
def test_basic(self):
model = DummyCDModel()
ad_model = AlibiDetectConceptDriftModel(
"imdb_text_drift", "gs://seldon-models/alibi-detect/cd/ks/imdb-0_4_4", drift_batch_size=2
"imdb_text_drift",
"gs://seldon-models/alibi-detect/cd/ks/imdb-0_4_4",
drift_batch_size=2,
)
req = ["This movie is NOT the same as the 1954 version with Judy Garland and James Mason, and that is a shame because the 1954 version is, in my opinion, much better. I am not denying Barbra Streisand's talent at all. She is a good actress and brilliant singer. I am not acquainted with Kris Kristofferson's other work and therefore I can't pass judgment on it. However, this movie leaves much to be desired. It is paced slowly, it has gratuitous nudity and foul language, and can be very difficult to sit through.<br /><br />However, I am not a big fan of rock music, so it's only natural that I would like the Judy Garland version better. See the 1976 film with Barbra and Kris, and judge for yourself."]
req = [
"This movie is NOT the same as the 1954 version with Judy Garland and James Mason, and that is a shame because the 1954 version is, in my opinion, much better. I am not denying Barbra Streisand's talent at all. She is a good actress and brilliant singer. I am not acquainted with Kris Kristofferson's other work and therefore I can't pass judgment on it. However, this movie leaves much to be desired. It is paced slowly, it has gratuitous nudity and foul language, and can be very difficult to sit through.<br /><br />However, I am not a big fan of rock music, so it's only natural that I would like the Judy Garland version better. See the 1976 film with Barbra and Kris, and judge for yourself."
]
headers = {}
ad_model.load()
res = ad_model.process_event(req, headers)
Expand Down
44 changes: 36 additions & 8 deletions components/alibi-detect-server/adserver/tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ def test_basic(self):
"/",
method="POST",
body=dataStr,
headers={customHeaderKey: customHeaderVal, "ce-source":"a.b.c","ce-type":"d.e.f","ce-id":"1234","ce-specversion":"1.0"},
headers={
customHeaderKey: customHeaderVal,
"ce-source": "a.b.c",
"ce-type": "d.e.f",
"ce-id": "1234",
"ce-specversion": "1.0",
},
)
self.assertEqual(response.code, 200)
expectedResponse = json.dumps(DummyModel.getResponse())
Expand All @@ -85,17 +91,27 @@ def setupEnv(self):
def get_app(self):
self.setupEnv()
server = CEServer(
Protocol.kfserving_http, self.eventType, self.eventSource, 9000, self.replyUrl
Protocol.kfserving_http,
self.eventType,
self.eventSource,
9000,
self.replyUrl,
)
model = DummyModel("name")
server.register_model(model)
return server.create_application()

def test_basic(self):
data = {"inputs": [{"name":"input_1",
"datatype": "FP32",
"shape": [1, 3],
"data": [1, 2, 3]}]}
data = {
"inputs": [
{
"name": "input_1",
"datatype": "FP32",
"shape": [1, 3],
"data": [1, 2, 3],
}
]
}
dataStr = json.dumps(data)
with requests_mock.Mocker() as m:
m.post(self.replyUrl, text="resp")
Expand All @@ -104,7 +120,13 @@ def test_basic(self):
"/",
method="POST",
body=dataStr,
headers={customHeaderKey: customHeaderVal, "ce-source":"a.b.c","ce-type":"d.e.f","ce-id":"1234","ce-specversion":"1.0"},
headers={
customHeaderKey: customHeaderVal,
"ce-source": "a.b.c",
"ce-type": "d.e.f",
"ce-id": "1234",
"ce-specversion": "1.0",
},
)
self.assertEqual(response.code, 200)
expectedResponse = json.dumps(DummyModel.getResponse())
Expand Down Expand Up @@ -141,7 +163,13 @@ def test_basic(self):
"/",
method="POST",
body=dataStr,
headers={customHeaderKey: customHeaderVal, "ce-source":"a.b.c","ce-type":"d.e.f","ce-id":"1234","ce-specversion":"1.0"},
headers={
customHeaderKey: customHeaderVal,
"ce-source": "a.b.c",
"ce-type": "d.e.f",
"ce-id": "1234",
"ce-specversion": "1.0",
},
)
self.assertEqual(response.code, 200)
self.assertEqual(response.body, b"")
Expand Down
2 changes: 1 addition & 1 deletion components/alibi-detect-server/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"google-cloud-core==1.4.1",
"google-cloud-storage==1.31.2",
"seldon_core",
"transformers==3.5.1"
"transformers==3.5.1",
],
tests_require=tests_require,
extras_require={"test": tests_require},
Expand Down
5 changes: 2 additions & 3 deletions helm-charts/seldon-abtest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ helm install $MY_MODEL_NAME seldonio/seldon-abtest --namespace $MODELS_NAMESPACE
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| modela.image.name | string | `"seldonio/mock_classifier"` | |
| modela.image.version | float | `1.3` | |
| modela.image.version | string | `"1.6.0-dev"` | |
| modela.name | string | `"classifier-1"` | |
| modelb.image.name | string | `"seldonio/mock_classifier"` | |
| modelb.image.version | float | `1.3` | |
| modelb.image.version | string | `"1.6.0-dev"` | |
| modelb.name | string | `"classifier-2"` | |
| predictor.name | string | `"default"` | |
| protocol | string | `"REST"` | |
| replicas | int | `1` | |
| separate_pods | bool | `true` | |
| traffic_modela_percentage | float | `0.5` | |
2 changes: 1 addition & 1 deletion helm-charts/seldon-core-analytics/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# seldon-core-analytics

![Version: 1.5.0-dev](https://img.shields.io/static/v1?label=Version&message=1.5.0--dev&color=informational&style=flat-square)
![Version: 1.6.0-dev](https://img.shields.io/static/v1?label=Version&message=1.6.0--dev&color=informational&style=flat-square)

Prometheus and Grafana installation with a basic Grafana dashboard showing
the default Prometheus metrics exposed by Seldon for each inference graph
Expand Down
49 changes: 20 additions & 29 deletions helm-charts/seldon-core-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# seldon-core-operator

![Version: 1.5.0-dev](https://img.shields.io/static/v1?label=Version&message=1.5.0--dev&color=informational&style=flat-square)
![Version: 1.6.0-dev](https://img.shields.io/static/v1?label=Version&message=1.6.0--dev&color=informational&style=flat-square)

Seldon Core CRD and controller helm chart for Kubernetes.

Expand Down Expand Up @@ -45,7 +45,7 @@ helm install seldon-core-operator seldonio/seldon-core-operator --namespace seld
| engine.image.pullPolicy | string | `"IfNotPresent"` | |
| engine.image.registry | string | `"docker.io"` | |
| engine.image.repository | string | `"seldonio/engine"` | |
| engine.image.tag | string | `"1.5.0-dev"` | |
| engine.image.tag | string | `"1.6.0-dev"` | |
| engine.logMessagesExternally | bool | `false` | |
| engine.port | int | `8000` | |
| engine.prometheus.path | string | `"/prometheus"` | |
Expand All @@ -55,11 +55,10 @@ helm install seldon-core-operator seldonio/seldon-core-operator --namespace seld
| engine.resources.memoryRequest | string | `"512Mi"` | |
| engine.serviceAccount.name | string | `"default"` | |
| engine.user | int | `8888` | |
| executor.enabled | bool | `true` | |
| executor.image.pullPolicy | string | `"IfNotPresent"` | |
| executor.image.registry | string | `"docker.io"` | |
| executor.image.repository | string | `"seldonio/seldon-core-executor"` | |
| executor.image.tag | string | `"1.5.0-dev"` | |
| executor.image.tag | string | `"1.6.0-dev"` | |
| executor.metricsPortName | string | `"metrics"` | |
| executor.port | int | `8000` | |
| executor.prometheus.path | string | `"/prometheus"` | |
Expand All @@ -70,11 +69,11 @@ helm install seldon-core-operator seldonio/seldon-core-operator --namespace seld
| executor.resources.memoryRequest | string | `"512Mi"` | |
| executor.serviceAccount.name | string | `"default"` | |
| executor.user | int | `8888` | |
| explainer.image | string | `"seldonio/alibiexplainer:1.5.0-dev"` | |
| explainer.image | string | `"seldonio/alibiexplainer:1.6.0-dev"` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.registry | string | `"docker.io"` | |
| image.repository | string | `"seldonio/seldon-core-operator"` | |
| image.tag | string | `"1.5.0-dev"` | |
| image.tag | string | `"1.6.0-dev"` | |
| istio.enabled | bool | `false` | |
| istio.gateway | string | `"istio-system/seldon-gateway"` | |
| istio.tlsMode | string | `""` | |
Expand All @@ -85,35 +84,27 @@ helm install seldon-core-operator seldonio/seldon-core-operator --namespace seld
| manager.memoryLimit | string | `"300Mi"` | |
| manager.memoryRequest | string | `"200Mi"` | |
| managerCreateResources | bool | `false` | |
| managerUserID | int | `8888` | |
| namespaceOverride | string | `""` | |
| predictiveUnit.defaultEnvSecretRefName | string | `""` | |
| predictiveUnit.metricsPortName | string | `"metrics"` | |
| predictiveUnit.port | int | `9000` | |
| predictor_servers.MLFLOW_SERVER.grpc.defaultImageVersion | string | `"1.5.0-dev"` | |
| predictor_servers.MLFLOW_SERVER.grpc.image | string | `"seldonio/mlflowserver_grpc"` | |
| predictor_servers.MLFLOW_SERVER.rest.defaultImageVersion | string | `"1.5.0-dev"` | |
| predictor_servers.MLFLOW_SERVER.rest.image | string | `"seldonio/mlflowserver_rest"` | |
| predictor_servers.SKLEARN_SERVER.grpc.defaultImageVersion | string | `"1.5.0-dev"` | |
| predictor_servers.SKLEARN_SERVER.grpc.image | string | `"seldonio/sklearnserver_grpc"` | |
| predictor_servers.MLFLOW_SERVER.protocols.seldon.defaultImageVersion | string | `"1.6.0-dev"` | |
| predictor_servers.MLFLOW_SERVER.protocols.seldon.image | string | `"seldonio/mlflowserver"` | |
| predictor_servers.SKLEARN_SERVER.protocols.kfserving.defaultImageVersion | string | `"0.1.1"` | |
| predictor_servers.SKLEARN_SERVER.protocols.kfserving.image | string | `"seldonio/mlserver"` | |
| predictor_servers.SKLEARN_SERVER.rest.defaultImageVersion | string | `"1.5.0-dev"` | |
| predictor_servers.SKLEARN_SERVER.rest.image | string | `"seldonio/sklearnserver_rest"` | |
| predictor_servers.TENSORFLOW_SERVER.grpc.defaultImageVersion | string | `"1.5.0-dev"` | |
| predictor_servers.TENSORFLOW_SERVER.grpc.image | string | `"seldonio/tfserving-proxy_grpc"` | |
| predictor_servers.TENSORFLOW_SERVER.rest.defaultImageVersion | string | `"1.5.0-dev"` | |
| predictor_servers.TENSORFLOW_SERVER.rest.image | string | `"seldonio/tfserving-proxy_rest"` | |
| predictor_servers.TENSORFLOW_SERVER.tensorflow | bool | `true` | |
| predictor_servers.TENSORFLOW_SERVER.tfImage | string | `"tensorflow/serving:2.1.0"` | |
| predictor_servers.TRITON_SERVER.grpc.defaultImageVersion | string | `"20.08-py3"` | |
| predictor_servers.TRITON_SERVER.grpc.image | string | `"nvcr.io/nvidia/tritonserver"` | |
| predictor_servers.TRITON_SERVER.rest.defaultImageVersion | string | `"20.08-py3"` | |
| predictor_servers.TRITON_SERVER.rest.image | string | `"nvcr.io/nvidia/tritonserver"` | |
| predictor_servers.XGBOOST_SERVER.grpc.defaultImageVersion | string | `"1.5.0-dev"` | |
| predictor_servers.XGBOOST_SERVER.grpc.image | string | `"seldonio/xgboostserver_grpc"` | |
| predictor_servers.SKLEARN_SERVER.protocols.seldon.defaultImageVersion | string | `"1.6.0-dev"` | |
| predictor_servers.SKLEARN_SERVER.protocols.seldon.image | string | `"seldonio/sklearnserver"` | |
| predictor_servers.TENSORFLOW_SERVER.protocols.seldon.defaultImageVersion | string | `"1.6.0-dev"` | |
| predictor_servers.TENSORFLOW_SERVER.protocols.seldon.image | string | `"seldonio/tfserving-proxy"` | |
| predictor_servers.TENSORFLOW_SERVER.protocols.tensorflow.defaultImageVersion | string | `"2.1.0"` | |
| predictor_servers.TENSORFLOW_SERVER.protocols.tensorflow.image | string | `"tensorflow/serving"` | |
| predictor_servers.TRITON_SERVER.protocols.kfserving.defaultImageVersion | string | `"20.08-py3"` | |
| predictor_servers.TRITON_SERVER.protocols.kfserving.image | string | `"nvcr.io/nvidia/tritonserver"` | |
| predictor_servers.XGBOOST_SERVER.protocols.kfserving.defaultImageVersion | string | `"0.1.1"` | |
| predictor_servers.XGBOOST_SERVER.protocols.kfserving.image | string | `"seldonio/mlserver"` | |
| predictor_servers.XGBOOST_SERVER.rest.defaultImageVersion | string | `"1.5.0-dev"` | |
| predictor_servers.XGBOOST_SERVER.rest.image | string | `"seldonio/xgboostserver_rest"` | |
| predictor_servers.XGBOOST_SERVER.protocols.seldon.defaultImageVersion | string | `"1.6.0-dev"` | |
| predictor_servers.XGBOOST_SERVER.protocols.seldon.image | string | `"seldonio/xgboostserver"` | |
| rbac.configmap.create | bool | `true` | |
| rbac.create | bool | `true` | |
| serviceAccount.create | bool | `true` | |
Expand All @@ -125,4 +116,4 @@ helm install seldon-core-operator seldonio/seldon-core-operator --namespace seld
| storageInitializer.memoryLimit | string | `"1Gi"` | |
| storageInitializer.memoryRequest | string | `"100Mi"` | |
| usageMetrics.enabled | bool | `false` | |
| webhook.port | int | `443` | |
| webhook.port | int | `4443` | |
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ spec:
- name: ISTIO_TLS_MODE
value: '{{ .Values.istio.tlsMode }}'
- name: USE_EXECUTOR
value: '{{ .Values.executor.enabled }}'
value: 'true'
- name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION
value: '{{ .Values.executor.image.registry }}/{{ .Values.executor.image.repository }}:{{ .Values.executor.image.tag }}'
- name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY
Expand Down
28 changes: 14 additions & 14 deletions helm-charts/seldon-core-operator/templates/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@
{{- $cert := genSignedCert "seldon-webhook-service" nil $altNames 365 $ca -}}
---

{{- if not .Values.certManager.enabled -}}
apiVersion: v1
data:
ca.crt: '{{ $ca.Cert | b64enc }}'
tls.crt: '{{ $cert.Cert | b64enc }}'
tls.key: '{{ $cert.Key | b64enc }}'
kind: Secret
metadata:
name: seldon-webhook-server-cert
namespace: '{{ include "seldon.namespace" . }}'
type: kubernetes.io/tls
{{- end }}
---

apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
Expand Down Expand Up @@ -186,6 +172,20 @@ webhooks:
sideEffects: None
---

{{- if not .Values.certManager.enabled -}}
apiVersion: v1
data:
ca.crt: '{{ $ca.Cert | b64enc }}'
tls.crt: '{{ $cert.Cert | b64enc }}'
tls.key: '{{ $cert.Key | b64enc }}'
kind: Secret
metadata:
name: seldon-webhook-server-cert
namespace: '{{ include "seldon.namespace" . }}'
type: kubernetes.io/tls
{{- end }}
---

apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
Expand Down
1 change: 0 additions & 1 deletion helm-charts/seldon-core-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ managerUserID: 8888
# ## Service Orchestrator (Executor)
# The executor is the default service orchestrator which has superceeded the "Java Engine"
executor:
enabled: true
port: 8000
metricsPortName: metrics
image:
Expand Down
11 changes: 4 additions & 7 deletions helm-charts/seldon-mab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,17 @@ helm install $MY_MODEL_NAME seldonio/seldon-mab --namespace $MODELS_NAMESPACE
| mab.branches | int | `2` | |
| mab.epsilon | float | `0.2` | |
| mab.image.name | string | `"seldonio/mab_epsilon_greedy"` | |
| mab.image.version | float | `1.3` | |
| mab.image.version | string | `"1.6.0-dev"` | |
| mab.name | string | `"eg-router"` | |
| mab.verbose | int | `1` | |
| modela.endpoint | string | `"REST"` | |
| modela.image.name | string | `"seldonio/mock_classifier"` | |
| modela.image.version | float | `1.3` | |
| modela.image.version | string | `"1.6.0-dev"` | |
| modela.name | string | `"classifier-1"` | |
| modelb.endpoint | string | `"REST"` | |
| modelb.image.name | string | `"seldonio/mock_classifier"` | |
| modelb.image.version | float | `1.3` | |
| modelb.image.version | string | `"1.6.0-dev"` | |
| modelb.name | string | `"classifier-2"` | |
| predictor.name | string | `"default"` | |
| predictorLabels.fluentd | string | `"true"` | |
| predictorLabels.version | string | `"v1"` | |
| protocol | string | `"REST"` | |
| predictorLabels.version | string | `"1.6.0-dev"` | |
| replicas | int | `1` | |
| sdepLabels.app | string | `"seldon"` | |
1 change: 0 additions & 1 deletion helm-charts/seldon-single-model/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ helm install $MY_MODEL_NAME seldonio/seldon-single-model --namespace $MODELS_NAM
| model.uri | string | `""` | Model's URI for prepackaged model server |
| protocol | string | `"seldon"` | |
| replicas | int | `1` | Number of replicas for the predictor |
| transport | string | `"rest"` | |
Loading