From 0759f177bf040b5aba350bea6b1967d3dca933e6 Mon Sep 17 00:00:00 2001 From: Clive Cox Date: Thu, 6 May 2021 14:04:56 +0100 Subject: [PATCH 1/2] Version 0.1.0 --- tempo/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tempo/version.py b/tempo/version.py index 86b304a4..3dc1f76b 100644 --- a/tempo/version.py +++ b/tempo/version.py @@ -1 +1 @@ -__version__ = "0.1.0.dev12" +__version__ = "0.1.0" From 7d4298f22afd57aeae063a9f497c6310aa9215a6 Mon Sep 17 00:00:00 2001 From: Clive Cox Date: Thu, 6 May 2021 14:51:17 +0100 Subject: [PATCH 2/2] Update examples --- docs/examples/custom-model/README.ipynb | 29 +- docs/examples/custom-model/README.md | 2 +- docs/examples/custom-model/src/tempo.py | 1 - docs/examples/explainer/README.ipynb | 218 ++--------- docs/examples/explainer/README.md | 2 +- docs/examples/multi-model/README.ipynb | 352 ++--------------- docs/examples/outlier/README.ipynb | 491 ++---------------------- 7 files changed, 108 insertions(+), 987 deletions(-) diff --git a/docs/examples/custom-model/README.ipynb b/docs/examples/custom-model/README.ipynb index c58ef579..05761c00 100644 --- a/docs/examples/custom-model/README.ipynb +++ b/docs/examples/custom-model/README.ipynb @@ -115,30 +115,9 @@ }, { "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "sample: 100%|██████████| 3000/3000 [00:09<00:00, 325.84it/s, 3 steps of size 7.77e-01. acc. prob=0.91]\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - " mean std median 5.0% 95.0% n_eff r_hat\n", - " a -0.00 0.11 -0.00 -0.17 0.17 1794.52 1.00\n", - " bM 0.35 0.13 0.35 0.14 0.56 1748.73 1.00\n", - " sigma 0.94 0.10 0.94 0.77 1.09 2144.79 1.00\n", - "\n", - "Number of divergences: 0\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "import os\n", "from tempo.utils import logger\n", @@ -328,7 +307,7 @@ "outputs": [], "source": [ "from tempo.serve.loader import save\n", - "save(numpyro_divorce, save_env=False)" + "save(numpyro_divorce)" ] }, { diff --git a/docs/examples/custom-model/README.md b/docs/examples/custom-model/README.md index 6db5959e..a5972a87 100644 --- a/docs/examples/custom-model/README.md +++ b/docs/examples/custom-model/README.md @@ -218,7 +218,7 @@ We'll deploy first to Docker to test. ```python from tempo.serve.loader import save -save(numpyro_divorce, save_env=False) +save(numpyro_divorce) ``` diff --git a/docs/examples/custom-model/src/tempo.py b/docs/examples/custom-model/src/tempo.py index 626861e4..727f98fb 100644 --- a/docs/examples/custom-model/src/tempo.py +++ b/docs/examples/custom-model/src/tempo.py @@ -49,7 +49,6 @@ def load_numpyro_divorce(): for k, v in raw_samples.items(): samples[k] = np.array(v) - print(model_function.__module__) numpyro_divorce.context.predictive_dist = Predictive(model_function, samples) return numpyro_divorce diff --git a/docs/examples/explainer/README.ipynb b/docs/examples/explainer/README.ipynb index afa54376..c0927c4b 100644 --- a/docs/examples/explainer/README.ipynb +++ b/docs/examples/explainer/README.ipynb @@ -68,7 +68,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "42c20ffa", "metadata": {}, "outputs": [], @@ -89,7 +89,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "aa35a350", "metadata": {}, "outputs": [], @@ -101,19 +101,10 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "9bc17ab0", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Train accuracy: 0.9656333333333333\n", - "Test accuracy: 0.854296875\n" - ] - } - ], + "outputs": [], "source": [ "from src.model import train_model\n", "\n", @@ -122,26 +113,10 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "7afce019", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "AnchorTabular(meta={\n", - " 'name': 'AnchorTabular',\n", - " 'type': ['blackbox'],\n", - " 'explanations': ['local'],\n", - " 'params': {'disc_perc': (25, 50, 75), 'seed': 1}}\n", - ")" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from src.explainer import train_explainer\n", "\n", @@ -158,7 +133,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "a8345fb6", "metadata": {}, "outputs": [], @@ -263,12 +238,12 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "3c23ab3b", "metadata": {}, "outputs": [], "source": [ - "tempo.save(Explainer, save_env=False)" + "tempo.save(Explainer)" ] }, { @@ -283,7 +258,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "a36bfb9f", "metadata": {}, "outputs": [], @@ -297,19 +272,10 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "fb09a516", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Explain called with {'threshold': 0.9}\n", - "['Marital Status = Separated', 'Sex = Female']\n" - ] - } - ], + "outputs": [], "source": [ "r = json.loads(explainer(payload=data.X_test[0:1], parameters={\"threshold\":0.90}))\n", "print(r[\"data\"][\"anchor\"])" @@ -317,18 +283,10 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "b22014e7", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['Marital Status = Separated', 'Sex = Female', 'Relationship = Unmarried', 'Capital Gain <= 0.00']\n" - ] - } - ], + "outputs": [], "source": [ "r = json.loads(explainer.remote(payload=data.X_test[0:1], parameters={\"threshold\":0.99}))\n", "print(r[\"data\"][\"anchor\"])" @@ -336,7 +294,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "6c6ea7c7", "metadata": {}, "outputs": [], @@ -364,28 +322,17 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "id": "d8d2fb32", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "secret/minio-secret configured\r\n", - "serviceaccount/tempo-pipeline unchanged\r\n", - "role.rbac.authorization.k8s.io/tempo-pipeline unchanged\r\n", - "rolebinding.rbac.authorization.k8s.io/tempo-pipeline-rolebinding unchanged\r\n" - ] - } - ], + "outputs": [], "source": [ "!kubectl apply -f k8s/rbac -n production" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "9fa80565", "metadata": {}, "outputs": [], @@ -397,7 +344,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "id": "39ff404c", "metadata": {}, "outputs": [], @@ -408,7 +355,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "id": "c56b5ca7", "metadata": {}, "outputs": [], @@ -425,7 +372,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "id": "363a9b61", "metadata": {}, "outputs": [], @@ -439,18 +386,10 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "id": "97b59a44", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['Marital Status = Separated', 'Sex = Female']\n" - ] - } - ], + "outputs": [], "source": [ "r = json.loads(explainer.remote(payload=data.X_test[0:1], parameters={\"threshold\":0.95}))\n", "print(r[\"data\"][\"anchor\"])" @@ -458,7 +397,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "id": "c789f08b", "metadata": {}, "outputs": [], @@ -479,7 +418,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "id": "69ee5f4a", "metadata": {}, "outputs": [], @@ -495,113 +434,10 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "id": "748bd754", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "apiVersion: machinelearning.seldon.io/v1\r\n", - "kind: SeldonDeployment\r\n", - "metadata:\r\n", - " annotations:\r\n", - " seldon.io/tempo-description: \"\"\r\n", - " seldon.io/tempo-model: '{\"model_details\": {\"name\": \"income-explainer\", \"local_folder\":\r\n", - " \"/home/clive/work/mlops/fork-tempo/docs/examples/explainer/artifacts/explainer\",\r\n", - " \"uri\": \"s3://tempo/explainer/pipeline\", \"platform\": \"tempo\", \"inputs\": {\"args\":\r\n", - " [{\"ty\": \"numpy.ndarray\", \"name\": \"payload\"}, {\"ty\": \"builtins.dict\", \"name\":\r\n", - " \"parameters\"}]}, \"outputs\": {\"args\": [{\"ty\": \"builtins.str\", \"name\": null}]},\r\n", - " \"description\": \"\"}, \"protocol\": \"tempo.kfserving.protocol.KFServingV2Protocol\",\r\n", - " \"runtime_options\": {\"runtime\": \"tempo.seldon.SeldonKubernetesRuntime\", \"docker_options\":\r\n", - " {\"defaultRuntime\": \"tempo.seldon.SeldonDockerRuntime\"}, \"k8s_options\": {\"replicas\":\r\n", - " 1, \"minReplicas\": null, \"maxReplicas\": null, \"authSecretName\": \"minio-secret\",\r\n", - " \"serviceAccountName\": null, \"defaultRuntime\": \"tempo.seldon.SeldonKubernetesRuntime\",\r\n", - " \"namespace\": \"production\"}, \"ingress_options\": {\"ingress\": \"tempo.ingress.istio.IstioIngress\",\r\n", - " \"ssl\": false, \"verify_ssl\": true}}}'\r\n", - " labels:\r\n", - " seldon.io/tempo: \"true\"\r\n", - " name: income-explainer\r\n", - " namespace: production\r\n", - "spec:\r\n", - " predictors:\r\n", - " - componentSpecs:\r\n", - " - spec:\r\n", - " containers:\r\n", - " - args: []\r\n", - " env:\r\n", - " - name: MLSERVER_HTTP_PORT\r\n", - " value: \"9000\"\r\n", - " - name: MLSERVER_GRPC_PORT\r\n", - " value: \"9500\"\r\n", - " - name: MLSERVER_MODEL_IMPLEMENTATION\r\n", - " value: tempo.mlserver.InferenceRuntime\r\n", - " - name: MLSERVER_MODEL_NAME\r\n", - " value: income-explainer\r\n", - " - name: MLSERVER_MODEL_URI\r\n", - " value: /mnt/models\r\n", - " - name: TEMPO_RUNTIME_OPTIONS\r\n", - " value: '{\"runtime\": \"tempo.seldon.SeldonKubernetesRuntime\", \"docker_options\":\r\n", - " {\"defaultRuntime\": \"tempo.seldon.SeldonDockerRuntime\"}, \"k8s_options\":\r\n", - " {\"replicas\": 1, \"minReplicas\": null, \"maxReplicas\": null, \"authSecretName\":\r\n", - " \"minio-secret\", \"serviceAccountName\": null, \"defaultRuntime\": \"tempo.seldon.SeldonKubernetesRuntime\",\r\n", - " \"namespace\": \"production\"}, \"ingress_options\": {\"ingress\": \"tempo.ingress.istio.IstioIngress\",\r\n", - " \"ssl\": false, \"verify_ssl\": true}}'\r\n", - " image: seldonio/mlserver:0.3.1.dev7\r\n", - " name: income-explainer\r\n", - " resources:\r\n", - " limits:\r\n", - " cpu: 1\r\n", - " memory: 1Gi\r\n", - " requests:\r\n", - " cpu: 500m\r\n", - " memory: 500Mi\r\n", - " graph:\r\n", - " envSecretRefName: minio-secret\r\n", - " implementation: TRITON_SERVER\r\n", - " modelUri: s3://tempo/explainer/pipeline\r\n", - " name: income-explainer\r\n", - " serviceAccountName: tempo-pipeline\r\n", - " type: MODEL\r\n", - " name: default\r\n", - " replicas: 1\r\n", - " protocol: kfserving\r\n", - "---\r\n", - "apiVersion: machinelearning.seldon.io/v1\r\n", - "kind: SeldonDeployment\r\n", - "metadata:\r\n", - " annotations:\r\n", - " seldon.io/tempo-description: \"\"\r\n", - " seldon.io/tempo-model: '{\"model_details\": {\"name\": \"income-sklearn\", \"local_folder\":\r\n", - " \"/home/clive/work/mlops/fork-tempo/docs/examples/explainer/artifacts/model\",\r\n", - " \"uri\": \"gs://seldon-models/test/income/model\", \"platform\": \"sklearn\", \"inputs\":\r\n", - " {\"args\": [{\"ty\": \"numpy.ndarray\", \"name\": null}]}, \"outputs\": {\"args\": [{\"ty\":\r\n", - " \"numpy.ndarray\", \"name\": null}]}, \"description\": \"\"}, \"protocol\": \"tempo.kfserving.protocol.KFServingV2Protocol\",\r\n", - " \"runtime_options\": {\"runtime\": \"tempo.seldon.SeldonKubernetesRuntime\", \"docker_options\":\r\n", - " {\"defaultRuntime\": \"tempo.seldon.SeldonDockerRuntime\"}, \"k8s_options\": {\"replicas\":\r\n", - " 1, \"minReplicas\": null, \"maxReplicas\": null, \"authSecretName\": \"minio-secret\",\r\n", - " \"serviceAccountName\": null, \"defaultRuntime\": \"tempo.seldon.SeldonKubernetesRuntime\",\r\n", - " \"namespace\": \"production\"}, \"ingress_options\": {\"ingress\": \"tempo.ingress.istio.IstioIngress\",\r\n", - " \"ssl\": false, \"verify_ssl\": true}}}'\r\n", - " labels:\r\n", - " seldon.io/tempo: \"true\"\r\n", - " name: income-sklearn\r\n", - " namespace: production\r\n", - "spec:\r\n", - " predictors:\r\n", - " - graph:\r\n", - " envSecretRefName: minio-secret\r\n", - " implementation: SKLEARN_SERVER\r\n", - " modelUri: gs://seldon-models/test/income/model\r\n", - " name: income-sklearn\r\n", - " type: MODEL\r\n", - " name: default\r\n", - " replicas: 1\r\n", - " protocol: kfserving\r\n" - ] - } - ], + "outputs": [], "source": [ "!kustomize build k8s" ] diff --git a/docs/examples/explainer/README.md b/docs/examples/explainer/README.md index 4e577f57..5ee80788 100644 --- a/docs/examples/explainer/README.md +++ b/docs/examples/explainer/README.md @@ -157,7 +157,7 @@ def create_explainer(model: Model) -> Tuple[Model, Any]: ```python -tempo.save(Explainer, save_env=False) +tempo.save(Explainer) ``` ## Test Locally on Docker diff --git a/docs/examples/multi-model/README.ipynb b/docs/examples/multi-model/README.ipynb index 2f160fa2..909e9e92 100644 --- a/docs/examples/multi-model/README.ipynb +++ b/docs/examples/multi-model/README.ipynb @@ -43,34 +43,12 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "b8ca70f9", "metadata": { "scrolled": true }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[01;34m.\u001b[00m\r\n", - "├── \u001b[01;34martifacts\u001b[00m\r\n", - "│   ├── \u001b[01;34mclassifier\u001b[00m\r\n", - "│   ├── \u001b[01;34msklearn\u001b[00m\r\n", - "│   └── \u001b[01;34mxgboost\u001b[00m\r\n", - "├── \u001b[01;34mk8s\u001b[00m\r\n", - "│   └── \u001b[01;34mrbac\u001b[00m\r\n", - "├── \u001b[01;34msrc\u001b[00m\r\n", - "│   ├── data.py\r\n", - "│   ├── tempo.py\r\n", - "│   └── train.py\r\n", - "└── \u001b[01;34mtests\u001b[00m\r\n", - " └── test_tempo.py\r\n", - "\r\n", - "8 directories, 4 files\r\n" - ] - } - ], + "outputs": [], "source": [ "!tree -P \"*.py\" -I \"__init__.py|__pycache__\" -L 2" ] @@ -88,7 +66,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": null, "id": "42c20ffa", "metadata": {}, "outputs": [], @@ -138,26 +116,10 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "aa35a350", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[08:01:10] WARNING: ../src/learner.cc:1095: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softprob' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/clive/anaconda3/envs/tempo-examples/lib/python3.7/site-packages/xgboost/sklearn.py:1146: UserWarning: The use of label encoder in XGBClassifier is deprecated and will be removed in a future release. To remove this warning, do the following: 1) Pass option use_label_encoder=False when constructing XGBClassifier object; and 2) Encode your labels (y) as integers starting with 0, i.e. 0, 1, 2, ..., [num_class - 1].\n", - " warnings.warn(label_encoder_deprecation_msg, UserWarning)\n" - ] - } - ], + "outputs": [], "source": [ "from src.data import IrisData\n", "from src.train import train_sklearn, train_xgboost\n", @@ -179,7 +141,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "a8345fb6", "metadata": {}, "outputs": [], @@ -193,9 +155,7 @@ "execution_count": null, "id": "c0b0af26", "metadata": { - "code_folding": [ - 0 - ] + "code_folding": [] }, "outputs": [], "source": [ @@ -266,9 +226,7 @@ "execution_count": null, "id": "8159cbec", "metadata": { - "code_folding": [ - 0 - ] + "code_folding": [] }, "outputs": [], "source": [ @@ -296,26 +254,10 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "aa78ec19", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1m============================= test session starts ==============================\u001b[0m\n", - "platform linux -- Python 3.7.9, pytest-6.2.0, py-1.10.0, pluggy-0.13.1\n", - "rootdir: /home/clive/work/mlops/fork-tempo, configfile: setup.cfg\n", - "plugins: asyncio-0.14.0\n", - "collected 2 items \u001b[0m\u001b[1m\n", - "\n", - "tests/test_tempo.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [100%]\u001b[0m\n", - "\n", - "\u001b[32m============================== \u001b[32m\u001b[1m2 passed\u001b[0m\u001b[32m in 0.93s\u001b[0m\u001b[32m ===============================\u001b[0m\n" - ] - } - ], + "outputs": [], "source": [ "!python -m pytest tests/" ] @@ -332,45 +274,20 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "3e1f9017", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "name: tempo\r\n", - "channels:\r\n", - " - defaults\r\n", - "dependencies:\r\n", - " - python=3.7.9\r\n", - " - pip:\r\n", - " - mlops-tempo\r\n", - " - mlserver==0.3.1.dev7\r\n" - ] - } - ], + "outputs": [], "source": [ "!cat artifacts/classifier/conda.yaml" ] }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "id": "3c23ab3b", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Collecting packages...\n", - "Packing environment at '/home/clive/anaconda3/envs/tempo-84eeadae-64d8-4e9d-ac7e-a98c0568b79e' to '/home/clive/work/mlops/fork-tempo/docs/examples/multi-model/artifacts/classifier/environment.tar.gz'\n", - "[########################################] | 100% Completed | 10.8s\n" - ] - } - ], + "outputs": [], "source": [ "from tempo.serve.loader import save\n", "save(classifier)" @@ -388,7 +305,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "a36bfb9f", "metadata": {}, "outputs": [], @@ -401,41 +318,20 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "id": "fb09a516", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(array([[0.00847207, 0.03168793, 0.95984 ]], dtype=float32),\n", - " 'xgboost prediction')" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "classifier(np.array([[1, 2, 3, 4]]))" ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "id": "b22014e7", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'output0': array([1.], dtype=float32), 'output1': 'sklearn prediction'}\n", - "{'output0': array([[0.97329617, 0.02412145, 0.00258233]], dtype=float32), 'output1': 'xgboost prediction'}\n" - ] - } - ], + "outputs": [], "source": [ "print(classifier.remote(np.array([[0, 0, 0,0]])))\n", "print(classifier.remote(np.array([[5.964,4.006,2.081,1.031]])))" @@ -443,7 +339,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "id": "6c6ea7c7", "metadata": {}, "outputs": [], @@ -471,28 +367,17 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "id": "d8d2fb32", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "secret/minio-secret configured\r\n", - "serviceaccount/tempo-pipeline unchanged\r\n", - "role.rbac.authorization.k8s.io/tempo-pipeline unchanged\r\n", - "rolebinding.rbac.authorization.k8s.io/tempo-pipeline-rolebinding unchanged\r\n" - ] - } - ], + "outputs": [], "source": [ "!kubectl apply -f k8s/rbac -n production" ] }, { "cell_type": "code", - "execution_count": 27, + "execution_count": null, "id": "9fa80565", "metadata": {}, "outputs": [], @@ -504,7 +389,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": null, "id": "39ff404c", "metadata": {}, "outputs": [], @@ -517,7 +402,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": null, "id": "c56b5ca7", "metadata": {}, "outputs": [], @@ -533,7 +418,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": null, "id": "363a9b61", "metadata": {}, "outputs": [], @@ -546,19 +431,10 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": null, "id": "8feb662b", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'output0': array([1.], dtype=float32), 'output1': 'sklearn prediction'}\n", - "{'output0': array([[0.00847207, 0.03168794, 0.95984 ]], dtype=float32), 'output1': 'xgboost prediction'}\n" - ] - } - ], + "outputs": [], "source": [ "print(classifier.remote(payload=np.array([[0, 0, 0, 0]])))\n", "print(classifier.remote(payload=np.array([[1, 2, 3, 4]])))" @@ -574,21 +450,10 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "id": "e4b36170", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Name\tDescription\n", - "classifier\tA pipeline to use either an sklearn or xgboost model for Iris classification\n", - "test-iris-sklearn\tAn SKLearn Iris classification model\n", - "test-iris-xgboost\tAn XGBoost Iris classification model\n" - ] - } - ], + "outputs": [], "source": [ "models = k8s_runtime.list_models(namespace=\"production\")\n", "print(\"Name\\tDescription\")\n", @@ -599,29 +464,17 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "id": "21b46fdd", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'output0': array([[0.00847207, 0.03168794, 0.95984 ]], dtype=float32),\n", - " 'output1': 'xgboost prediction'}" - ] - }, - "execution_count": 23, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "models[0].remote(payload=np.array([[1, 2, 3, 4]]))" ] }, { "cell_type": "code", - "execution_count": 32, + "execution_count": null, "id": "f62f5f94", "metadata": {}, "outputs": [], @@ -642,7 +495,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "id": "69ee5f4a", "metadata": {}, "outputs": [], @@ -663,143 +516,10 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": null, "id": "748bd754", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "apiVersion: machinelearning.seldon.io/v1\r\n", - "kind: SeldonDeployment\r\n", - "metadata:\r\n", - " annotations:\r\n", - " seldon.io/tempo-description: A pipeline to use either an sklearn or xgboost model\r\n", - " for Iris classification\r\n", - " seldon.io/tempo-model: '{\"model_details\": {\"name\": \"classifier\", \"local_folder\":\r\n", - " \"/home/clive/work/mlops/fork-tempo/docs/examples/multi-model/artifacts/classifier\",\r\n", - " \"uri\": \"s3://tempo/basic/pipeline\", \"platform\": \"tempo\", \"inputs\": {\"args\":\r\n", - " [{\"ty\": \"numpy.ndarray\", \"name\": \"payload\"}]}, \"outputs\": {\"args\": [{\"ty\": \"numpy.ndarray\",\r\n", - " \"name\": null}, {\"ty\": \"builtins.str\", \"name\": null}]}, \"description\": \"A pipeline\r\n", - " to use either an sklearn or xgboost model for Iris classification\"}, \"protocol\":\r\n", - " \"tempo.kfserving.protocol.KFServingV2Protocol\", \"runtime_options\": {\"runtime\":\r\n", - " null, \"docker_options\": {\"defaultRuntime\": \"tempo.seldon.SeldonDockerRuntime\"},\r\n", - " \"k8s_options\": {\"replicas\": 1, \"minReplicas\": null, \"maxReplicas\": null, \"authSecretName\":\r\n", - " null, \"serviceAccountName\": null, \"defaultRuntime\": \"tempo.seldon.SeldonKubernetesRuntime\",\r\n", - " \"namespace\": \"default\"}, \"ingress_options\": {\"ingress\": \"tempo.ingress.istio.IstioIngress\",\r\n", - " \"ssl\": false, \"verify_ssl\": true}}}'\r\n", - " labels:\r\n", - " seldon.io/tempo: \"true\"\r\n", - " name: classifier\r\n", - " namespace: production\r\n", - "spec:\r\n", - " predictors:\r\n", - " - componentSpecs:\r\n", - " - spec:\r\n", - " containers:\r\n", - " - args: []\r\n", - " env:\r\n", - " - name: MLSERVER_HTTP_PORT\r\n", - " value: \"9000\"\r\n", - " - name: MLSERVER_GRPC_PORT\r\n", - " value: \"9500\"\r\n", - " - name: MLSERVER_MODEL_IMPLEMENTATION\r\n", - " value: tempo.mlserver.InferenceRuntime\r\n", - " - name: MLSERVER_MODEL_NAME\r\n", - " value: classifier\r\n", - " - name: MLSERVER_MODEL_URI\r\n", - " value: /mnt/models\r\n", - " - name: TEMPO_RUNTIME_OPTIONS\r\n", - " value: '{\"runtime\": null, \"docker_options\": {\"defaultRuntime\": \"tempo.seldon.SeldonDockerRuntime\"},\r\n", - " \"k8s_options\": {\"replicas\": 1, \"minReplicas\": null, \"maxReplicas\": null,\r\n", - " \"authSecretName\": null, \"serviceAccountName\": null, \"defaultRuntime\":\r\n", - " \"tempo.seldon.SeldonKubernetesRuntime\", \"namespace\": \"default\"}, \"ingress_options\":\r\n", - " {\"ingress\": \"tempo.ingress.istio.IstioIngress\", \"ssl\": false, \"verify_ssl\":\r\n", - " true}}'\r\n", - " image: seldonio/mlserver:0.3.1.dev7\r\n", - " name: classifier\r\n", - " resources:\r\n", - " limits:\r\n", - " cpu: 1\r\n", - " memory: 1Gi\r\n", - " requests:\r\n", - " cpu: 500m\r\n", - " memory: 500Mi\r\n", - " graph:\r\n", - " implementation: TRITON_SERVER\r\n", - " modelUri: s3://tempo/basic/pipeline\r\n", - " name: classifier\r\n", - " serviceAccountName: tempo-pipeline\r\n", - " type: MODEL\r\n", - " name: default\r\n", - " replicas: 1\r\n", - " protocol: kfserving\r\n", - "---\r\n", - "apiVersion: machinelearning.seldon.io/v1\r\n", - "kind: SeldonDeployment\r\n", - "metadata:\r\n", - " annotations:\r\n", - " seldon.io/tempo-description: An SKLearn Iris classification model\r\n", - " seldon.io/tempo-model: '{\"model_details\": {\"name\": \"test-iris-sklearn\", \"local_folder\":\r\n", - " \"/home/clive/work/mlops/fork-tempo/docs/examples/multi-model/artifacts/sklearn\",\r\n", - " \"uri\": \"s3://tempo/basic/sklearn\", \"platform\": \"sklearn\", \"inputs\": {\"args\":\r\n", - " [{\"ty\": \"numpy.ndarray\", \"name\": null}]}, \"outputs\": {\"args\": [{\"ty\": \"numpy.ndarray\",\r\n", - " \"name\": null}]}, \"description\": \"An SKLearn Iris classification model\"}, \"protocol\":\r\n", - " \"tempo.kfserving.protocol.KFServingV2Protocol\", \"runtime_options\": {\"runtime\":\r\n", - " null, \"docker_options\": {\"defaultRuntime\": \"tempo.seldon.SeldonDockerRuntime\"},\r\n", - " \"k8s_options\": {\"replicas\": 1, \"minReplicas\": null, \"maxReplicas\": null, \"authSecretName\":\r\n", - " null, \"serviceAccountName\": null, \"defaultRuntime\": \"tempo.seldon.SeldonKubernetesRuntime\",\r\n", - " \"namespace\": \"default\"}, \"ingress_options\": {\"ingress\": \"tempo.ingress.istio.IstioIngress\",\r\n", - " \"ssl\": false, \"verify_ssl\": true}}}'\r\n", - " labels:\r\n", - " seldon.io/tempo: \"true\"\r\n", - " name: test-iris-sklearn\r\n", - " namespace: production\r\n", - "spec:\r\n", - " predictors:\r\n", - " - graph:\r\n", - " implementation: SKLEARN_SERVER\r\n", - " modelUri: s3://tempo/basic/sklearn\r\n", - " name: test-iris-sklearn\r\n", - " type: MODEL\r\n", - " name: default\r\n", - " replicas: 1\r\n", - " protocol: kfserving\r\n", - "---\r\n", - "apiVersion: machinelearning.seldon.io/v1\r\n", - "kind: SeldonDeployment\r\n", - "metadata:\r\n", - " annotations:\r\n", - " seldon.io/tempo-description: An XGBoost Iris classification model\r\n", - " seldon.io/tempo-model: '{\"model_details\": {\"name\": \"test-iris-xgboost\", \"local_folder\":\r\n", - " \"/home/clive/work/mlops/fork-tempo/docs/examples/multi-model/artifacts/xgboost\",\r\n", - " \"uri\": \"s3://tempo/basic/xgboost\", \"platform\": \"xgboost\", \"inputs\": {\"args\":\r\n", - " [{\"ty\": \"numpy.ndarray\", \"name\": null}]}, \"outputs\": {\"args\": [{\"ty\": \"numpy.ndarray\",\r\n", - " \"name\": null}]}, \"description\": \"An XGBoost Iris classification model\"}, \"protocol\":\r\n", - " \"tempo.kfserving.protocol.KFServingV2Protocol\", \"runtime_options\": {\"runtime\":\r\n", - " null, \"docker_options\": {\"defaultRuntime\": \"tempo.seldon.SeldonDockerRuntime\"},\r\n", - " \"k8s_options\": {\"replicas\": 1, \"minReplicas\": null, \"maxReplicas\": null, \"authSecretName\":\r\n", - " null, \"serviceAccountName\": null, \"defaultRuntime\": \"tempo.seldon.SeldonKubernetesRuntime\",\r\n", - " \"namespace\": \"default\"}, \"ingress_options\": {\"ingress\": \"tempo.ingress.istio.IstioIngress\",\r\n", - " \"ssl\": false, \"verify_ssl\": true}}}'\r\n", - " labels:\r\n", - " seldon.io/tempo: \"true\"\r\n", - " name: test-iris-xgboost\r\n", - " namespace: production\r\n", - "spec:\r\n", - " predictors:\r\n", - " - graph:\r\n", - " implementation: XGBOOST_SERVER\r\n", - " modelUri: s3://tempo/basic/xgboost\r\n", - " name: test-iris-xgboost\r\n", - " type: MODEL\r\n", - " name: default\r\n", - " replicas: 1\r\n", - " protocol: kfserving\r\n" - ] - } - ], + "outputs": [], "source": [ "!kustomize build k8s" ] diff --git a/docs/examples/outlier/README.ipynb b/docs/examples/outlier/README.ipynb index 0b53eca1..79bfd841 100644 --- a/docs/examples/outlier/README.ipynb +++ b/docs/examples/outlier/README.ipynb @@ -45,36 +45,12 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "b8ca70f9", "metadata": { "scrolled": true }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[01;34m.\u001b[00m\r\n", - "├── \u001b[01;34martifacts\u001b[00m\r\n", - "│   ├── \u001b[01;34mmodel\u001b[00m\r\n", - "│   ├── \u001b[01;34moutlier\u001b[00m\r\n", - "│   └── \u001b[01;34msvc\u001b[00m\r\n", - "├── \u001b[01;34mk8s\u001b[00m\r\n", - "│   └── \u001b[01;34mrbac\u001b[00m\r\n", - "├── \u001b[01;34msrc\u001b[00m\r\n", - "│   ├── constants.py\r\n", - "│   ├── data.py\r\n", - "│   ├── outlier.py\r\n", - "│   ├── tempo.py\r\n", - "│   └── utils.py\r\n", - "└── \u001b[01;34mtests\u001b[00m\r\n", - " └── test_tempo.py\r\n", - "\r\n", - "8 directories, 6 files\r\n" - ] - } - ], + "outputs": [], "source": [ "!tree -P \"*.py\" -I \"__init__.py|__pycache__\" -L 2" ] @@ -92,7 +68,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "42c20ffa", "metadata": {}, "outputs": [], @@ -111,18 +87,10 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "aa35a350", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "(50000, 32, 32, 3) (50000, 1) (10000, 32, 32, 3) (10000, 1)\n" - ] - } - ], + "outputs": [], "source": [ "from src.data import Cifar10\n", "data = Cifar10()" @@ -138,7 +106,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "1ce59700", "metadata": {}, "outputs": [], @@ -156,7 +124,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "e7bafec3", "metadata": {}, "outputs": [], @@ -179,18 +147,10 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "a8345fb6", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Loading from /home/clive/work/mlops/fork-tempo/docs/examples/outlier/artifacts/outlier\n" - ] - } - ], + "outputs": [], "source": [ "from src.tempo import create_outlier_cls, create_model, create_svc_cls\n", "\n", @@ -342,46 +302,10 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "aa78ec19", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[1m============================= test session starts ==============================\u001b[0m\n", - "platform linux -- Python 3.7.9, pytest-6.2.0, py-1.10.0, pluggy-0.13.1\n", - "rootdir: /home/clive/work/mlops/fork-tempo, configfile: setup.cfg\n", - "plugins: asyncio-0.14.0\n", - "collected 2 items \u001b[0m\u001b[1m\n", - "\n", - "tests/test_tempo.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[33m [100%]\u001b[0m\n", - "\n", - "\u001b[33m=============================== warnings summary ===============================\u001b[0m\n", - "../../../../../../anaconda3/envs/tempo-examples/lib/python3.7/site-packages/tensorflow/python/autograph/impl/api.py:22\n", - " /home/clive/anaconda3/envs/tempo-examples/lib/python3.7/site-packages/tensorflow/python/autograph/impl/api.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses\n", - " import imp\n", - "\n", - "../../../../../../anaconda3/envs/tempo-examples/lib/python3.7/site-packages/packaging/version.py:130\n", - " /home/clive/anaconda3/envs/tempo-examples/lib/python3.7/site-packages/packaging/version.py:130: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release\n", - " DeprecationWarning,\n", - "\n", - "-- Docs: https://docs.pytest.org/en/stable/warnings.html\n", - "\u001b[33m======================== \u001b[32m2 passed\u001b[0m, \u001b[33m\u001b[1m2 warnings\u001b[0m\u001b[33m in 2.95s\u001b[0m\u001b[33m =========================\u001b[0m\n", - "Unresolved object in checkpoint: (root).encoder.fc_mean.kernel\n", - "Unresolved object in checkpoint: (root).encoder.fc_mean.bias\n", - "Unresolved object in checkpoint: (root).encoder.fc_log_var.kernel\n", - "Unresolved object in checkpoint: (root).encoder.fc_log_var.bias\n", - "A checkpoint was restored (e.g. tf.train.Checkpoint.restore or tf.keras.Model.load_weights) but not all checkpointed values were used. See above for specific issues. Use expect_partial() on the load status object, e.g. tf.train.Checkpoint.restore(...).expect_partial(), to silence these warnings, or use assert_consumed() to make the check explicit. See https://www.tensorflow.org/guide/checkpoint#loading_mechanics for details.\n", - "Unresolved object in checkpoint: (root).encoder.fc_mean.kernel\n", - "Unresolved object in checkpoint: (root).encoder.fc_mean.bias\n", - "Unresolved object in checkpoint: (root).encoder.fc_log_var.kernel\n", - "Unresolved object in checkpoint: (root).encoder.fc_log_var.bias\n", - "A checkpoint was restored (e.g. tf.train.Checkpoint.restore or tf.keras.Model.load_weights) but not all checkpointed values were used. See above for specific issues. Use expect_partial() on the load status object, e.g. tf.train.Checkpoint.restore(...).expect_partial(), to silence these warnings, or use assert_consumed() to make the check explicit. See https://www.tensorflow.org/guide/checkpoint#loading_mechanics for details.\n" - ] - } - ], + "outputs": [], "source": [ "!python -m pytest tests/" ] @@ -396,76 +320,30 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "3e1f9017", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "name: tempo\r\n", - "channels:\r\n", - " - defaults\r\n", - "dependencies:\r\n", - " - python=3.7.9\r\n", - " - pip:\r\n", - " - alibi-detect\r\n", - " - dill\r\n", - " - opencv-python-headless\r\n", - " - mlops-tempo\r\n", - " - mlserver==0.3.1.dev7\r\n" - ] - } - ], + "outputs": [], "source": [ "!cat artifacts/outlier/conda.yaml" ] }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "id": "9a515728", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "name: tempo\r\n", - "channels:\r\n", - " - defaults\r\n", - "dependencies:\r\n", - " - python=3.7.9\r\n", - " - pip:\r\n", - " - mlops-tempo\r\n", - " - mlserver==0.3.1.dev7\r\n" - ] - } - ], + "outputs": [], "source": [ "!cat artifacts/svc/conda.yaml" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "3c23ab3b", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Collecting packages...\n", - "Packing environment at '/home/clive/anaconda3/envs/tempo-334a2fab-7f4c-4b05-9441-653876ae7d4a' to '/home/clive/work/mlops/fork-tempo/docs/examples/outlier/artifacts/outlier/environment.tar.gz'\n", - "[########################################] | 100% Completed | 1min 0.8s\n", - "Collecting packages...\n", - "Packing environment at '/home/clive/anaconda3/envs/tempo-2155ed3a-7004-42e9-a379-36d053dfc43b' to '/home/clive/work/mlops/fork-tempo/docs/examples/outlier/artifacts/svc/environment.tar.gz'\n", - "[########################################] | 100% Completed | 10.1s\n" - ] - } - ], + "outputs": [], "source": [ "tempo.save(OutlierModel)\n", "tempo.save(Cifar10Svc)" @@ -483,7 +361,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "id": "a36bfb9f", "metadata": {}, "outputs": [], @@ -497,35 +375,10 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "id": "fb09a516", "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAU4UlEQVR4nO2dW49k51WG1z7Wubqqp49z6HbPyZPYgOPERo6MSRBIIQiJCyS45Adww+/gHyDhIHGDLEQUiUQIgaVEyA6OPfYY5uBxe7p7pk/Th+qq7jrs2rUPXITL713S3CRL0ftc7qWvatfe+60trfdba3llWQohxB7+r/sECCFuKE5CjEJxEmIUipMQo1CchBgl1II/+JvXYSrXKwu4Lo7cH+v5+L8gTacwluUz/F1xDGN54T7HssAZas/PYcwPYEjKWQN/puDPjOLEeTxQbo3n4/PPiwzGZhm+Z0XhgS/D55HlYI2ITNHniQiOiBTgufI8vCpN8fOR58p1VJ5hX7lnKXiuRvjSyzjFn/e37z1x/ji+OQkxCsVJiFEoTkKMQnESYhSKkxCjUJyEGEW1UlJFu2U5wQtBqrki2G7wBfsUYajYG9rfC3AcvAgvmqYpjGWFco4l/sxAsWBCsMwrsD0gGbadNAugUM4/9arO43lQwWu0z8vx9fAKfI4esIKqyj0LPRzzQ8V2minX2M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+wfwpjBdicX61giytR+hwh+OYkxCgUJyFGoTgJMQrFSYhRKE5CjEJxEmIUT7MACCG/PvjmJMQoFCchRqE4CTEKxUmIUShOQoxCcRJilP8DKnTF0srourIAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "array([[3.92254496e-09, 1.20455460e-11, 2.66011191e-09, 9.99992609e-01,\n", - " 2.52213306e-10, 5.40860242e-07, 6.75954425e-06, 4.75119076e-12,\n", - " 6.90874735e-09, 1.07275586e-11]])" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from src.utils import show_image\n", "\n", @@ -535,35 +388,10 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "id": "b22014e7", "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAU4UlEQVR4nO2dW49k51WG1z7Wubqqp49z6HbPyZPYgOPERo6MSRBIIQiJCyS45Adww+/gHyDhIHGDLEQUiUQIgaVEyA6OPfYY5uBxe7p7pk/Th+qq7jrs2rUPXITL713S3CRL0ftc7qWvatfe+60trfdba3llWQohxB7+r/sECCFuKE5CjEJxEmIUipMQo1CchBgl1II/+JvXYSrXKwu4Lo7cH+v5+L8gTacwluUz/F1xDGN54T7HssAZas/PYcwPYEjKWQN/puDPjOLEeTxQbo3n4/PPiwzGZhm+Z0XhgS/D55HlYI2ITNHniQiOiBTgufI8vCpN8fOR58p1VJ5hX7lnKXiuRvjSyzjFn/e37z1x/ji+OQkxCsVJiFEoTkKMQnESYhSKkxCjUJyEGEW1UlJFu2U5wQtBqrki2G7wBf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6BQehkVYPxDliobtnP8u7SRAFpMm2yNrJSzM5zK7ynXsd3ElsOc0k+nDXoZVQVbM3mBrYjQUzbnV/DNnibuz6yE+L5o35WNB0oMn/+wfwpjBdicX61giytR+hwh+OYkxCgUJyFGoTgJMQrFSYhRKE5CjEJxEmIUT7MACCG/PvjmJMQoFCchRqE4CTEKxUmIUShOQoxCcRJilP8DKnTF0srourIAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "array([[3.92254496e-09, 1.20455460e-11, 2.66011191e-09, 9.99992609e-01,\n", - " 2.52213306e-10, 5.40860242e-07, 6.75954425e-06, 4.75119076e-12,\n", - " 6.90874735e-09, 1.07275586e-11]])" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "show_image(data.X_test[0:1])\n", "svc.remote(payload=data.X_test[0:1])" @@ -571,33 +399,10 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "id": "03ef662f", "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAVjElEQVR4nO2dWWyc53WGz+wLOQt3kSJNUgtl2ZIseVG9yHFg11YWF2mbFE2XtEDRXjlIN6A10KsgaIO2KJBeFLDrtEAbd7sJHMNG6iqx48ixHcG2bFmSZWqhREoUKW7D4ezL//e2Bc57EKlAclC8z+X34pv5ODMvf+Cc75wTCcNQCCH+iP6sD0AI0aE5CXEKzUmIU2hOQpxCcxLilLglPvfi92Ao9+q5d+G+lbmP1PVuF7/ds3//TesoPzUikQjUrMj20Uc/CbWxie1Q+/pf/426/t6HZ+GeXTO3Q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Hyy/Pg89eRBoV/LddPPO+uj4wgM8R9vVDDcEnJyFOoTkJcQrNSYhTaE5CnEJzEuIU++L7Fr7oLQH2dSLSq64vL+MI2Pmzl6GWjuOIbLJQhNogGP8wNliAe+LGhf6BwgDUjLv50qjjS8/Dw3oEePsYju5dX8JTr2dnP4LaVGsaaiiSvrWFv7NaDUdCy5s46m1Fa7stvfAglsKX1M+cxqM8rBEJw8MjUNt+APdiGh7S9w0O4b5PaeP8CD45CXEKzUmIU2hOQpxCcxLiFJqTEKfQnIQ4xUylBEZL/ajh63hbv7SdN8Y7vPv261BbWsYXxyMJfAn88OF71PUjD9wL92xu4tTBqfd+DLUqmKItIjI7vwC1S5cvq+v1Gu7fFIa4CU86jy9fl8tbUNsCIyOqZZwGMloBSTyG1UIOX2Ifm9bTPX0Do3DP8BhOYYwd2g+1fqOHUNLqTYU0o1hBwpt/DvLJSYhTaE5CnEJzEuIUmpMQp9CchDiF5iTEKZEwNJoBEUJ+ZvDJSYhTaE5CnEJzEuIUmpMQp9CchDiF5iTEKf8Nl+3YqiicVIAAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "array([], dtype=float64)" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from src.utils import create_cifar10_outlier\n", "\n", @@ -608,7 +413,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "id": "6c6ea7c7", "metadata": {}, "outputs": [], @@ -636,28 +441,17 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "id": "d8d2fb32", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "secret/minio-secret configured\n", - "serviceaccount/tempo-pipeline unchanged\n", - "role.rbac.authorization.k8s.io/tempo-pipeline unchanged\n", - "rolebinding.rbac.authorization.k8s.io/tempo-pipeline-rolebinding unchanged\n" - ] - } - ], + "outputs": [], "source": [ "!kubectl apply -f k8s/rbac -n production" ] }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "id": "9fa80565", "metadata": {}, "outputs": [], @@ -670,7 +464,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "id": "39ff404c", "metadata": {}, "outputs": [], @@ -682,7 +476,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "id": "c56b5ca7", "metadata": {}, "outputs": [], @@ -699,7 +493,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "id": "363a9b61", "metadata": {}, "outputs": [], @@ -713,35 +507,10 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "id": "8feb662b", "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAU4UlEQVR4nO2dW49k51WG1z7Wubqqp49z6HbPyZPYgOPERo6MSRBIIQiJCyS45Adww+/gHyDhIHGDLEQUiUQIgaVEyA6OPfYY5uBxe7p7pk/Th+qq7jrs2rUPXITL713S3CRL0ftc7qWvatfe+60trfdba3llWQohxB7+r/sECCFuKE5CjEJxEmIUipMQo1CchBgl1II/+JvXYSrXKwu4Lo7cH+v5+L8gTacwluUz/F1xDGN54T7HssAZas/PYcwPYEjKWQN/puDPjOLEeTxQbo3n4/PPiwzGZhm+Z0XhgS/D55HlYI2ITNHniQiOiBTgufI8vCpN8fOR58p1VJ5hX7lnKXiuRvjSyzjFn/e37z1x/ji+OQkxCsVJiFEoTkKMQnESYhSKkxCjUJyEGEW1UlJFu2U5wQtBqrki2G7wBfsUYajYG9rfC3AcvAgvmqYpjGWFco4l/sxAsWBCsMwrsD0gGbadNAugUM4/9arO43lQwWu0z8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jQUzbnV/DNnibuz6yE+L5o35WNB0oMn/+wfwpjBdicX61giytR+hwh+OYkxCgUJyFGoTgJMQrFSYhRKE5CjEJxEmIUT7MACCG/PvjmJMQoFCchRqE4CTEKxUmIUShOQoxCcRJilP8DKnTF0srourIAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "array([[3.92254496e-09, 1.20455460e-11, 2.66011191e-09, 9.99992609e-01,\n", - " 2.52213306e-10, 5.40860242e-07, 6.75954425e-06, 4.75119076e-12,\n", - " 6.90874735e-09, 1.07275586e-11]])" - ] - }, - "execution_count": 23, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from src.utils import show_image\n", "\n", @@ -751,33 +520,10 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "id": "97b59a44", "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAVjElEQVR4nO2dWWyc53WGz+wLOQt3kSJNUgtl2ZIseVG9yHFg11YWF2mbFE2XtEDRXjlIN6A10KsgaIO2KJBeFLDrtEAbd7sJHMNG6iqx48ixHcG2bFmSZWqhREoUKW7D4ezL//e2Bc57EKlAclC8z+X34pv5ODMvf+Cc75wTCcNQCCH+iP6sD0AI0aE5CXEKzUmIU2hOQpxCcxLilLglPvfi92Ao9+q5d+G+lbmP1PVuF7/ds3//TesoPzUikQjUrMj20Uc/CbWxie1Q+/pf/426/t6HZ+GeXTO3Q62xuQ61M6dPQi0IWup6q92Ae86e+RBq5dIq1JqtJtTarZi6vr5Wg3sqNXzGThe/19BQP9T6+nuh1g239Pdqwy3SqOPfzgv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2Pmzl6GWjuOIbLJQhNogGP8wNliAe+LGhf6BwgDUjLv50qjjS8/Dw3oEePsYju5dX8JTr2dnP4LaVGsaaiiSvrWFv7NaDUdCy5s46m1Fa7stvfAglsKX1M+cxqM8rBEJw8MjUNt+APdiGh7S9w0O4b5PaeP8CD45CXEKzUmIU2hOQpxCcxLiFJqTEKfQnIQ4xUylBEZL/ajh63hbv7SdN8Y7vPv261BbWsYXxyMJfAn88OF71PUjD9wL92xu4tTBqfd+DLUqmKItIjI7vwC1S5cvq+v1Gu7fFIa4CU86jy9fl8tbUNsCIyOqZZwGMloBSTyG1UIOX2Ifm9bTPX0Do3DP8BhOYYwd2g+1fqOHUNLqTYU0o1hBwpt/DvLJSYhTaE5CnEJzEuIUmpMQp9CchDiF5iTEKZEwNJoBEUJ+ZvDJSYhTaE5CnEJzEuIUmpMQp9CchDiF5iTEKf8Nl+3YqiicVIAAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "array([], dtype=float64)" - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from src.utils import create_cifar10_outlier\n", "\n", @@ -788,7 +534,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "id": "c789f08b", "metadata": {}, "outputs": [], @@ -809,7 +555,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": null, "id": "69ee5f4a", "metadata": {}, "outputs": [], @@ -825,169 +571,10 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": null, "id": "748bd754", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "apiVersion: machinelearning.seldon.io/v1\r\n", - "kind: SeldonDeployment\r\n", - "metadata:\r\n", - " annotations:\r\n", - " seldon.io/tempo-description: \"\"\r\n", - " seldon.io/tempo-model: '{\"model_details\": {\"name\": \"cifar10-service\", \"local_folder\":\r\n", - " \"/home/clive/work/mlops/fork-tempo/docs/examples/outlier/artifacts/svc\", \"uri\":\r\n", - " \"s3://tempo/outlier/cifar10/svc\", \"platform\": \"tempo\", \"inputs\": {\"args\": [{\"ty\":\r\n", - " \"numpy.ndarray\", \"name\": \"payload\"}]}, \"outputs\": {\"args\": [{\"ty\": \"numpy.ndarray\",\r\n", - " \"name\": null}]}, \"description\": \"\"}, \"protocol\": \"tempo.kfserving.protocol.KFServingV2Protocol\",\r\n", - " \"runtime_options\": {\"runtime\": \"tempo.seldon.SeldonKubernetesRuntime\", \"docker_options\":\r\n", - " {\"defaultRuntime\": \"tempo.seldon.SeldonDockerRuntime\"}, \"k8s_options\": {\"replicas\":\r\n", - " 1, \"minReplicas\": null, \"maxReplicas\": null, \"authSecretName\": \"minio-secret\",\r\n", - " \"serviceAccountName\": null, \"defaultRuntime\": \"tempo.seldon.SeldonKubernetesRuntime\",\r\n", - " \"namespace\": \"production\"}, \"ingress_options\": {\"ingress\": \"tempo.ingress.istio.IstioIngress\",\r\n", - " \"ssl\": false, \"verify_ssl\": true}}}'\r\n", - " labels:\r\n", - " seldon.io/tempo: \"true\"\r\n", - " name: cifar10-service\r\n", - " namespace: production\r\n", - "spec:\r\n", - " predictors:\r\n", - " - componentSpecs:\r\n", - " - spec:\r\n", - " containers:\r\n", - " - args: []\r\n", - " env:\r\n", - " - name: MLSERVER_HTTP_PORT\r\n", - " value: \"9000\"\r\n", - " - name: MLSERVER_GRPC_PORT\r\n", - " value: \"9500\"\r\n", - " - name: MLSERVER_MODEL_IMPLEMENTATION\r\n", - " value: tempo.mlserver.InferenceRuntime\r\n", - " - name: MLSERVER_MODEL_NAME\r\n", - " value: cifar10-service\r\n", - " - name: MLSERVER_MODEL_URI\r\n", - " value: /mnt/models\r\n", - " - name: TEMPO_RUNTIME_OPTIONS\r\n", - " value: '{\"runtime\": \"tempo.seldon.SeldonKubernetesRuntime\", \"docker_options\":\r\n", - " {\"defaultRuntime\": \"tempo.seldon.SeldonDockerRuntime\"}, \"k8s_options\":\r\n", - " {\"replicas\": 1, \"minReplicas\": null, \"maxReplicas\": null, \"authSecretName\":\r\n", - " \"minio-secret\", \"serviceAccountName\": null, \"defaultRuntime\": \"tempo.seldon.SeldonKubernetesRuntime\",\r\n", - " \"namespace\": \"production\"}, \"ingress_options\": {\"ingress\": \"tempo.ingress.istio.IstioIngress\",\r\n", - " \"ssl\": false, \"verify_ssl\": true}}'\r\n", - " image: seldonio/mlserver:0.3.1.dev7\r\n", - " name: cifar10-service\r\n", - " resources:\r\n", - " limits:\r\n", - " cpu: 1\r\n", - " memory: 1Gi\r\n", - " requests:\r\n", - " cpu: 500m\r\n", - " memory: 500Mi\r\n", - " graph:\r\n", - " envSecretRefName: minio-secret\r\n", - " implementation: TRITON_SERVER\r\n", - " modelUri: s3://tempo/outlier/cifar10/svc\r\n", - " name: cifar10-service\r\n", - " serviceAccountName: tempo-pipeline\r\n", - " type: MODEL\r\n", - " name: default\r\n", - " replicas: 1\r\n", - " protocol: kfserving\r\n", - "---\r\n", - "apiVersion: machinelearning.seldon.io/v1\r\n", - "kind: SeldonDeployment\r\n", - "metadata:\r\n", - " annotations:\r\n", - " seldon.io/tempo-description: \"\"\r\n", - " seldon.io/tempo-model: '{\"model_details\": {\"name\": \"outlier\", \"local_folder\":\r\n", - " \"/home/clive/work/mlops/fork-tempo/docs/examples/outlier/artifacts/outlier\",\r\n", - " \"uri\": \"s3://tempo/outlier/cifar10/outlier\", \"platform\": \"custom\", \"inputs\":\r\n", - " {\"args\": [{\"ty\": \"numpy.ndarray\", \"name\": \"payload\"}]}, \"outputs\": {\"args\":\r\n", - " [{\"ty\": \"builtins.dict\", \"name\": null}]}, \"description\": \"\"}, \"protocol\": \"tempo.kfserving.protocol.KFServingV2Protocol\",\r\n", - " \"runtime_options\": {\"runtime\": \"tempo.seldon.SeldonKubernetesRuntime\", \"docker_options\":\r\n", - " {\"defaultRuntime\": \"tempo.seldon.SeldonDockerRuntime\"}, \"k8s_options\": {\"replicas\":\r\n", - " 1, \"minReplicas\": null, \"maxReplicas\": null, \"authSecretName\": \"minio-secret\",\r\n", - " \"serviceAccountName\": null, \"defaultRuntime\": \"tempo.seldon.SeldonKubernetesRuntime\",\r\n", - " \"namespace\": \"production\"}, \"ingress_options\": {\"ingress\": \"tempo.ingress.istio.IstioIngress\",\r\n", - " \"ssl\": false, \"verify_ssl\": true}}}'\r\n", - " labels:\r\n", - " seldon.io/tempo: \"true\"\r\n", - " name: outlier\r\n", - " namespace: production\r\n", - "spec:\r\n", - " predictors:\r\n", - " - componentSpecs:\r\n", - " - spec:\r\n", - " containers:\r\n", - " - args: []\r\n", - " env:\r\n", - " - name: MLSERVER_HTTP_PORT\r\n", - " value: \"9000\"\r\n", - " - name: MLSERVER_GRPC_PORT\r\n", - " value: \"9500\"\r\n", - " - name: MLSERVER_MODEL_IMPLEMENTATION\r\n", - " value: tempo.mlserver.InferenceRuntime\r\n", - " - name: MLSERVER_MODEL_NAME\r\n", - " value: outlier\r\n", - " - name: MLSERVER_MODEL_URI\r\n", - " value: /mnt/models\r\n", - " - name: TEMPO_RUNTIME_OPTIONS\r\n", - " value: '{\"runtime\": \"tempo.seldon.SeldonKubernetesRuntime\", \"docker_options\":\r\n", - " {\"defaultRuntime\": \"tempo.seldon.SeldonDockerRuntime\"}, \"k8s_options\":\r\n", - " {\"replicas\": 1, \"minReplicas\": null, \"maxReplicas\": null, \"authSecretName\":\r\n", - " \"minio-secret\", \"serviceAccountName\": null, \"defaultRuntime\": \"tempo.seldon.SeldonKubernetesRuntime\",\r\n", - " \"namespace\": \"production\"}, \"ingress_options\": {\"ingress\": \"tempo.ingress.istio.IstioIngress\",\r\n", - " \"ssl\": false, \"verify_ssl\": true}}'\r\n", - " image: seldonio/mlserver:0.3.1.dev7\r\n", - " name: outlier\r\n", - " graph:\r\n", - " envSecretRefName: minio-secret\r\n", - " implementation: TRITON_SERVER\r\n", - " modelUri: s3://tempo/outlier/cifar10/outlier\r\n", - " name: outlier\r\n", - " serviceAccountName: tempo-pipeline\r\n", - " type: MODEL\r\n", - " name: default\r\n", - " replicas: 1\r\n", - " protocol: kfserving\r\n", - "---\r\n", - "apiVersion: machinelearning.seldon.io/v1\r\n", - "kind: SeldonDeployment\r\n", - "metadata:\r\n", - " annotations:\r\n", - " seldon.io/tempo-description: \"\"\r\n", - " seldon.io/tempo-model: '{\"model_details\": {\"name\": \"resnet32\", \"local_folder\":\r\n", - " \"/home/clive/work/mlops/fork-tempo/docs/examples/outlier/artifacts/model\", \"uri\":\r\n", - " \"gs://seldon-models/tfserving/cifar10/resnet32\", \"platform\": \"tensorflow\", \"inputs\":\r\n", - " {\"args\": [{\"ty\": \"numpy.ndarray\", \"name\": null}]}, \"outputs\": {\"args\": [{\"ty\":\r\n", - " \"numpy.ndarray\", \"name\": null}]}, \"description\": \"\"}, \"protocol\": \"tempo.kfserving.protocol.KFServingV1Protocol\",\r\n", - " \"runtime_options\": {\"runtime\": \"tempo.seldon.SeldonKubernetesRuntime\", \"docker_options\":\r\n", - " {\"defaultRuntime\": \"tempo.seldon.SeldonDockerRuntime\"}, \"k8s_options\": {\"replicas\":\r\n", - " 1, \"minReplicas\": null, \"maxReplicas\": null, \"authSecretName\": \"minio-secret\",\r\n", - " \"serviceAccountName\": null, \"defaultRuntime\": \"tempo.seldon.SeldonKubernetesRuntime\",\r\n", - " \"namespace\": \"production\"}, \"ingress_options\": {\"ingress\": \"tempo.ingress.istio.IstioIngress\",\r\n", - " \"ssl\": false, \"verify_ssl\": true}}}'\r\n", - " labels:\r\n", - " seldon.io/tempo: \"true\"\r\n", - " name: resnet32\r\n", - " namespace: production\r\n", - "spec:\r\n", - " predictors:\r\n", - " - graph:\r\n", - " envSecretRefName: minio-secret\r\n", - " implementation: TENSORFLOW_SERVER\r\n", - " modelUri: gs://seldon-models/tfserving/cifar10/resnet32\r\n", - " name: resnet32\r\n", - " type: MODEL\r\n", - " name: default\r\n", - " replicas: 1\r\n", - " protocol: tensorflow\r\n" - ] - } - ], + "outputs": [], "source": [ "!kustomize build k8s" ]