diff --git a/xgboost_synthetic/build-train-deploy.ipynb b/xgboost_synthetic/build-train-deploy.ipynb index 608d9c528..83a34963a 100644 --- a/xgboost_synthetic/build-train-deploy.ipynb +++ b/xgboost_synthetic/build-train-deploy.ipynb @@ -105,8 +105,6 @@ "from importlib import reload\n", "from sklearn.datasets import make_regression\n", "from kubeflow.metadata import metadata\n", - "from kubeflow.metadata import openapi_client\n", - "from kubeflow.metadata.openapi_client import Configuration, ApiClient, MetadataServiceApi\n", "from datetime import datetime\n", "import retrying\n", "import urllib3" @@ -203,27 +201,11 @@ " joblib.dump(model, model_file)\n", " logging.info(\"Model export success: %s\", model_file)\n", "\n", - "@retrying.retry(stop_max_delay=180000)\n", - "def wait_for_istio(address=\"metadata-service.kubeflow.svc.cluster.local:8080\"):\n", - " \"\"\"Wait until we can connect to the metadata service.\n", - " \n", - " When we launch a K8s pod we may not be able to connect to the metadata service immediately\n", - " because the ISTIO side car hasn't started.\n", - " \n", - " This function allows us to wait for a time specified up to stop_max_delay to see if the service\n", - " is ready. \n", - " \"\"\"\n", - " config = Configuration()\n", - " config.host = address\n", - " api_client = ApiClient(config)\n", - " client = MetadataServiceApi(api_client)\n", - "\n", - " client.list_artifacts2()\n", - " \n", "def create_workspace():\n", + " METADATA_STORE_HOST = \"metadata-grpc-service.kubeflow\" # default DNS of Kubeflow Metadata gRPC serivce.\n", + " METADATA_STORE_PORT = 8080\n", " return metadata.Workspace(\n", - " # Connect to metadata-service in namesapce kubeflow in k8s cluster.\n", - " backend_url_prefix=\"metadata-service.kubeflow.svc.cluster.local:8080\",\n", + " store=metadata.Store(grpc_host=METADATA_STORE_HOST, grpc_port=METADATA_STORE_PORT),\n", " name=\"xgboost-synthetic\",\n", " description=\"workspace for xgboost-synthetic artifacts and executions\")" ] @@ -328,7 +310,6 @@ " @property\n", " def workspace(self):\n", " if not self._workspace:\n", - " wait_for_istio()\n", " self._workspace = create_workspace()\n", " return self._workspace\n", " \n", @@ -360,70 +341,77 @@ "execution_count": 8, "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "MetadataStore with gRPC connection initialized\n" + ] + }, { "name": "stdout", "output_type": "stream", "text": [ "model_file=mockup-model.dat\n", - "[01:59:24] WARNING: /workspace/src/objective/regression_obj.cu:152: reg:linear is now deprecated in favor of reg:squarederror.\n", - "[0]\tvalidation_0-rmse:126.454\n", + "[23:44:47] WARNING: /workspace/src/objective/regression_obj.cu:152: reg:linear is now deprecated in favor of reg:squarederror.\n", + "[0]\tvalidation_0-rmse:134.005\n", "Will train until validation_0-rmse hasn't improved in 40 rounds.\n", - "[1]\tvalidation_0-rmse:118.586\n", - "[2]\tvalidation_0-rmse:113.631\n", - "[3]\tvalidation_0-rmse:107.715\n", - "[4]\tvalidation_0-rmse:102.901\n", - "[5]\tvalidation_0-rmse:97.6595\n", - "[6]\tvalidation_0-rmse:93.6508\n", - "[7]\tvalidation_0-rmse:90.489\n", - "[8]\tvalidation_0-rmse:87.2985\n", - "[9]\tvalidation_0-rmse:83.3983\n", - "[10]\tvalidation_0-rmse:81.0857\n", - "[11]\tvalidation_0-rmse:77.6108\n", - "[12]\tvalidation_0-rmse:74.9634\n", - "[13]\tvalidation_0-rmse:72.8967\n", - "[14]\tvalidation_0-rmse:71.6856\n", - "[15]\tvalidation_0-rmse:69.5757\n", - "[16]\tvalidation_0-rmse:68.1697\n", - "[17]\tvalidation_0-rmse:66.5379\n", - "[18]\tvalidation_0-rmse:64.8437\n", - "[19]\tvalidation_0-rmse:63.5118\n", - "[20]\tvalidation_0-rmse:61.8464\n", - "[21]\tvalidation_0-rmse:60.9832\n", - "[22]\tvalidation_0-rmse:59.2487\n", - "[23]\tvalidation_0-rmse:58.5487\n", - "[24]\tvalidation_0-rmse:57.3747\n", - "[25]\tvalidation_0-rmse:56.1671\n", - "[26]\tvalidation_0-rmse:55.5532\n", - "[27]\tvalidation_0-rmse:54.689\n", - "[28]\tvalidation_0-rmse:53.799\n", - "[29]\tvalidation_0-rmse:52.7957\n", - "[30]\tvalidation_0-rmse:51.9971\n", - "[31]\tvalidation_0-rmse:51.4438\n", - "[32]\tvalidation_0-rmse:50.4111\n", - "[33]\tvalidation_0-rmse:49.9279\n", - "[34]\tvalidation_0-rmse:49.0742\n", - "[35]\tvalidation_0-rmse:48.6634\n", - "[36]\tvalidation_0-rmse:48.0462\n", - "[37]\tvalidation_0-rmse:47.6838\n", - "[38]\tvalidation_0-rmse:47.4017\n", - "[39]\tvalidation_0-rmse:46.6633\n", - "[40]\tvalidation_0-rmse:46.147\n", - "[41]\tvalidation_0-rmse:45.3871\n", - "[42]\tvalidation_0-rmse:44.7644\n", - "[43]\tvalidation_0-rmse:44.2482\n", - "[44]\tvalidation_0-rmse:43.9772\n", - "[45]\tvalidation_0-rmse:43.4322\n", - "[46]\tvalidation_0-rmse:43.0199\n", - "[47]\tvalidation_0-rmse:42.6914\n", - "[48]\tvalidation_0-rmse:42.3258\n", - "[49]\tvalidation_0-rmse:42.1521\n" + "[1]\tvalidation_0-rmse:129.102\n", + "[2]\tvalidation_0-rmse:124.39\n", + "[3]\tvalidation_0-rmse:119.218\n", + "[4]\tvalidation_0-rmse:114.096\n", + "[5]\tvalidation_0-rmse:109.494\n", + "[6]\tvalidation_0-rmse:107.101\n", + "[7]\tvalidation_0-rmse:103.463\n", + "[8]\tvalidation_0-rmse:100.657\n", + "[9]\tvalidation_0-rmse:96.576\n", + "[10]\tvalidation_0-rmse:94.8884\n", + "[11]\tvalidation_0-rmse:91.7095\n", + "[12]\tvalidation_0-rmse:90.7389\n", + "[13]\tvalidation_0-rmse:88.1934\n", + "[14]\tvalidation_0-rmse:86.1535\n", + "[15]\tvalidation_0-rmse:84.8222\n", + "[16]\tvalidation_0-rmse:83.5818\n", + "[17]\tvalidation_0-rmse:81.6697\n", + "[18]\tvalidation_0-rmse:80.2789\n", + "[19]\tvalidation_0-rmse:79.4583\n", + "[20]\tvalidation_0-rmse:78.4213\n", + "[21]\tvalidation_0-rmse:77.0478\n", + "[22]\tvalidation_0-rmse:75.3792\n", + "[23]\tvalidation_0-rmse:73.9913\n", + "[24]\tvalidation_0-rmse:73.2026\n", + "[25]\tvalidation_0-rmse:72.2079\n", + "[26]\tvalidation_0-rmse:70.9489\n", + "[27]\tvalidation_0-rmse:70.5206\n", + "[28]\tvalidation_0-rmse:69.8641\n", + "[29]\tvalidation_0-rmse:69.0409\n", + "[30]\tvalidation_0-rmse:68.3776\n", + "[31]\tvalidation_0-rmse:67.2776\n", + "[32]\tvalidation_0-rmse:66.7612\n", + "[33]\tvalidation_0-rmse:65.9548\n", + "[34]\tvalidation_0-rmse:65.5048\n", + "[35]\tvalidation_0-rmse:64.8582\n", + "[36]\tvalidation_0-rmse:64.118\n", + "[37]\tvalidation_0-rmse:63.5615\n", + "[38]\tvalidation_0-rmse:63.2716\n", + "[39]\tvalidation_0-rmse:62.9765\n", + "[40]\tvalidation_0-rmse:62.3468\n", + "[41]\tvalidation_0-rmse:62.0579\n", + "[42]\tvalidation_0-rmse:61.9598\n", + "[43]\tvalidation_0-rmse:61.6452\n", + "[44]\tvalidation_0-rmse:61.2468\n", + "[45]\tvalidation_0-rmse:60.7332\n", + "[46]\tvalidation_0-rmse:60.6493\n", + "[47]\tvalidation_0-rmse:60.2032\n", + "[48]\tvalidation_0-rmse:59.9972\n", + "[49]\tvalidation_0-rmse:59.5956\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "mean_absolute_error=31.69\n", + "mean_absolute_error=47.22\n", "Model export success: mockup-model.dat\n" ] }, @@ -431,7 +419,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Best RMSE on eval: %.2f with %d rounds 42.152107 50\n" + "Best RMSE on eval: %.2f with %d rounds 59.595573 50\n" ] } ], @@ -455,19 +443,26 @@ "execution_count": 9, "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "MetadataStore with gRPC connection initialized\n" + ] + }, { "name": "stdout", "output_type": "stream", "text": [ "model_file not supplied; using the default\n", "model_file=mockup-model.dat\n", - "[01:59:24] WARNING: /workspace/src/objective/regression_obj.cu:152: reg:linear is now deprecated in favor of reg:squarederror.\n" + "[23:44:47] WARNING: /workspace/src/objective/regression_obj.cu:152: reg:linear is now deprecated in favor of reg:squarederror.\n" ] }, { "data": { "text/plain": [ - "[[187.37405395507812, 209.07009887695312]]" + "[[-30.6968994140625, 45.884098052978516]]" ] }, "execution_count": 9, @@ -536,7 +531,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -548,7 +543,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -565,7 +560,7 @@ "[PosixPath('build-train-deploy.py'), 'xgboost_util.py', 'mockup-model.dat']" ] }, - "execution_count": 37, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -606,7 +601,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 13, "metadata": { "scrolled": true }, @@ -616,13 +611,14 @@ "output_type": "stream", "text": [ "Building image using cluster builder.\n", - "Creating docker context: /tmp/fairing_context_wftfwzxl\n", + "Creating docker context: /tmp/fairing_context_n34sz0lr\n", "Converting build-train-deploy.ipynb to build-train-deploy.py\n", "Creating entry point for the class name ModelServe\n", - "build-train-deploy.py already exists in Fairing context, skipping...\n", - "Waiting for fairing-builder-cv87w-2spns to start...\n", - "Waiting for fairing-builder-cv87w-2spns to start...\n", - "Waiting for fairing-builder-cv87w-2spns to start...\n", + "Not able to find gcp credentials secret: user-gcp-sa\n", + "Trying workload identity service account: default-editor\n", + "Waiting for fairing-builder-dcbz2-lqzjg to start...\n", + "Waiting for fairing-builder-dcbz2-lqzjg to start...\n", + "Waiting for fairing-builder-dcbz2-lqzjg to start...\n", "Pod started running True\n" ] }, @@ -630,182 +626,38 @@ "name": "stdout", "output_type": "stream", "text": [ - "ERROR: logging before flag.Parse: E1123 02:59:34.511477 1 metadata.go:241] Failed to unmarshal scopes: invalid character 'h' looking for beginning of value\n", - "\u001b[36mINFO\u001b[0m[0001] Resolved base name gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0 to gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0\n", - "\u001b[36mINFO\u001b[0m[0001] Resolved base name gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0 to gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0\n", - "\u001b[36mINFO\u001b[0m[0001] Downloading base image gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0\n", - "\u001b[36mINFO\u001b[0m[0001] Error while retrieving image from cache: getting file info: stat /cache/sha256:fe174faf7c477bc3dae796b067d98ac3f0d31e8075007a1146f86d13f2c98e13: no such file or directory\n", - "\u001b[36mINFO\u001b[0m[0001] Downloading base image gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0\n", - "\u001b[36mINFO\u001b[0m[0001] Built cross stage deps: map[]\n", - "\u001b[36mINFO\u001b[0m[0001] Downloading base image gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0\n", + "ERROR: logging before flag.Parse: E0226 23:44:52.505936 1 metadata.go:241] Failed to unmarshal scopes: invalid character 'h' looking for beginning of value\n", + "\u001b[36mINFO\u001b[0m[0002] Resolved base name gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0 to gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0\n", + "\u001b[36mINFO\u001b[0m[0002] Resolved base name gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0 to gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0\n", + "\u001b[36mINFO\u001b[0m[0002] Downloading base image gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0\n", "\u001b[36mINFO\u001b[0m[0002] Error while retrieving image from cache: getting file info: stat /cache/sha256:fe174faf7c477bc3dae796b067d98ac3f0d31e8075007a1146f86d13f2c98e13: no such file or directory\n", "\u001b[36mINFO\u001b[0m[0002] Downloading base image gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0\n", - "\u001b[36mINFO\u001b[0m[0002] Using files from context: [/kaniko/buildcontext/requirements.txt]\n", - "\u001b[36mINFO\u001b[0m[0002] Checking for cached layer gcr.io/jlewi-dev/fairing-job/fairing-job/cache:1e93fb3c6e9fb31f759df8ad76e18f56b8fae0254e0fe5cf11321e51f9b030ee...\n", - "\u001b[36mINFO\u001b[0m[0002] Using caching version of cmd: COPY requirements.txt .\n", - "\u001b[36mINFO\u001b[0m[0002] cmd: USER\n", - "\u001b[36mINFO\u001b[0m[0002] Checking for cached layer gcr.io/jlewi-dev/fairing-job/fairing-job/cache:c26e11919b866ba3ac64422b83344dfb96719a5932c2525ef30e4d9f6390f094...\n", - "\u001b[36mINFO\u001b[0m[0002] No cached layer found for cmd RUN pip3 --no-cache-dir install -r requirements.txt\n", - "\u001b[36mINFO\u001b[0m[0002] Unpacking rootfs as cmd RUN pip3 --no-cache-dir install -r requirements.txt requires it.\n", - "\u001b[36mINFO\u001b[0m[0055] Taking snapshot of full filesystem...\n", - "\u001b[36mINFO\u001b[0m[0082] COPY requirements.txt .\n", - "\u001b[36mINFO\u001b[0m[0082] Found cached layer, extracting to filesystem\n", - "\u001b[36mINFO\u001b[0m[0082] extractedFiles: [/tf/requirements.txt / /tf]\n", - "\u001b[36mINFO\u001b[0m[0082] Taking snapshot of files...\n", - "\u001b[36mINFO\u001b[0m[0082] USER root\n", - "\u001b[36mINFO\u001b[0m[0082] cmd: USER\n", - "\u001b[36mINFO\u001b[0m[0082] No files changed in this command, skipping snapshotting.\n", - "\u001b[36mINFO\u001b[0m[0082] RUN pip3 --no-cache-dir install -r requirements.txt\n", - "\u001b[36mINFO\u001b[0m[0082] cmd: /bin/bash\n", - "\u001b[36mINFO\u001b[0m[0082] args: [-c pip3 --no-cache-dir install -r requirements.txt]\n", - "Collecting fire (from -r requirements.txt (line 1))\n", - " Downloading https://files.pythonhosted.org/packages/d9/69/faeaae8687f4de0f5973694d02e9d6c3eb827636a009157352d98de1129e/fire-0.2.1.tar.gz (76kB)\n", - "Collecting gitpython (from -r requirements.txt (line 2))\n", - " Downloading https://files.pythonhosted.org/packages/20/8c/4543981439d23c4ff65b2e62dddd767ebc84a8e664a9b67e840d1e2730d3/GitPython-3.0.5-py3-none-any.whl (455kB)\n", - "Requirement already satisfied: google-cloud-storage in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 3)) (1.20.0)\n", - "Collecting joblib (from -r requirements.txt (line 4))\n", - " Downloading https://files.pythonhosted.org/packages/8f/42/155696f85f344c066e17af287359c9786b436b1bf86029bb3411283274f3/joblib-0.14.0-py2.py3-none-any.whl (294kB)\n", - "Collecting kubeflow-metadata (from -r requirements.txt (line 5))\n", - " Downloading https://files.pythonhosted.org/packages/43/b4/3fa3c1a88b8c52695b33acd09189dda8c84ea582acbfd07a1d46f085828c/kubeflow_metadata-0.2.0-py3-none-any.whl (69kB)\n", - "Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 6)) (1.16.4)\n", - "Collecting pandas (from -r requirements.txt (line 7))\n", - " Downloading https://files.pythonhosted.org/packages/52/3f/f6a428599e0d4497e1595030965b5ba455fd8ade6e977e3c819973c4b41d/pandas-0.25.3-cp36-cp36m-manylinux1_x86_64.whl (10.4MB)\n", - "Collecting retrying (from -r requirements.txt (line 8))\n", - " Downloading https://files.pythonhosted.org/packages/44/ef/beae4b4ef80902f22e3af073397f079c96969c69b2c7d52a57ea9ae61c9d/retrying-1.3.3.tar.gz\n", - "Collecting seldon-core (from -r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/a7/5e/a55ff47468cc11aac0136b84af92a15133947d4dba75774ce439078d60d9/seldon_core-0.5.1-py3-none-any.whl (60kB)\n", - "Collecting sklearn (from -r requirements.txt (line 10))\n", - " Downloading https://files.pythonhosted.org/packages/1e/7a/dbb3be0ce9bd5c8b7e3d87328e79063f8b263b2b1bfa4774cb1147bfcd3f/sklearn-0.0.tar.gz\n", - "Requirement already satisfied: xgboost in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 11)) (0.90)\n", - "Collecting tornado>=6.0.3 (from -r requirements.txt (line 12))\n", - " Downloading https://files.pythonhosted.org/packages/30/78/2d2823598496127b21423baffaa186b668f73cd91887fcef78b6eade136b/tornado-6.0.3.tar.gz (482kB)\n", - "Requirement already satisfied: six in /usr/lib/python3/dist-packages (from fire->-r requirements.txt (line 1)) (1.11.0)\n", - "Requirement already satisfied: termcolor in /usr/local/lib/python3.6/dist-packages (from fire->-r requirements.txt (line 1)) (1.1.0)\n", - "Collecting gitdb2>=2.0.0 (from gitpython->-r requirements.txt (line 2))\n", - " Downloading https://files.pythonhosted.org/packages/03/6c/99296f89bad2ef85626e1df9f677acbee8885bb043ad82ad3ed4746d2325/gitdb2-2.0.6-py2.py3-none-any.whl (63kB)\n", - "Requirement already satisfied: google-cloud-core<2.0dev,>=1.0.3 in /usr/local/lib/python3.6/dist-packages (from google-cloud-storage->-r requirements.txt (line 3)) (1.0.3)\n", - "Requirement already satisfied: google-auth>=1.2.0 in /usr/local/lib/python3.6/dist-packages (from google-cloud-storage->-r requirements.txt (line 3)) (1.6.3)\n", - "Requirement already satisfied: google-resumable-media!=0.4.0,<0.5dev,>=0.3.1 in /usr/local/lib/python3.6/dist-packages (from google-cloud-storage->-r requirements.txt (line 3)) (0.4.1)\n", - "Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.6/dist-packages (from pandas->-r requirements.txt (line 7)) (2019.2)\n", - "Requirement already satisfied: python-dateutil>=2.6.1 in /usr/local/lib/python3.6/dist-packages (from pandas->-r requirements.txt (line 7)) (2.8.0)\n", - "Collecting jaeger-client<4.2.0,>=4.1.0 (from seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/f1/da/569a4f1bc3d0c412c7f903053f09ef62fa10949374ca90bc852b22dd3860/jaeger-client-4.1.0.tar.gz (80kB)\n", - "Collecting pyaml<20.0.0 (from seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/33/1a/936074f3492156693fc9e471269fc5747fa3b7d9d7f8a33af054f6b24066/pyaml-19.4.1-py2.py3-none-any.whl\n", - "Collecting flatbuffers<2.0.0 (from seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/c9/84/adf5837f96c39990bc55afdfddf460b38b4562f50341359afa32e4a98de7/flatbuffers-1.11-py2.py3-none-any.whl\n", - "Collecting Flask<2.0.0 (from seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/9b/93/628509b8d5dc749656a9641f4caf13540e2cdec85276964ff8f43bbb1d3b/Flask-1.1.1-py2.py3-none-any.whl (94kB)\n", - "Collecting Flask-cors<4.0.0 (from seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/78/38/e68b11daa5d613e3a91e4bf3da76c94ac9ee0d9cd515af9c1ab80d36f709/Flask_Cors-3.0.8-py2.py3-none-any.whl\n", - "Collecting opentracing<2.3.0,>=2.2.0 (from seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/94/9f/289424136addf621fb4c75624ef9a3a80e8575da3993a87950c57e93217e/opentracing-2.2.0.tar.gz (47kB)\n", - "Requirement already satisfied: grpcio<2.0.0 in /usr/local/lib/python3.6/dist-packages (from seldon-core->-r requirements.txt (line 9)) (1.21.1)\n", - "Collecting azure-storage-blob<3.0.0,>=2.0.1 (from seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/3e/84/610f379b46d7d3c2d48eadeed6a12b6d46a43100fea70534f5992d0ac996/azure_storage_blob-2.1.0-py2.py3-none-any.whl (88kB)\n", - "Requirement already satisfied: protobuf<4.0.0 in /usr/local/lib/python3.6/dist-packages (from seldon-core->-r requirements.txt (line 9)) (3.8.0)\n", - "Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.6/dist-packages (from seldon-core->-r requirements.txt (line 9)) (41.0.1)\n", - "Requirement already satisfied: requests<3.0.0 in /usr/local/lib/python3.6/dist-packages (from seldon-core->-r requirements.txt (line 9)) (2.22.0)\n", - "Collecting grpcio-opentracing<1.2.0,>=1.1.4 (from seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/db/82/2fcad380697c3dab25de76ee590bcab3eb9bbfb4add916044d7e83ec2b10/grpcio_opentracing-1.1.4-py3-none-any.whl\n", - "Collecting minio<6.0.0,>=4.0.9 (from seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/14/46/60bff78df1b112cc50f95c5ffb2e14aaf9aa279a5219845b55c56f214383/minio-5.0.5-py2.py3-none-any.whl (62kB)\n", - "Collecting gunicorn<20.1.0,>=19.9.0 (from seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/60/0d/3dbda0324f5bf007f3274e5ea09f0f3bcbf0ca01a75b80ff4f1ff9f8ecfd/gunicorn-20.0.0-py2.py3-none-any.whl (77kB)\n", - "Collecting Flask-OpenTracing<1.2.0,>=1.1.0 (from seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/58/6c/6417701ba5ecc8854670c6db3207bcc3e5fbc96289a7cb18d5516d99a1c6/Flask-OpenTracing-1.1.0.tar.gz\n", - "Collecting redis<4.0.0 (from seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/32/ae/28613a62eea0d53d3db3147f8715f90da07667e99baeedf1010eb400f8c0/redis-3.3.11-py2.py3-none-any.whl (66kB)\n", - "Collecting scikit-learn (from sklearn->-r requirements.txt (line 10))\n", - " Downloading https://files.pythonhosted.org/packages/a0/c5/d2238762d780dde84a20b8c761f563fe882b88c5a5fb03c056547c442a19/scikit_learn-0.21.3-cp36-cp36m-manylinux1_x86_64.whl (6.7MB)\n", - "Requirement already satisfied: scipy in /usr/local/lib/python3.6/dist-packages (from xgboost->-r requirements.txt (line 11)) (1.3.1)\n", - "Collecting smmap2>=2.0.0 (from gitdb2>=2.0.0->gitpython->-r requirements.txt (line 2))\n", - " Downloading https://files.pythonhosted.org/packages/55/d2/866d45e3a121ee15a1dc013824d58072fd5c7799c9c34d01378eb262ca8f/smmap2-2.0.5-py2.py3-none-any.whl\n", - "Requirement already satisfied: google-api-core<2.0.0dev,>=1.14.0 in /usr/local/lib/python3.6/dist-packages (from google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage->-r requirements.txt (line 3)) (1.14.2)\n", - "Requirement already satisfied: cachetools>=2.0.0 in /usr/local/lib/python3.6/dist-packages (from google-auth>=1.2.0->google-cloud-storage->-r requirements.txt (line 3)) (3.1.1)\n", - "Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.6/dist-packages (from google-auth>=1.2.0->google-cloud-storage->-r requirements.txt (line 3)) (0.2.6)\n", - "Requirement already satisfied: rsa>=3.1.4 in /usr/local/lib/python3.6/dist-packages (from google-auth>=1.2.0->google-cloud-storage->-r requirements.txt (line 3)) (4.0)\n", - "Collecting threadloop<2,>=1 (from jaeger-client<4.2.0,>=4.1.0->seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/d3/1d/8398c1645b97dc008d3c658e04beda01ede3d90943d40c8d56863cf891bd/threadloop-1.0.2.tar.gz\n", - "Collecting thrift (from jaeger-client<4.2.0,>=4.1.0->seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/97/1e/3284d19d7be99305eda145b8aa46b0c33244e4a496ec66440dac19f8274d/thrift-0.13.0.tar.gz (59kB)\n", - "Requirement already satisfied: PyYAML in /usr/local/lib/python3.6/dist-packages (from pyaml<20.0.0->seldon-core->-r requirements.txt (line 9)) (5.1.2)\n", - "Collecting itsdangerous>=0.24 (from Flask<2.0.0->seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl\n", - "Requirement already satisfied: click>=5.1 in /usr/local/lib/python3.6/dist-packages (from Flask<2.0.0->seldon-core->-r requirements.txt (line 9)) (7.0)\n", - "Requirement already satisfied: Werkzeug>=0.15 in /usr/local/lib/python3.6/dist-packages (from Flask<2.0.0->seldon-core->-r requirements.txt (line 9)) (0.15.4)\n", - "Requirement already satisfied: Jinja2>=2.10.1 in /usr/local/lib/python3.6/dist-packages (from Flask<2.0.0->seldon-core->-r requirements.txt (line 9)) (2.10.1)\n", - "Collecting azure-storage-common~=2.1 (from azure-storage-blob<3.0.0,>=2.0.1->seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/6b/a0/6794b318ce0118d1a4053bdf0149a60807407db9b710354f2b203c2f5975/azure_storage_common-2.1.0-py2.py3-none-any.whl (47kB)\n", - "Collecting azure-common>=1.1.5 (from azure-storage-blob<3.0.0,>=2.0.1->seldon-core->-r requirements.txt (line 9))\n", - " Downloading https://files.pythonhosted.org/packages/00/55/a703923c12cd3172d5c007beda0c1a34342a17a6a72779f8a7c269af0cd6/azure_common-1.1.23-py2.py3-none-any.whl\n", - "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests<3.0.0->seldon-core->-r requirements.txt (line 9)) (2019.9.11)\n", - "Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests<3.0.0->seldon-core->-r requirements.txt (line 9)) (2.6)\n", - "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests<3.0.0->seldon-core->-r requirements.txt (line 9)) (1.24.3)\n", - "Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests<3.0.0->seldon-core->-r requirements.txt (line 9)) (3.0.4)\n", - "Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.6.0 in /usr/local/lib/python3.6/dist-packages (from google-api-core<2.0.0dev,>=1.14.0->google-cloud-core<2.0dev,>=1.0.3->google-cloud-storage->-r requirements.txt (line 3)) (1.6.0)\n", - "Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.6/dist-packages (from pyasn1-modules>=0.2.1->google-auth>=1.2.0->google-cloud-storage->-r requirements.txt (line 3)) (0.4.7)\n", - "Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.6/dist-packages (from Jinja2>=2.10.1->Flask<2.0.0->seldon-core->-r requirements.txt (line 9)) (1.1.1)\n", - "Requirement already satisfied: cryptography in /usr/local/lib/python3.6/dist-packages (from azure-storage-common~=2.1->azure-storage-blob<3.0.0,>=2.0.1->seldon-core->-r requirements.txt (line 9)) (2.7)\n", - "Requirement already satisfied: asn1crypto>=0.21.0 in /usr/lib/python3/dist-packages (from cryptography->azure-storage-common~=2.1->azure-storage-blob<3.0.0,>=2.0.1->seldon-core->-r requirements.txt (line 9)) (0.24.0)\n", - "Requirement already satisfied: cffi!=1.11.3,>=1.8 in /usr/local/lib/python3.6/dist-packages (from cryptography->azure-storage-common~=2.1->azure-storage-blob<3.0.0,>=2.0.1->seldon-core->-r requirements.txt (line 9)) (1.12.3)\n", - "Requirement already satisfied: pycparser in /usr/local/lib/python3.6/dist-packages (from cffi!=1.11.3,>=1.8->cryptography->azure-storage-common~=2.1->azure-storage-blob<3.0.0,>=2.0.1->seldon-core->-r requirements.txt (line 9)) (2.19)\n", - "Building wheels for collected packages: fire, retrying, sklearn, tornado, jaeger-client, opentracing, Flask-OpenTracing, threadloop, thrift\n", - " Building wheel for fire (setup.py): started\n", - " Building wheel for fire (setup.py): finished with status 'done'\n", - " Stored in directory: /tmp/pip-ephem-wheel-cache-ptzf3v40/wheels/31/9c/c0/07b6dc7faf1844bb4688f46b569efe6cafaa2179c95db821da\n", - " Building wheel for retrying (setup.py): started\n", - " Building wheel for retrying (setup.py): finished with status 'done'\n", - " Stored in directory: /tmp/pip-ephem-wheel-cache-ptzf3v40/wheels/d7/a9/33/acc7b709e2a35caa7d4cae442f6fe6fbf2c43f80823d46460c\n", - " Building wheel for sklearn (setup.py): started\n", - " Building wheel for sklearn (setup.py): finished with status 'done'\n", - " Stored in directory: /tmp/pip-ephem-wheel-cache-ptzf3v40/wheels/76/03/bb/589d421d27431bcd2c6da284d5f2286c8e3b2ea3cf1594c074\n", - " Building wheel for tornado (setup.py): started\n", - " Building wheel for tornado (setup.py): finished with status 'done'\n", - " Stored in directory: /tmp/pip-ephem-wheel-cache-ptzf3v40/wheels/84/bf/40/2f6ef700f48401ca40e5e3dd7d0e3c0a90e064897b7fe5fc08\n", - " Building wheel for jaeger-client (setup.py): started\n", - " Building wheel for jaeger-client (setup.py): finished with status 'done'\n", - " Stored in directory: /tmp/pip-ephem-wheel-cache-ptzf3v40/wheels/f2/84/7f/e89da3ee8ce35598d6382b6389fa2ada5d66acca2422537994\n", - " Building wheel for opentracing (setup.py): started\n", - " Building wheel for opentracing (setup.py): finished with status 'done'\n", - " Stored in directory: /tmp/pip-ephem-wheel-cache-ptzf3v40/wheels/93/e9/b5/1cdc3544f99a54caca13832b5afa26fd98701fe709dc049576\n", - " Building wheel for Flask-OpenTracing (setup.py): started\n", - " Building wheel for Flask-OpenTracing (setup.py): finished with status 'done'\n", - " Stored in directory: /tmp/pip-ephem-wheel-cache-ptzf3v40/wheels/7b/dc/25/3cf0b35c129232ee596c413f13d1d1f5a8e38c427266276dfd\n", - " Building wheel for threadloop (setup.py): started\n", - " Building wheel for threadloop (setup.py): finished with status 'done'\n", - " Stored in directory: /tmp/pip-ephem-wheel-cache-ptzf3v40/wheels/d7/7a/30/d212623a4cd34f6cce400f8122b1b7af740d3440c68023d51f\n", - " Building wheel for thrift (setup.py): started\n", - " Building wheel for thrift (setup.py): finished with status 'done'\n", - " Stored in directory: /tmp/pip-ephem-wheel-cache-ptzf3v40/wheels/02/a2/46/689ccfcf40155c23edc7cdbd9de488611c8fdf49ff34b1706e\n", - "Successfully built fire retrying sklearn tornado jaeger-client opentracing Flask-OpenTracing threadloop thrift\n", - "ERROR: fairing 0.5 has requirement tornado<6.0.0,>=5.1.1, but you'll have tornado 6.0.3 which is incompatible.\n", - "ERROR: jaeger-client 4.1.0 has requirement tornado<6,>=4.3, but you'll have tornado 6.0.3 which is incompatible.\n", - "Installing collected packages: fire, smmap2, gitdb2, gitpython, joblib, kubeflow-metadata, pandas, retrying, tornado, threadloop, thrift, opentracing, jaeger-client, pyaml, flatbuffers, itsdangerous, Flask, Flask-cors, azure-common, azure-storage-common, azure-storage-blob, grpcio-opentracing, minio, gunicorn, Flask-OpenTracing, redis, seldon-core, scikit-learn, sklearn\n", - " Found existing installation: tornado 5.1.1\n", - " Uninstalling tornado-5.1.1:\n", - " Successfully uninstalled tornado-5.1.1\n", - "Successfully installed Flask-1.1.1 Flask-OpenTracing-1.1.0 Flask-cors-3.0.8 azure-common-1.1.23 azure-storage-blob-2.1.0 azure-storage-common-2.1.0 fire-0.2.1 flatbuffers-1.11 gitdb2-2.0.6 gitpython-3.0.5 grpcio-opentracing-1.1.4 gunicorn-20.0.0 itsdangerous-1.1.0 jaeger-client-4.1.0 joblib-0.14.0 kubeflow-metadata-0.2.0 minio-5.0.5 opentracing-2.2.0 pandas-0.25.3 pyaml-19.4.1 redis-3.3.11 retrying-1.3.3 scikit-learn-0.21.3 seldon-core-0.5.1 sklearn-0.0 smmap2-2.0.5 threadloop-1.0.2 thrift-0.13.0 tornado-6.0.3\n", - "WARNING: You are using pip version 19.1.1, however version 19.3.1 is available.\n", - "You should consider upgrading via the 'pip install --upgrade pip' command.\n", - "\u001b[36mINFO\u001b[0m[0106] Taking snapshot of full filesystem...\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado/platform/epoll.py\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado/platform/__pycache__/common.cpython-36.pyc\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado/platform/__pycache__/epoll.cpython-36.pyc\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado/test/stack_context_test.py\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado/platform/common.py\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado/stack_context.py\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado/platform/__pycache__/kqueue.cpython-36.pyc\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado-5.1.1.dist-info\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado/platform/__pycache__/select.cpython-36.pyc\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado/platform/select.py\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado/test/__pycache__/stack_context_test.cpython-36.pyc\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado/platform/kqueue.py\n", - "\u001b[36mINFO\u001b[0m[0108] Adding whiteout for /usr/local/lib/python3.6/dist-packages/tornado/__pycache__/stack_context.cpython-36.pyc\n", - "\u001b[36mINFO\u001b[0m[0117] Pushing layer gcr.io/jlewi-dev/fairing-job/fairing-job/cache:077aa692317a04aa37855cdc9ba46a53aadf7cc2b87b05cf52ac67544de25f28 to cache now\n", - "\u001b[36mINFO\u001b[0m[0117] USER jovyan\n", - "\u001b[36mINFO\u001b[0m[0117] cmd: USER\n", - "\u001b[36mINFO\u001b[0m[0117] No files changed in this command, skipping snapshotting.\n" + "\u001b[36mINFO\u001b[0m[0003] Built cross stage deps: map[]\n", + "\u001b[36mINFO\u001b[0m[0003] Downloading base image gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0\n", + "\u001b[36mINFO\u001b[0m[0003] Error while retrieving image from cache: getting file info: stat /cache/sha256:fe174faf7c477bc3dae796b067d98ac3f0d31e8075007a1146f86d13f2c98e13: no such file or directory\n", + "\u001b[36mINFO\u001b[0m[0003] Downloading base image gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0\n", + "\u001b[36mINFO\u001b[0m[0003] Using files from context: [/kaniko/buildcontext/requirements.txt]\n", + "\u001b[36mINFO\u001b[0m[0003] Checking for cached layer gcr.io/kubeflow-ci/fairing-job/fairing-job/cache:233bc2f24de09b29aa4c12d0f5adcc3098286c3c35eb0b4864fa00f73d8b9d2c...\n", + "\u001b[36mINFO\u001b[0m[0003] Using caching version of cmd: COPY requirements.txt .\n", + "\u001b[36mINFO\u001b[0m[0003] cmd: USER\n", + "\u001b[36mINFO\u001b[0m[0003] Checking for cached layer gcr.io/kubeflow-ci/fairing-job/fairing-job/cache:1acac4c9cb73d1b18003ae6076fd264e37af3983927234122784b04452b9b44e...\n", + "\u001b[36mINFO\u001b[0m[0004] Using caching version of cmd: RUN pip3 --no-cache-dir install -r requirements.txt\n", + "\u001b[36mINFO\u001b[0m[0004] cmd: USER\n", + "\u001b[36mINFO\u001b[0m[0004] Skipping unpacking as no commands require it.\n", + "\u001b[36mINFO\u001b[0m[0004] Taking snapshot of full filesystem...\n", + "\u001b[36mINFO\u001b[0m[0004] COPY requirements.txt .\n", + "\u001b[36mINFO\u001b[0m[0004] Found cached layer, extracting to filesystem\n", + "\u001b[36mINFO\u001b[0m[0004] extractedFiles: [/tf/requirements.txt / /tf]\n", + "\u001b[36mINFO\u001b[0m[0004] Taking snapshot of files...\n", + "\u001b[36mINFO\u001b[0m[0004] USER root\n", + "\u001b[36mINFO\u001b[0m[0004] cmd: USER\n", + "\u001b[36mINFO\u001b[0m[0004] No files changed in this command, skipping snapshotting.\n", + "\u001b[36mINFO\u001b[0m[0004] RUN pip3 --no-cache-dir install -r requirements.txt\n", + "\u001b[36mINFO\u001b[0m[0004] Found cached layer, extracting to filesystem\n", + "\u001b[36mINFO\u001b[0m[0032] Taking snapshot of files...\n", + "\u001b[36mINFO\u001b[0m[0070] USER jovyan\n", + "\u001b[36mINFO\u001b[0m[0070] cmd: USER\n", + "\u001b[36mINFO\u001b[0m[0070] No files changed in this command, skipping snapshotting.\n" ] } ], @@ -847,7 +699,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 14, "metadata": { "scrolled": true }, @@ -859,59 +711,58 @@ "Converting build-train-deploy.ipynb to build-train-deploy.py\n", "Creating entry point for the class name ModelServe\n", "Building image using Append builder...\n", - "Creating docker context: /tmp/fairing_context_3vpqgynl\n", + "Creating docker context: /tmp/fairing_context_x4g0orab\n", "Converting build-train-deploy.ipynb to build-train-deploy.py\n", "Creating entry point for the class name ModelServe\n", "build-train-deploy.py already exists in Fairing context, skipping...\n", - "build-train-deploy.py already exists in Fairing context, skipping...\n", - "Loading Docker credentials for repository 'gcr.io/jlewi-dev/fairing-job/fairing-job:2E30A0C2'\n", + "Loading Docker credentials for repository 'gcr.io/kubeflow-ci/fairing-job/fairing-job:F47EE88D'\n", "Invoking 'docker-credential-gcloud' to obtain Docker credentials.\n", "Successfully obtained Docker credentials.\n", - "Image successfully built in 2.7950974798295647s.\n", - "Pushing image gcr.io/jlewi-dev/fairing-job/fairing-job:7B2BFEB2...\n", - "Loading Docker credentials for repository 'gcr.io/jlewi-dev/fairing-job/fairing-job:7B2BFEB2'\n", + "Image successfully built in 2.249176573008299s.\n", + "Pushing image gcr.io/kubeflow-ci/fairing-job/fairing-job:BDE79D77...\n", + "Loading Docker credentials for repository 'gcr.io/kubeflow-ci/fairing-job/fairing-job:BDE79D77'\n", "Invoking 'docker-credential-gcloud' to obtain Docker credentials.\n", "Successfully obtained Docker credentials.\n", - "Uploading gcr.io/jlewi-dev/fairing-job/fairing-job:7B2BFEB2\n", - "Layer sha256:b054a26005b7f3b032577f811421fab5ec3b42ce45a4012dfa00cf6ed6191b0f exists, skipping\n", - "Layer sha256:5bac0c144f6e0b7082e3691da95d3f057ee0be0735e9efca76096da59cfd1786 exists, skipping\n", + "Uploading gcr.io/kubeflow-ci/fairing-job/fairing-job:BDE79D77\n", "Layer sha256:8832e37735788665026956430021c6d1919980288c66c4526502965aeb5ac006 exists, skipping\n", - "Layer sha256:5bd2e6f0de430cd3936eec59afb6cf466b052344fe4348ac33a48ac903b661e2 exists, skipping\n", - "Layer sha256:91cdc88789ec02229ec02d2db06aa63f2822b14a99dcac7347f6371cc0eb42a8 exists, skipping\n", + "Layer sha256:b4ecb6928817c974946ba93ffc5ce60de886457eb57955dae9d7bc8facfb690a exists, skipping\n", + "Layer sha256:9269cef1ab8b202433fe1dfbfbdf4649926d70d7a8b94f0324421bda79b917fa exists, skipping\n", + "Layer sha256:d77b634303a107b22366d05d1071bf79e7d2a27b3d6db1fb726fcfd5dd5f9831 exists, skipping\n", + "Layer sha256:5bd1cb59702536c10e96bb14e54846922c9b257580d4e2c733076a922525240b exists, skipping\n", + "Layer sha256:7babe47a4c402afbe26f10dffceb85be7bfd2072a96b816814503f41ce9c5273 exists, skipping\n", "Layer sha256:21a7832aeb8625dc8228ceb115a28222f87e0fbce61b2588c42a2cce7a3a63d6 exists, skipping\n", - "Layer sha256:5b7339215d1d5f8e68622d584a224f60339f5bef41dbd74330d081e912f0cddd exists, skipping\n", "Layer sha256:107cba84ef3d72ed995c76c7a4f60ba5613f58b029ab7e42ac20ece99bec88b1 exists, skipping\n", - "Layer sha256:2b940936f9933b7737cf407f2149dd7393998d7a0bee5acf1c4a57b0487cef79 exists, skipping\n", - "Layer sha256:5bd1cb59702536c10e96bb14e54846922c9b257580d4e2c733076a922525240b exists, skipping\n", - "Layer sha256:777cec03b3e23c21f8cf78f07812cc83dd7f352719226f27f361c5b706f6a93f exists, skipping\n", - "Layer sha256:92d24c89f5bc70958385728755b042a5a45bddf2f997de80e84d1161f43ba316 exists, skipping\n", - "Layer sha256:76d749fc66f5ba383a84ff991793a748273d262be3abdb5f2d196d94f2d6800b exists, skipping\n", - "Layer sha256:4b9d9f2fa2a2b168f0a49fcd3074c885ab1ca2c507848f7b2e3cee8104f1f7c3 exists, skipping\n", - "Layer sha256:35daced67e5901b8de4a92bca9fdc67c8593d400aae483591987442f54c87d0a exists, skipping\n", - "Layer sha256:f44c204b040238da05a21af1fd8543ea95f1e9249fac34b3b65217e38815568d exists, skipping\n", "Layer sha256:a31c3b1caad473a474d574283741f880e37c708cc06ee620d3e93fa602125ee0 exists, skipping\n", - "Layer sha256:9269cef1ab8b202433fe1dfbfbdf4649926d70d7a8b94f0324421bda79b917fa exists, skipping\n", - "Layer sha256:016724bbd2c9643f24eff7c1e86d9202d7c04caddd7fdd4375a77e3998ce8203 exists, skipping\n", - "Layer sha256:e3ab47ad84d9e11c5fad45791ce00ec5b5f3b7f1ae61a5fab17eb44c399d910f exists, skipping\n", - "Layer sha256:21640f54008ccbfc0d100246633f8e6f18f918a0566561f61aebbda785321e56 exists, skipping\n", + "Layer sha256:92d24c89f5bc70958385728755b042a5a45bddf2f997de80e84d1161f43ba316 exists, skipping\n", + "Layer sha256:e590ee7edf442435692956d6fed54190416a217147a50c63e73a6a78d15bec84 exists, skipping\n", "Layer sha256:96685dce34a0d24bf69741972441398cffbed89aed4f40e3c063176c59a3c81c exists, skipping\n", "Layer sha256:daa5c419d33d51d1730ea530f4f7335640f5bb42856f319c63a1a521aee368c1 exists, skipping\n", - "Layer sha256:14ca88e9f6723ce82bc14b241cda8634f6d19677184691d086662641ab96fe68 exists, skipping\n", - "Layer sha256:68543864d6442a851eaff0500161b92e4a151051cf7ed2649b3790a3f876bada exists, skipping\n", - "Layer sha256:5e671b828b2af02924968841e5d12084fa78e8722e9510402aaee80dc5d7a6db exists, skipping\n", - "Layer sha256:7babe47a4c402afbe26f10dffceb85be7bfd2072a96b816814503f41ce9c5273 exists, skipping\n", - "Layer sha256:b4ecb6928817c974946ba93ffc5ce60de886457eb57955dae9d7bc8facfb690a exists, skipping\n", - "Layer sha256:d684674aa1a4d080be26286fd9356f573b80d2448599392e3dcf3c61ce98a0f0 exists, skipping\n", + "Layer sha256:016724bbd2c9643f24eff7c1e86d9202d7c04caddd7fdd4375a77e3998ce8203 exists, skipping\n", "Layer sha256:b5494e32d0131350be270a54399cee65934e90d3c2df87a83757903e627813b2 exists, skipping\n", - "Layer sha256:01ad04a655b291ed8502f23f5b8c73d94475763e9b3cdbf6d1107f7879aadac6 exists, skipping\n", + "Layer sha256:823f4685c03b26a545ca41dcdca1e782ad5e52cf85bac03113edaa6aebdca1b3 exists, skipping\n", + "Layer sha256:777cec03b3e23c21f8cf78f07812cc83dd7f352719226f27f361c5b706f6a93f exists, skipping\n", + "Layer sha256:dc2840b4417186d66a29d64a039ac164be95929211d808294d36acae9301fc6b exists, skipping\n", + "Layer sha256:5e671b828b2af02924968841e5d12084fa78e8722e9510402aaee80dc5d7a6db exists, skipping\n", + "Layer sha256:5bac0c144f6e0b7082e3691da95d3f057ee0be0735e9efca76096da59cfd1786 exists, skipping\n", + "Layer sha256:5b7339215d1d5f8e68622d584a224f60339f5bef41dbd74330d081e912f0cddd exists, skipping\n", + "Layer sha256:35daced67e5901b8de4a92bca9fdc67c8593d400aae483591987442f54c87d0a exists, skipping\n", "Layer sha256:330a9002e0b4aa1e27d3628dd3f02ff9a39d25745b8f2f219b06e3725153ffc0 exists, skipping\n", "Layer sha256:4e8a6b90828e0d339f646d723df8720ffa17c0ffb905f8f009faf1be320ab5d9 exists, skipping\n", - "Layer sha256:dc2840b4417186d66a29d64a039ac164be95929211d808294d36acae9301fc6b exists, skipping\n", - "Layer sha256:823f4685c03b26a545ca41dcdca1e782ad5e52cf85bac03113edaa6aebdca1b3 exists, skipping\n", - "Layer sha256:7562167c5dcdb43737bd3357d5c5a52e001391347b03925a6402598914fcffdb pushed.\n", - "Layer sha256:a5c335d464c4daa25a1c86a561f4866a4e96486e6e3b78e9de5140d97f78c354 pushed.\n", - "Finished upload of: gcr.io/jlewi-dev/fairing-job/fairing-job:7B2BFEB2\n", - "Pushed image gcr.io/jlewi-dev/fairing-job/fairing-job:7B2BFEB2 in 3.3867790100630373s.\n" + "Layer sha256:2b940936f9933b7737cf407f2149dd7393998d7a0bee5acf1c4a57b0487cef79 exists, skipping\n", + "Layer sha256:d684674aa1a4d080be26286fd9356f573b80d2448599392e3dcf3c61ce98a0f0 exists, skipping\n", + "Layer sha256:68543864d6442a851eaff0500161b92e4a151051cf7ed2649b3790a3f876bada exists, skipping\n", + "Layer sha256:21640f54008ccbfc0d100246633f8e6f18f918a0566561f61aebbda785321e56 exists, skipping\n", + "Layer sha256:f44c204b040238da05a21af1fd8543ea95f1e9249fac34b3b65217e38815568d exists, skipping\n", + "Layer sha256:b054a26005b7f3b032577f811421fab5ec3b42ce45a4012dfa00cf6ed6191b0f exists, skipping\n", + "Layer sha256:14ca88e9f6723ce82bc14b241cda8634f6d19677184691d086662641ab96fe68 exists, skipping\n", + "Layer sha256:e3ab47ad84d9e11c5fad45791ce00ec5b5f3b7f1ae61a5fab17eb44c399d910f exists, skipping\n", + "Layer sha256:01ad04a655b291ed8502f23f5b8c73d94475763e9b3cdbf6d1107f7879aadac6 exists, skipping\n", + "Layer sha256:4b9d9f2fa2a2b168f0a49fcd3074c885ab1ca2c507848f7b2e3cee8104f1f7c3 exists, skipping\n", + "Layer sha256:5bd2e6f0de430cd3936eec59afb6cf466b052344fe4348ac33a48ac903b661e2 exists, skipping\n", + "Layer sha256:15bca5bd6fdc1b1ac156de08ce3b0f57760b345556b64017d1be5cc7c95e5e5b pushed.\n", + "Layer sha256:d23f2bdcc84f066126b083288f75d140d58fc252618bda5bf05cb9696a183958 pushed.\n", + "Finished upload of: gcr.io/kubeflow-ci/fairing-job/fairing-job:BDE79D77\n", + "Pushed image gcr.io/kubeflow-ci/fairing-job/fairing-job:BDE79D77 in 2.74867532402277s.\n" ] } ], @@ -942,9 +793,91 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Not able to find gcp credentials secret: user-gcp-sa\n", + "Trying workload identity service account: default-editor\n", + "The job fairing-job-qwdlb launched.\n", + "Waiting for fairing-job-qwdlb-67ddb to start...\n", + "Waiting for fairing-job-qwdlb-67ddb to start...\n", + "Waiting for fairing-job-qwdlb-67ddb to start...\n", + "Pod started running True\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2020-02-26 23:48:04.056153: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory\n", + "2020-02-26 23:48:04.056318: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory\n", + "2020-02-26 23:48:04.056332: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.\n", + "WARNING: Logging before flag parsing goes to stderr.\n", + "I0226 23:48:06.277673 140238089848640 metadata_store.py:80] MetadataStore with gRPC connection initialized\n", + "model_file not supplied; using the default\n", + "model_file=mockup-model.dat\n", + "[23:48:06] WARNING: /workspace/src/objective/regression_obj.cu:152: reg:linear is now deprecated in favor of reg:squarederror.\n", + "[0]\tvalidation_0-rmse:106.201\n", + "Will train until validation_0-rmse hasn't improved in 40 rounds.\n", + "[1]\tvalidation_0-rmse:102.289\n", + "[2]\tvalidation_0-rmse:99.0904\n", + "[3]\tvalidation_0-rmse:95.5223\n", + "[4]\tvalidation_0-rmse:92.2357\n", + "[5]\tvalidation_0-rmse:90.1649\n", + "[6]\tvalidation_0-rmse:87.6004\n", + "[7]\tvalidation_0-rmse:85.4127\n", + "[8]\tvalidation_0-rmse:82.7163\n", + "[9]\tvalidation_0-rmse:81.1641\n", + "[10]\tvalidation_0-rmse:79.1006\n", + "[11]\tvalidation_0-rmse:77.2564\n", + "[12]\tvalidation_0-rmse:75.3755\n", + "[13]\tvalidation_0-rmse:74.3393\n", + "[14]\tvalidation_0-rmse:72.0505\n", + "[15]\tvalidation_0-rmse:70.8315\n", + "[16]\tvalidation_0-rmse:69.1124\n", + "[17]\tvalidation_0-rmse:67.9681\n", + "[18]\tvalidation_0-rmse:66.2094\n", + "[19]\tvalidation_0-rmse:64.6999\n", + "[20]\tvalidation_0-rmse:63.6925\n", + "[21]\tvalidation_0-rmse:62.261\n", + "[22]\tvalidation_0-rmse:60.887\n", + "[23]\tvalidation_0-rmse:59.5543\n", + "[24]\tvalidation_0-rmse:58.3673\n", + "[25]\tvalidation_0-rmse:57.0439\n", + "[26]\tvalidation_0-rmse:55.7172\n", + "[27]\tvalidation_0-rmse:54.7011\n", + "[28]\tvalidation_0-rmse:53.8976\n", + "[29]\tvalidation_0-rmse:53.3325\n", + "[30]\tvalidation_0-rmse:52.81\n", + "[31]\tvalidation_0-rmse:51.8806\n", + "[32]\tvalidation_0-rmse:50.9026\n", + "[33]\tvalidation_0-rmse:50.0451\n", + "[34]\tvalidation_0-rmse:49.2711\n", + "[35]\tvalidation_0-rmse:48.6533\n", + "[36]\tvalidation_0-rmse:47.8613\n", + "[37]\tvalidation_0-rmse:47.5519\n", + "[38]\tvalidation_0-rmse:46.9383\n", + "[39]\tvalidation_0-rmse:46.7275\n", + "[40]\tvalidation_0-rmse:46.1317\n", + "[41]\tvalidation_0-rmse:45.7704\n", + "[42]\tvalidation_0-rmse:45.4888\n", + "[43]\tvalidation_0-rmse:44.8847\n", + "[44]\tvalidation_0-rmse:44.5583\n", + "[45]\tvalidation_0-rmse:43.9202\n", + "[46]\tvalidation_0-rmse:43.7332\n", + "[47]\tvalidation_0-rmse:43.2122\n", + "[48]\tvalidation_0-rmse:43.0383\n", + "[49]\tvalidation_0-rmse:42.7427\n", + "I0226 23:48:06.457567 140238089848640 build-train-deploy.py:100] mean_absolute_error=33.15\n", + "I0226 23:48:06.494030 140238089848640 build-train-deploy.py:106] Model export success: mockup-model.dat\n", + "Best RMSE on eval: %.2f with %d rounds 42.742691 50\n" + ] + } + ], "source": [ "pod_spec = builder.generate_pod_spec()\n", "train_deployer = job.job.Job(cleanup=False,\n", @@ -965,9 +898,87 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "apiVersion: v1\n", + "items:\n", + "- apiVersion: batch/v1\n", + " kind: Job\n", + " metadata:\n", + " creationTimestamp: \"2020-02-26T23:47:21Z\"\n", + " generateName: fairing-job-\n", + " labels:\n", + " fairing-deployer: job\n", + " fairing-id: 54d568cc-58f2-11ea-964d-46fd3ccc57c5\n", + " name: fairing-job-qwdlb\n", + " namespace: zhenghui\n", + " resourceVersion: \"11375571\"\n", + " selfLink: /apis/batch/v1/namespaces/zhenghui/jobs/fairing-job-qwdlb\n", + " uid: 54d8d81b-58f2-11ea-a99d-42010a8000ac\n", + " spec:\n", + " backoffLimit: 0\n", + " completions: 1\n", + " parallelism: 1\n", + " selector:\n", + " matchLabels:\n", + " controller-uid: 54d8d81b-58f2-11ea-a99d-42010a8000ac\n", + " template:\n", + " metadata:\n", + " annotations:\n", + " sidecar.istio.io/inject: \"false\"\n", + " creationTimestamp: null\n", + " labels:\n", + " controller-uid: 54d8d81b-58f2-11ea-a99d-42010a8000ac\n", + " fairing-deployer: job\n", + " fairing-id: 54d568cc-58f2-11ea-964d-46fd3ccc57c5\n", + " job-name: fairing-job-qwdlb\n", + " name: fairing-deployer\n", + " spec:\n", + " containers:\n", + " - command:\n", + " - python\n", + " - /app/build-train-deploy.py\n", + " - train\n", + " env:\n", + " - name: FAIRING_RUNTIME\n", + " value: \"1\"\n", + " image: gcr.io/kubeflow-ci/fairing-job/fairing-job:BDE79D77\n", + " imagePullPolicy: IfNotPresent\n", + " name: fairing-job\n", + " resources: {}\n", + " securityContext:\n", + " runAsUser: 0\n", + " terminationMessagePath: /dev/termination-log\n", + " terminationMessagePolicy: File\n", + " workingDir: /app/\n", + " dnsPolicy: ClusterFirst\n", + " restartPolicy: Never\n", + " schedulerName: default-scheduler\n", + " securityContext: {}\n", + " serviceAccount: default-editor\n", + " serviceAccountName: default-editor\n", + " terminationGracePeriodSeconds: 30\n", + " status:\n", + " completionTime: \"2020-02-26T23:48:08Z\"\n", + " conditions:\n", + " - lastProbeTime: \"2020-02-26T23:48:08Z\"\n", + " lastTransitionTime: \"2020-02-26T23:48:08Z\"\n", + " status: \"True\"\n", + " type: Complete\n", + " startTime: \"2020-02-26T23:47:21Z\"\n", + " succeeded: 1\n", + "kind: List\n", + "metadata:\n", + " resourceVersion: \"\"\n", + " selfLink: \"\"\n" + ] + } + ], "source": [ "!kubectl get jobs -l fairing-id={train_deployer.job_id} -o yaml" ] @@ -992,14 +1003,14 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "Cluster endpoint: http://fairing-service-snswp.kubeflow-jlewi.svc.cluster.local:5000/predict\n" + "Cluster endpoint: http://fairing-service-kkbtm.zhenghui.svc.cluster.local:5000/predict\n" ] } ], @@ -1024,9 +1035,100 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "apiVersion: extensions/v1beta1\r\n", + "kind: Deployment\r\n", + "metadata:\r\n", + " annotations:\r\n", + " deployment.kubernetes.io/revision: \"1\"\r\n", + " creationTimestamp: \"2020-02-26T23:48:12Z\"\r\n", + " generateName: fairing-deployer-\r\n", + " generation: 1\r\n", + " labels:\r\n", + " app: mockup\r\n", + " fairing-deployer: serving\r\n", + " fairing-id: 73532514-58f2-11ea-964d-46fd3ccc57c5\r\n", + " name: fairing-deployer-p8xc9\r\n", + " namespace: zhenghui\r\n", + " resourceVersion: \"11375642\"\r\n", + " selfLink: /apis/extensions/v1beta1/namespaces/zhenghui/deployments/fairing-deployer-p8xc9\r\n", + " uid: 7354b5ec-58f2-11ea-a99d-42010a8000ac\r\n", + "spec:\r\n", + " progressDeadlineSeconds: 600\r\n", + " replicas: 1\r\n", + " revisionHistoryLimit: 10\r\n", + " selector:\r\n", + " matchLabels:\r\n", + " app: mockup\r\n", + " fairing-deployer: serving\r\n", + " fairing-id: 73532514-58f2-11ea-964d-46fd3ccc57c5\r\n", + " strategy:\r\n", + " rollingUpdate:\r\n", + " maxSurge: 25%\r\n", + " maxUnavailable: 25%\r\n", + " type: RollingUpdate\r\n", + " template:\r\n", + " metadata:\r\n", + " annotations:\r\n", + " sidecar.istio.io/inject: \"false\"\r\n", + " creationTimestamp: null\r\n", + " labels:\r\n", + " app: mockup\r\n", + " fairing-deployer: serving\r\n", + " fairing-id: 73532514-58f2-11ea-964d-46fd3ccc57c5\r\n", + " name: fairing-deployer\r\n", + " spec:\r\n", + " containers:\r\n", + " - command:\r\n", + " - seldon-core-microservice\r\n", + " - build-train-deploy.ModelServe\r\n", + " - REST\r\n", + " - --service-type=MODEL\r\n", + " - --persistence=0\r\n", + " env:\r\n", + " - name: FAIRING_RUNTIME\r\n", + " value: \"1\"\r\n", + " image: gcr.io/kubeflow-ci/fairing-job/fairing-job:BDE79D77\r\n", + " imagePullPolicy: IfNotPresent\r\n", + " name: model\r\n", + " resources: {}\r\n", + " securityContext:\r\n", + " runAsUser: 0\r\n", + " terminationMessagePath: /dev/termination-log\r\n", + " terminationMessagePolicy: File\r\n", + " workingDir: /app/\r\n", + " dnsPolicy: ClusterFirst\r\n", + " restartPolicy: Always\r\n", + " schedulerName: default-scheduler\r\n", + " securityContext: {}\r\n", + " terminationGracePeriodSeconds: 30\r\n", + "status:\r\n", + " conditions:\r\n", + " - lastTransitionTime: \"2020-02-26T23:48:12Z\"\r\n", + " lastUpdateTime: \"2020-02-26T23:48:12Z\"\r\n", + " message: Deployment does not have minimum availability.\r\n", + " reason: MinimumReplicasUnavailable\r\n", + " status: \"False\"\r\n", + " type: Available\r\n", + " - lastTransitionTime: \"2020-02-26T23:48:12Z\"\r\n", + " lastUpdateTime: \"2020-02-26T23:48:13Z\"\r\n", + " message: ReplicaSet \"fairing-deployer-p8xc9-854c699677\" is progressing.\r\n", + " reason: ReplicaSetUpdated\r\n", + " status: \"True\"\r\n", + " type: Progressing\r\n", + " observedGeneration: 1\r\n", + " replicas: 1\r\n", + " unavailableReplicas: 1\r\n", + " updatedReplicas: 1\r\n" + ] + } + ], "source": [ "!kubectl get deploy -o yaml {deployer.deployment.metadata.name}" ] @@ -1044,7 +1146,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 19, "metadata": {}, "outputs": [], "source": [ @@ -1053,15 +1155,15 @@ }, { "cell_type": "code", - "execution_count": 56, + "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "(b'{\"data\":{\"names\":[\"t:0\",\"t:1\"],\"tensor\":{\"shape\":[1,2],\"values\":[-55.4250373'\n", - " b'840332,160.33970642089844]}},\"meta\":{}}\\n')\n" + "(b'{\"data\":{\"names\":[\"t:0\",\"t:1\"],\"tensor\":{\"shape\":[1,2],\"values\":[-49.2782592'\n", + " b'7734375,-54.25324630737305]}},\"meta\":{}}\\n')\n" ] } ], @@ -1082,7 +1184,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ @@ -1117,9 +1219,96 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "MetadataStore with gRPC connection initialized\n" + ] + }, + { + "data": { + "text/plain": [ + "[{'id': 3,\n", + " 'workspace': 'xgboost-synthetic',\n", + " 'run': 'xgboost-synthetic-faring-run2020-02-26T23:26:36.443396',\n", + " 'version': '2020-02-26T23:26:36.660862',\n", + " 'owner': 'someone@kubeflow.org',\n", + " 'description': 'housing price prediction model using synthetic data',\n", + " 'name': 'housing-price-model',\n", + " 'model_type': 'linear_regression',\n", + " 'create_time': '2020-02-26T23:26:36.660887Z',\n", + " 'uri': 'mockup-model.dat',\n", + " 'training_framework': {'name': 'xgboost', 'version': '0.9.0'},\n", + " 'hyperparameters': {'learning_rate': 0.1, 'n_estimators': 50},\n", + " 'labels': None,\n", + " 'kwargs': {}},\n", + " {'id': 6,\n", + " 'workspace': 'xgboost-synthetic',\n", + " 'run': 'xgboost-synthetic-faring-run2020-02-26T23:27:11.144500',\n", + " 'create_time': '2020-02-26T23:27:11.458520Z',\n", + " 'version': '2020-02-26T23:27:11.458480',\n", + " 'owner': 'someone@kubeflow.org',\n", + " 'description': 'housing price prediction model using synthetic data',\n", + " 'name': 'housing-price-model',\n", + " 'model_type': 'linear_regression',\n", + " 'uri': 'mockup-model.dat',\n", + " 'training_framework': {'name': 'xgboost', 'version': '0.9.0'},\n", + " 'hyperparameters': {'learning_rate': 0.1, 'n_estimators': 50},\n", + " 'labels': None,\n", + " 'kwargs': {}},\n", + " {'id': 9,\n", + " 'workspace': 'xgboost-synthetic',\n", + " 'run': 'xgboost-synthetic-faring-run2020-02-26T23:30:04.636580',\n", + " 'create_time': '2020-02-26T23:30:04.866997Z',\n", + " 'version': '2020-02-26T23:30:04.866972',\n", + " 'owner': 'someone@kubeflow.org',\n", + " 'description': 'housing price prediction model using synthetic data',\n", + " 'name': 'housing-price-model',\n", + " 'model_type': 'linear_regression',\n", + " 'uri': 'mockup-model.dat',\n", + " 'training_framework': {'name': 'xgboost', 'version': '0.9.0'},\n", + " 'hyperparameters': {'learning_rate': 0.1, 'n_estimators': 50},\n", + " 'labels': None,\n", + " 'kwargs': {}},\n", + " {'id': 12,\n", + " 'workspace': 'xgboost-synthetic',\n", + " 'run': 'xgboost-synthetic-faring-run2020-02-26T23:44:47.344352',\n", + " 'create_time': '2020-02-26T23:44:47.585805Z',\n", + " 'version': '2020-02-26T23:44:47.585782',\n", + " 'owner': 'someone@kubeflow.org',\n", + " 'description': 'housing price prediction model using synthetic data',\n", + " 'name': 'housing-price-model',\n", + " 'model_type': 'linear_regression',\n", + " 'uri': 'mockup-model.dat',\n", + " 'training_framework': {'name': 'xgboost', 'version': '0.9.0'},\n", + " 'hyperparameters': {'learning_rate': 0.1, 'n_estimators': 50},\n", + " 'labels': None,\n", + " 'kwargs': {}},\n", + " {'id': 15,\n", + " 'workspace': 'xgboost-synthetic',\n", + " 'run': 'xgboost-synthetic-faring-run2020-02-26T23:48:06.287002',\n", + " 'version': '2020-02-26T23:48:06.495138',\n", + " 'owner': 'someone@kubeflow.org',\n", + " 'description': 'housing price prediction model using synthetic data',\n", + " 'name': 'housing-price-model',\n", + " 'model_type': 'linear_regression',\n", + " 'create_time': '2020-02-26T23:48:06.495166Z',\n", + " 'uri': 'mockup-model.dat',\n", + " 'training_framework': {'name': 'xgboost', 'version': '0.9.0'},\n", + " 'hyperparameters': {'learning_rate': 0.1, 'n_estimators': 50},\n", + " 'labels': None,\n", + " 'kwargs': {}}]" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "ws = create_workspace()\n", "ws.list()" @@ -1156,7 +1345,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -1193,7 +1382,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ @@ -1220,9 +1409,41 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Creating experiment MockupModel.\n" + ] + }, + { + "data": { + "text/html": [ + "Experiment link here" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "Run link here" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "EXPERIMENT_NAME = 'MockupModel'\n", "\n", diff --git a/xgboost_synthetic/requirements.txt b/xgboost_synthetic/requirements.txt index 5292d817d..1b1a39b3e 100644 --- a/xgboost_synthetic/requirements.txt +++ b/xgboost_synthetic/requirements.txt @@ -2,7 +2,7 @@ fire gitpython google-cloud-storage joblib -kubeflow-metadata==0.2.0 +kubeflow-metadata==0.3.1 numpy pandas retrying