From 1c6fea2d147464b60d9c0a3e8f199d832403aa7f Mon Sep 17 00:00:00 2001 From: Jovana Taylor Date: Mon, 2 Mar 2020 13:42:48 -0800 Subject: [PATCH 1/5] split train.py into train.py and train_aml.py --- ...diabetes_regression-variables-template.yml | 2 +- diabetes_regression/training/test_train.py | 17 +-- diabetes_regression/training/train.py | 111 ++++++----------- diabetes_regression/training/train_aml.py | 112 ++++++++++++++++++ 4 files changed, 151 insertions(+), 91 deletions(-) create mode 100644 diabetes_regression/training/train_aml.py diff --git a/.pipelines/diabetes_regression-variables-template.yml b/.pipelines/diabetes_regression-variables-template.yml index a12fe67e..0fa625dc 100644 --- a/.pipelines/diabetes_regression-variables-template.yml +++ b/.pipelines/diabetes_regression-variables-template.yml @@ -7,7 +7,7 @@ variables: value: diabetes_regression # The path to the model training script under SOURCES_DIR_TRAIN - name: TRAIN_SCRIPT_PATH - value: training/train.py + value: training/train_aml.py # The path to the model evaluation script under SOURCES_DIR_TRAIN - name: EVALUATE_SCRIPT_PATH value: evaluate/evaluate_model.py diff --git a/diabetes_regression/training/test_train.py b/diabetes_regression/training/test_train.py index 155d367a..845243f0 100644 --- a/diabetes_regression/training/test_train.py +++ b/diabetes_regression/training/test_train.py @@ -1,6 +1,4 @@ import numpy as np -from azureml.core.run import Run -from unittest.mock import Mock from diabetes_regression.training.train import train_model @@ -12,16 +10,11 @@ def test_train_model(): data = {"train": {"X": X_train, "y": y_train}, "test": {"X": X_test, "y": y_test}} - run = Mock(Run) - reg = train_model(run, data, alpha=1.2) + reg_model, metrics = train_model(data, {"alpha": 1.2}) - _, call2 = run.log.call_args_list - nameValue, descriptionDict = call2 - name, value = nameValue - description = descriptionDict['description'] - assert (name == 'mse') - np.testing.assert_almost_equal(value, 0.029843893480257067) - assert (description == 'Mean squared error metric') + assert 'mse' in metrics + mse = metrics['mse'] + np.testing.assert_almost_equal(mse, 0.029843893480257067) - preds = reg.predict([[1], [2]]) + preds = reg_model.predict([[1], [2]]) np.testing.assert_equal(preds, [9.93939393939394, 9.03030303030303]) diff --git a/diabetes_regression/training/train.py b/diabetes_regression/training/train.py index c3f1203c..671ce35d 100644 --- a/diabetes_regression/training/train.py +++ b/diabetes_regression/training/train.py @@ -23,100 +23,55 @@ ARISING IN ANY WAY OUT OF THE USE OF THE SOFTWARE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ -from azureml.core.run import Run + import os -import argparse +import pandas as pd from sklearn.linear_model import Ridge from sklearn.metrics import mean_squared_error from sklearn.model_selection import train_test_split -import joblib -import json - - -def train_model(run, data, alpha): - run.log("alpha", alpha) - run.parent.log("alpha", alpha) - reg = Ridge(alpha=alpha) - reg.fit(data["train"]["X"], data["train"]["y"]) - preds = reg.predict(data["test"]["X"]) - run.log("mse", mean_squared_error( - preds, data["test"]["y"]), description="Mean squared error metric") - run.parent.log("mse", mean_squared_error( - preds, data["test"]["y"]), description="Mean squared error metric") - return reg - - -def main(): - print("Running train.py") - - parser = argparse.ArgumentParser("train") - - parser.add_argument( - "--model_name", - type=str, - help="Name of the Model", - default="sklearn_regression_model.pkl", - ) - - parser.add_argument( - "--step_output", - type=str, - help=("output for passing data to next step") - ) - - args = parser.parse_args() - print("Argument [model_name]: %s" % args.model_name) - print("Argument [step_output]: %s" % args.step_output) - model_name = args.model_name - step_output_path = args.step_output - - print("Getting training parameters") - - with open("config.json") as f: - pars = json.load(f) - try: - alpha = pars["training"]["alpha"] - except KeyError: - alpha = 0.5 - - print("Parameter alpha: %s" % alpha) - - run = Run.get_context() - - # Get the dataset - dataset = run.input_datasets['training_data'] - if (dataset): - df = dataset.to_pandas_dataframe() - X = df.drop('Y', axis=1).values - y = df['Y'].values - else: - e = ("No dataset provided") - print(e) - raise Exception(e) +# Split the dataframe into test and train data +def split_data(df): + X = df.drop('Y', axis=1).values + y = df['Y'].values X_train, X_test, y_train, y_test = train_test_split( X, y, test_size=0.2, random_state=0) data = {"train": {"X": X_train, "y": y_train}, "test": {"X": X_test, "y": y_test}} + return data + + +# Train the model, return the model and metrics dictionary +def train_model(data, ridge_args): + reg_model = Ridge(**ridge_args) + reg_model.fit(data["train"]["X"], data["train"]["y"]) + preds = reg_model.predict(data["test"]["X"]) + mse = mean_squared_error(preds, data["test"]["y"]) + metrics = {"mse": mse} + return reg_model, metrics + + +def main(): + print("Running train.py") - reg = train_model(run, data, alpha) + # Define training parameters + ridge_args = {"alpha": 0.5} - # Pass model file to next step - os.makedirs(step_output_path, exist_ok=True) - model_output_path = os.path.join(step_output_path, model_name) - joblib.dump(value=reg, filename=model_output_path) + # Load the training data as dataframe + data_dir = "data" + data_file = os.path.join(data_dir, 'diabetes.csv') + train_df = pd.read_csv(data_file) - # Also upload model file to run outputs for history - os.makedirs('outputs', exist_ok=True) - output_path = os.path.join('outputs', model_name) - joblib.dump(value=reg, filename=output_path) + data = split_data(train_df) - run.tag("run_type", value="train") - print(f"tags now present for run: {run.tags}") + # Train the model + model, metrics = train_model(data, ridge_args) - run.complete() + # Log the metrics returned from the train function + for (k, v) in metrics.items(): + print(f"{k}: {v}") if __name__ == '__main__': diff --git a/diabetes_regression/training/train_aml.py b/diabetes_regression/training/train_aml.py new file mode 100644 index 00000000..f4fa1f45 --- /dev/null +++ b/diabetes_regression/training/train_aml.py @@ -0,0 +1,112 @@ +""" +Copyright (C) Microsoft Corporation. All rights reserved.​ + ​ +Microsoft Corporation (“Microsoft”) grants you a nonexclusive, perpetual, +royalty-free right to use, copy, and modify the software code provided by us +("Software Code"). You may not sublicense the Software Code or any use of it +(except to your affiliates and to vendors to perform work on your behalf) +through distribution, network access, service agreement, lease, rental, or +otherwise. This license does not purport to express any claim of ownership over +data you may have shared with Microsoft in the creation of the Software Code. +Unless applicable law gives you more rights, Microsoft reserves all other +rights not expressly granted herein, whether by implication, estoppel or +otherwise. ​ + ​ +THE SOFTWARE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +MICROSOFT OR ITS LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THE SOFTWARE CODE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +""" +from azureml.core.run import Run +import os +import argparse +import joblib +import json +from train import split_data, train_model + + +def main(): + print("Running train_aml.py") + + parser = argparse.ArgumentParser("train") + parser.add_argument( + "--model_name", + type=str, + help="Name of the Model", + default="sklearn_regression_model.pkl", + ) + parser.add_argument( + "--step_output", + type=str, + help=("output for passing data to next step") + ) + + args = parser.parse_args() + + print("Argument [model_name]: %s" % args.model_name) + print("Argument [step_output]: %s" % args.step_output) + + model_name = args.model_name + step_output_path = args.step_output + + run = Run.get_context() + + print("Getting training parameters") + + # Load the training parameters from the config file + with open("config.json") as f: + pars = json.load(f) + try: + train_args = pars["training"] + except KeyError: + print("Could not load training values from file") + train_args = {} + + # Log the training parameters + print(f"Parameters: {train_args}") + for (k, v) in train_args.items(): + run.log(k, v) + run.parent.log(k, v) + + # Get the dataset and convert to dataframe + dataset = run.input_datasets['training_data'] + if (dataset): + df = dataset.to_pandas_dataframe() + data = split_data(df) + else: + e = ("No dataset provided") + print(e) + raise Exception(e) + + # Train the model + model, metrics = train_model(data, train_args) + + # Log the metrics returned from the train function + for (k, v) in metrics.items(): + run.log(k, v) + run.parent.log(k, v) + + # Pass model file to next step + os.makedirs(step_output_path, exist_ok=True) + model_output_path = os.path.join(step_output_path, model_name) + joblib.dump(value=model, filename=model_output_path) + + # Also upload model file to run outputs for history + os.makedirs('outputs', exist_ok=True) + output_path = os.path.join('outputs', model_name) + joblib.dump(value=model, filename=output_path) + + run.tag("run_type", value="train") + print(f"tags now present for run: {run.tags}") + + run.complete() + + +if __name__ == '__main__': + main() From 9cbb4aab2c9bc72a2ada7fc09f80d84cace718d2 Mon Sep 17 00:00:00 2001 From: Jovana Taylor Date: Tue, 3 Mar 2020 12:05:48 -0800 Subject: [PATCH 2/5] split train_model into two functions --- diabetes_regression/training/test_train.py | 26 +++++++++++++++++----- diabetes_regression/training/train.py | 16 ++++++++----- diabetes_regression/training/train_aml.py | 7 +++--- 3 files changed, 35 insertions(+), 14 deletions(-) diff --git a/diabetes_regression/training/test_train.py b/diabetes_regression/training/test_train.py index 845243f0..8020899b 100644 --- a/diabetes_regression/training/test_train.py +++ b/diabetes_regression/training/test_train.py @@ -1,20 +1,34 @@ import numpy as np -from diabetes_regression.training.train import train_model +from diabetes_regression.training.train import train_model, get_model_metrics -def test_train_model(): +def get_test_data(): X_train = np.array([1, 2, 3, 4, 5, 6]).reshape(-1, 1) y_train = np.array([10, 9, 8, 8, 6, 5]) X_test = np.array([3, 4]).reshape(-1, 1) y_test = np.array([8, 7]) data = {"train": {"X": X_train, "y": y_train}, "test": {"X": X_test, "y": y_test}} + return data - reg_model, metrics = train_model(data, {"alpha": 1.2}) - assert 'mse' in metrics - mse = metrics['mse'] - np.testing.assert_almost_equal(mse, 0.029843893480257067) +class MockModel: + + @staticmethod + def predict(data): + return ([8.12121212, 7.21212121]) + + +def test_train_model(): + reg_model = train_model(get_test_data(), {"alpha": 1.2}) preds = reg_model.predict([[1], [2]]) np.testing.assert_equal(preds, [9.93939393939394, 9.03030303030303]) + + +def test_get_model_metrics(): + metrics = get_model_metrics(MockModel(), get_test_data()) + + assert 'mse' in metrics + mse = metrics['mse'] + np.testing.assert_almost_equal(mse, 0.029843893480257067) diff --git a/diabetes_regression/training/train.py b/diabetes_regression/training/train.py index 671ce35d..22258042 100644 --- a/diabetes_regression/training/train.py +++ b/diabetes_regression/training/train.py @@ -43,14 +43,19 @@ def split_data(df): return data -# Train the model, return the model and metrics dictionary +# Train the model, return the model def train_model(data, ridge_args): reg_model = Ridge(**ridge_args) reg_model.fit(data["train"]["X"], data["train"]["y"]) - preds = reg_model.predict(data["test"]["X"]) + return reg_model + + +# Evaluate the metrics for the model +def get_model_metrics(model, data): + preds = model.predict(data["test"]["X"]) mse = mean_squared_error(preds, data["test"]["y"]) metrics = {"mse": mse} - return reg_model, metrics + return metrics def main(): @@ -67,9 +72,10 @@ def main(): data = split_data(train_df) # Train the model - model, metrics = train_model(data, ridge_args) + model = train_model(data, ridge_args) - # Log the metrics returned from the train function + # Log the metrics for the model + metrics = get_model_metrics(model, data) for (k, v) in metrics.items(): print(f"{k}: {v}") diff --git a/diabetes_regression/training/train_aml.py b/diabetes_regression/training/train_aml.py index e5c6ba1c..5bf76cb4 100644 --- a/diabetes_regression/training/train_aml.py +++ b/diabetes_regression/training/train_aml.py @@ -28,7 +28,7 @@ import argparse import joblib import json -from train import split_data, train_model +from train import split_data, train_model, get_model_metrics def register_dataset( @@ -147,9 +147,10 @@ def main(): data = split_data(df) # Train the model - model, metrics = train_model(data, train_args) + model = train_model(data, train_args) - # Log the metrics returned from the train function + # Evaluate and log the metrics returned from the train function + metrics = get_model_metrics(model, data) for (k, v) in metrics.items(): run.log(k, v) run.parent.log(k, v) From b3ed9098f53c343bf53370fa8e0f2ab0afa3e89e Mon Sep 17 00:00:00 2001 From: Jovana Taylor Date: Tue, 3 Mar 2020 12:10:19 -0800 Subject: [PATCH 3/5] make unit tests more self contained --- diabetes_regression/training/test_train.py | 30 ++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/diabetes_regression/training/test_train.py b/diabetes_regression/training/test_train.py index 8020899b..d121ecbc 100644 --- a/diabetes_regression/training/test_train.py +++ b/diabetes_regression/training/test_train.py @@ -2,32 +2,30 @@ from diabetes_regression.training.train import train_model, get_model_metrics -def get_test_data(): +def test_train_model(): X_train = np.array([1, 2, 3, 4, 5, 6]).reshape(-1, 1) y_train = np.array([10, 9, 8, 8, 6, 5]) - X_test = np.array([3, 4]).reshape(-1, 1) - y_test = np.array([8, 7]) - data = {"train": {"X": X_train, "y": y_train}, - "test": {"X": X_test, "y": y_test}} - return data + data = {"train": {"X": X_train, "y": y_train}} + reg_model = train_model(data, {"alpha": 1.2}) -class MockModel: + preds = reg_model.predict([[1], [2]]) + np.testing.assert_equal(preds, [9.93939393939394, 9.03030303030303]) - @staticmethod - def predict(data): - return ([8.12121212, 7.21212121]) +def test_get_model_metrics(): -def test_train_model(): - reg_model = train_model(get_test_data(), {"alpha": 1.2}) + class MockModel: - preds = reg_model.predict([[1], [2]]) - np.testing.assert_equal(preds, [9.93939393939394, 9.03030303030303]) + @staticmethod + def predict(data): + return ([8.12121212, 7.21212121]) + X_test = np.array([3, 4]).reshape(-1, 1) + y_test = np.array([8, 7]) + data = {"test": {"X": X_test, "y": y_test}} -def test_get_model_metrics(): - metrics = get_model_metrics(MockModel(), get_test_data()) + metrics = get_model_metrics(MockModel(), data) assert 'mse' in metrics mse = metrics['mse'] From b063abc1688b471286871f97e19767747eac055b Mon Sep 17 00:00:00 2001 From: Bryan Smith Date: Tue, 3 Mar 2020 13:55:53 -0800 Subject: [PATCH 4/5] Added Experiment and Pipeline notebooks --- experimentation/exp.ipynb | 718 +++++++++++++++++++++++++++++++++ experimentation/pipeline.ipynb | 646 +++++++++++++++++++++++++++++ 2 files changed, 1364 insertions(+) create mode 100644 experimentation/exp.ipynb create mode 100644 experimentation/pipeline.ipynb diff --git a/experimentation/exp.ipynb b/experimentation/exp.ipynb new file mode 100644 index 00000000..b6147055 --- /dev/null +++ b/experimentation/exp.ipynb @@ -0,0 +1,718 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Experiment with parameters for a Ridge Regression Model on the Diabetes Dataset" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This notebook is for experimenting with different parameters to train a ridge regression model on the Diabetes dataset." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "C:\\Users\\brysmith\\Source\\Repos\\MLOpsPython\n" + ] + } + ], + "source": [ + "# Change out of the experimentation directory\n", + "%cd .." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "import azureml.core\n", + "from azureml.core import Workspace" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Performing interactive authentication. Please follow the instructions on the terminal.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING - Note, we have launched a browser for you to login. For old experience with device code, use \"az login --use-device-code\"\n", + "WARNING - You have logged in. Now let us find all the subscriptions to which you have access...\n", + "WARNING - Failed to authenticate '{'additional_properties': {}, 'id': '/tenants/42cc3295-cd0e-449c-b98e-5ce5b560c1d3', 'tenant_id': '42cc3295-cd0e-449c-b98e-5ce5b560c1d3'}' due to error 'Get Token request returned http error: 400 and server response: {\"error\":\"interaction_required\",\"error_description\":\"AADSTS50158: External security challenge not satisfied.\\r\\nTrace ID: 1e188174-b55f-449a-b42f-b60752d63300\\r\\nCorrelation ID: 976b40a0-2d3f-4848-8220-dc9dafabac4e\\r\\nTimestamp: 2020-03-03 20:09:21Z\",\"error_codes\":[50158],\"timestamp\":\"2020-03-03 20:09:21Z\",\"trace_id\":\"1e188174-b55f-449a-b42f-b60752d63300\",\"correlation_id\":\"976b40a0-2d3f-4848-8220-dc9dafabac4e\",\"error_uri\":\"https://login.microsoftonline.com/error?code=50158\",\"suberror\":\"basic_action\"}'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Interactive authentication successfully completed.\n" + ] + } + ], + "source": [ + "# Load the workspace from the saved config file\n", + "ws = Workspace.from_config()" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'diabetes-training\\\\train.py'" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import os, shutil\n", + "\n", + "# Create a folder for the experiment files\n", + "training_folder = 'diabetes-training'\n", + "os.makedirs(training_folder, exist_ok=True)\n", + "\n", + "# Copy the data file into the experiment folder\n", + "shutil.copy('data/diabetes.csv', os.path.join(training_folder, \"diabetes.csv\"))\n", + "\n", + "# Copy the train functions into the experiment folder\n", + "shutil.copy('diabetes_regression/training/train.py', os.path.join(training_folder, \"train.py\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Writing diabetes-training/parameters.json\n" + ] + } + ], + "source": [ + "%%writefile $training_folder/parameters.json\n", + "{\n", + " \"training\":\n", + " {\n", + " \"alpha\": 0.3\n", + " },\n", + " \"evaluation\":\n", + " {\n", + "\n", + " },\n", + " \"scoring\":\n", + " {\n", + " \n", + " }\n", + "}\n" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Writing diabetes-training/diabetes_training.py\n" + ] + } + ], + "source": [ + "%%writefile $training_folder/diabetes_training.py\n", + "# Import libraries\n", + "from azureml.core import Run\n", + "import pandas as pd\n", + "import shutil\n", + "\n", + "from train import split_data, train_model\n", + "\n", + "# Get the experiment run context\n", + "run = Run.get_context()\n", + "\n", + "# load the diabetes dataset\n", + "print(\"Loading Data...\")\n", + "train_df = pd.read_csv('diabetes.csv')\n", + "\n", + "data = split_data(train_df)\n", + "\n", + "# Specify the parameters to test\n", + "with open(\"parameters.json\") as f:\n", + " pars = json.load(f)\n", + " train_args = pars[\"training\"]\n", + "\n", + "# Log parameters\n", + "for k, v in train_args.items():\n", + " run.log(k, v)\n", + "\n", + "model, metrics = train_model(data, train_args)\n", + "\n", + "# Log metrics\n", + "for k, v in metrics.items():\n", + " run.log(k, v)\n", + "\n", + "# Save the parameters file to the outputs folder\n", + "os.makedirs('outputs', exist_ok=True)\n", + "shutil.copy('parameters.json', os.path.join('outputs', 'parameters.json'))\n", + " \n", + "run.complete()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RunId: diabetes-training_1583266166_a12fa3dc\n", + "Web View: https://mlworkspace.azure.ai/portal/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training/runs/diabetes-training_1583266166_a12fa3dc\n", + "\n", + "Streaming azureml-logs/60_control_log.txt\n", + "=========================================\n", + "\n", + "Streaming log file azureml-logs/60_control_log.txt\n", + "Starting the daemon thread to refresh tokens in background for process with pid = 14668\n", + "Running: ['cmd.exe', '/c', 'C:\\\\Users\\\\brysmith\\\\AppData\\\\Local\\\\Temp\\\\azureml_runs\\\\diabetes-training_1583266166_a12fa3dc\\\\azureml-environment-setup/docker_env_checker.bat']\n", + "\n", + "Materialized image not found on target: azureml/azureml_942e102c8fd48681f49452a15f3fb0f4\n", + "\n", + "\n", + "Logging experiment preparation status in history service.\n", + "Running: ['cmd.exe', '/c', 'C:\\\\Users\\\\brysmith\\\\AppData\\\\Local\\\\Temp\\\\azureml_runs\\\\diabetes-training_1583266166_a12fa3dc\\\\azureml-environment-setup/docker_env_builder.bat']\n", + "Running: ['docker', 'build', '-f', 'azureml-environment-setup/Dockerfile', '-t', 'azureml/azureml_942e102c8fd48681f49452a15f3fb0f4', '.']\n", + "Sending build context to Docker daemon 440.8kB\n", + "Step 1/14 : FROM mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04@sha256:a1b514f3ba884b9a7695cbba5638933ddaf222e8ce3e8c81e8cdf861679abb05\n", + "sha256:a1b514f3ba884b9a7695cbba5638933ddaf222e8ce3e8c81e8cdf861679abb05: Pulling from azureml/base\n", + "a1298f4ce990: Pulling fs layer\n", + "04a3282d9c4b: Pulling fs layer\n", + "9b0d3db6dc03: Pulling fs layer\n", + "8269c605f3f1: Pulling fs layer\n", + "6504d449e70c: Pulling fs layer\n", + "4e38f320d0d4: Pulling fs layer\n", + "b0a763e8ee03: Pulling fs layer\n", + "11917a028ca4: Pulling fs layer\n", + "a6c378d11cbf: Pulling fs layer\n", + "6cc007ad9140: Pulling fs layer\n", + "6c1698a608f3: Pulling fs layer\n", + "8269c605f3f1: Waiting\n", + "6504d449e70c: Waiting\n", + "4e38f320d0d4: Waiting\n", + "b0a763e8ee03: Waiting\n", + "11917a028ca4: Waiting\n", + "a6c378d11cbf: Waiting\n", + "6cc007ad9140: Waiting\n", + "6c1698a608f3: Waiting\n", + "04a3282d9c4b: Verifying Checksum\n", + "04a3282d9c4b: Download complete\n", + "9b0d3db6dc03: Download complete\n", + "8269c605f3f1: Verifying Checksum\n", + "8269c605f3f1: Download complete\n", + "a1298f4ce990: Verifying Checksum\n", + "a1298f4ce990: Download complete\n", + "4e38f320d0d4: Verifying Checksum\n", + "4e38f320d0d4: Download complete\n", + "a1298f4ce990: Pull complete\n", + "04a3282d9c4b: Pull complete\n", + "9b0d3db6dc03: Pull complete\n", + "8269c605f3f1: Pull complete\n", + "b0a763e8ee03: Verifying Checksum\n", + "b0a763e8ee03: Download complete\n", + "6504d449e70c: Verifying Checksum\n", + "6504d449e70c: Download complete\n", + "11917a028ca4: Verifying Checksum\n", + "11917a028ca4: Download complete\n", + "6cc007ad9140: Verifying Checksum\n", + "6cc007ad9140: Download complete\n", + "a6c378d11cbf: Verifying Checksum\n", + "a6c378d11cbf: Download complete\n", + "6c1698a608f3: Verifying Checksum\n", + "6c1698a608f3: Download complete\n", + "6504d449e70c: Pull complete\n", + "4e38f320d0d4: Pull complete\n", + "b0a763e8ee03: Pull complete\n", + "11917a028ca4: Pull complete\n", + "a6c378d11cbf: Pull complete\n", + "6cc007ad9140: Pull complete\n", + "6c1698a608f3: Pull complete\n", + "Digest: sha256:a1b514f3ba884b9a7695cbba5638933ddaf222e8ce3e8c81e8cdf861679abb05\n", + "Status: Downloaded newer image for mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04@sha256:a1b514f3ba884b9a7695cbba5638933ddaf222e8ce3e8c81e8cdf861679abb05\n", + " ---> 93a72e6bd1ce\n", + "Step 2/14 : USER root\n", + " ---> Running in ccb78e3f8cb1\n", + "Removing intermediate container ccb78e3f8cb1\n", + " ---> 9492eb08e712\n", + "Step 3/14 : RUN mkdir -p $HOME/.cache\n", + " ---> Running in 345018e23095\n", + "Removing intermediate container 345018e23095\n", + " ---> 84c815f63781\n", + "Step 4/14 : WORKDIR /\n", + " ---> Running in dac4137ec988\n", + "Removing intermediate container dac4137ec988\n", + " ---> 026bc49e1fc7\n", + "Step 5/14 : COPY azureml-environment-setup/99brokenproxy /etc/apt/apt.conf.d/\n", + " ---> bdbaac820e6f\n", + "Step 6/14 : RUN if dpkg --compare-versions `conda --version | grep -oE '[^ ]+$'` lt 4.4.11; then conda install conda==4.4.11; fi\n", + " ---> Running in 07a0646408e0\n", + "Removing intermediate container 07a0646408e0\n", + " ---> df90c35bdf32\n", + "Step 7/14 : COPY azureml-environment-setup/mutated_conda_dependencies.yml azureml-environment-setup/mutated_conda_dependencies.yml\n", + " ---> 5ef66b75b1dd\n", + "Step 8/14 : RUN ldconfig /usr/local/cuda/lib64/stubs && conda env create -p /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83 -f azureml-environment-setup/mutated_conda_dependencies.yml && rm -rf \"$HOME/.cache/pip\" && conda clean -aqy && CONDA_ROOT_DIR=$(conda info --root) && rm -rf \"$CONDA_ROOT_DIR/pkgs\" && find \"$CONDA_ROOT_DIR\" -type d -name __pycache__ -exec rm -rf {} + && ldconfig\n", + " ---> Running in 5da8256aa492\n", + "Solving environment: ...working... done\n", + "\u001b[91m\n", + "\n", + "==> WARNING: A newer version of conda exists. <==\n", + " current version: 4.5.11\n", + " latest version: 4.8.2\n", + "\n", + "Please update conda by running\n", + "\n", + " $ conda update -n base -c defaults conda\n", + "\n", + "\n", + "setuptools-45.2.0 | 653 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "xz-5.2.4 | 366 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "_openmp_mutex-4.5 | 5 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "libstdcxx-ng-9.2.0 | 4.5 MB | ########## | 100% \u001b[0m\u001b[91m\n", + "sqlite-3.13.0 | 4.9 MB | ########## | 100% \u001b[0m\u001b[91m\n", + "joblib-0.14.1 | 198 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "pip-20.0.2 | 1.0 MB | ########## | 100% \u001b[0m\u001b[91m\n", + "libcblas-3.8.0 | 10 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "llvm-openmp-9.0.1 | 782 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "certifi-2019.11.28 | 149 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "libopenblas-0.3.8 | 7.8 MB | ########## | 100% \u001b[0m\u001b[91m\n", + "scipy-1.4.1 | 18.9 MB | ########## | 100% \u001b[0m\u001b[91m\n", + "libgcc-ng-9.2.0 | 8.2 MB | ########## | 100% \u001b[0m\u001b[91m\n", + "wheel-0.34.2 | 24 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "libblas-3.8.0 | 10 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "readline-6.2 | 713 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "libgfortran-ng-7.3.0 | 1.7 MB | ########## | 100% \u001b[0m\u001b[91m\n", + "liblapack-3.8.0 | 10 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "python-3.6.2 | 19.0 MB | ########## | 100% \u001b[0m\u001b[91m\n", + "ncurses-5.9 | 1.1 MB | ########## | 100% \u001b[0m\u001b[91m\n", + "scikit-learn-0.22.1 | 7.1 MB | ########## | 100% \u001b[0m\u001b[91m\n", + "numpy-1.18.1 | 5.2 MB | ########## | 100% \u001b[0m\u001b[91m\n", + "zlib-1.2.11 | 105 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "ca-certificates-2019 | 145 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "tk-8.5.19 | 1.9 MB | ########## | 100% \u001b[0m\u001b[91m\n", + "_libgcc_mutex-0.1 | 3 KB | ########## | 100% \u001b[0m\u001b[91m\n", + "openssl-1.0.2u | 3.2 MB | ########## | 100% \u001b[0m\n", + "Downloading and Extracting Packages\n", + "Preparing transaction: ...working... done\n", + "Verifying transaction: ...working... done\n", + "Executing transaction: ...working... done\n", + "Collecting azureml-defaults\n", + " Downloading azureml_defaults-1.0.85.1-py2.py3-none-any.whl (3.0 kB)\n", + "Collecting json-logging-py==0.2\n", + " Downloading json-logging-py-0.2.tar.gz (3.6 kB)\n", + "Collecting configparser==3.7.4\n", + " Downloading configparser-3.7.4-py2.py3-none-any.whl (22 kB)\n", + "Collecting applicationinsights>=0.11.7\n", + " Downloading applicationinsights-0.11.9-py2.py3-none-any.whl (58 kB)\n", + "Collecting flask==1.0.3\n", + " Downloading Flask-1.0.3-py2.py3-none-any.whl (92 kB)\n", + "Collecting azureml-core==1.0.85.*\n", + " Downloading azureml_core-1.0.85.5-py2.py3-none-any.whl (1.2 MB)\n", + "Collecting gunicorn==19.9.0\n", + " Downloading gunicorn-19.9.0-py2.py3-none-any.whl (112 kB)\n", + "Collecting azureml-model-management-sdk==1.0.1b6.post1\n", + " Downloading azureml_model_management_sdk-1.0.1b6.post1-py2.py3-none-any.whl (130 kB)\n", + "Collecting werkzeug==0.16.1\n", + " Downloading Werkzeug-0.16.1-py2.py3-none-any.whl (327 kB)\n", + "Collecting itsdangerous>=0.24\n", + " Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)\n", + "Collecting Jinja2>=2.10\n", + " Downloading Jinja2-2.11.1-py2.py3-none-any.whl (126 kB)\n", + "Collecting click>=5.1\n", + " Downloading Click-7.0-py2.py3-none-any.whl (81 kB)\n", + "Collecting python-dateutil>=2.7.3\n", + " Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)\n", + "Collecting backports.tempfile\n", + " Downloading backports.tempfile-1.0-py2.py3-none-any.whl (4.4 kB)\n", + "Collecting azure-mgmt-authorization>=0.40.0\n", + " Downloading azure_mgmt_authorization-0.60.0-py2.py3-none-any.whl (82 kB)\n", + "Collecting jmespath\n", + " Downloading jmespath-0.9.5-py2.py3-none-any.whl (24 kB)\n", + "Collecting PyJWT\n", + " Downloading PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)\n", + "Collecting pathspec\n", + " Downloading pathspec-0.7.0-py2.py3-none-any.whl (25 kB)\n", + "Collecting requests>=2.19.1\n", + " Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)\n", + "Collecting adal>=1.2.0\n", + " Downloading adal-1.2.2-py2.py3-none-any.whl (53 kB)\n", + "Collecting docker\n", + " Downloading docker-4.2.0-py2.py3-none-any.whl (143 kB)\n", + "Collecting jsonpickle\n", + " Downloading jsonpickle-1.3-py2.py3-none-any.whl (32 kB)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collecting msrest>=0.5.1\n", + " Downloading msrest-0.6.11-py2.py3-none-any.whl (83 kB)\n", + "Collecting pytz\n", + " Downloading pytz-2019.3-py2.py3-none-any.whl (509 kB)\n", + "Collecting azure-graphrbac>=0.40.0\n", + " Downloading azure_graphrbac-0.61.1-py2.py3-none-any.whl (141 kB)\n", + "Collecting six>=1.11.0\n", + " Downloading six-1.14.0-py2.py3-none-any.whl (10 kB)\n", + "Collecting SecretStorage\n", + " Downloading SecretStorage-3.1.2-py3-none-any.whl (14 kB)\n", + "Collecting azure-mgmt-containerregistry>=2.0.0\n", + " Downloading azure_mgmt_containerregistry-2.8.0-py2.py3-none-any.whl (718 kB)\n", + "Collecting azure-mgmt-storage>=1.5.0\n", + " Downloading azure_mgmt_storage-8.0.0-py2.py3-none-any.whl (524 kB)\n", + "Collecting azure-common>=1.1.12\n", + " Downloading azure_common-1.1.24-py2.py3-none-any.whl (12 kB)\n", + "Collecting cryptography!=1.9,!=2.0.*,!=2.1.*,!=2.2.*\n", + " Downloading cryptography-2.8-cp34-abi3-manylinux2010_x86_64.whl (2.3 MB)\n", + "Collecting azure-mgmt-keyvault>=0.40.0\n", + " Downloading azure_mgmt_keyvault-2.1.1-py2.py3-none-any.whl (117 kB)\n", + "Collecting contextlib2\n", + " Downloading contextlib2-0.6.0.post1-py2.py3-none-any.whl (9.8 kB)\n", + "Collecting pyopenssl\n", + " Downloading pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB)\n", + "Collecting ndg-httpsclient\n", + " Downloading ndg_httpsclient-0.5.1-py3-none-any.whl (34 kB)\n", + "Collecting urllib3>=1.23\n", + " Downloading urllib3-1.25.8-py2.py3-none-any.whl (125 kB)\n", + "Collecting azure-mgmt-resource>=1.2.1\n", + " Downloading azure_mgmt_resource-8.0.1-py2.py3-none-any.whl (758 kB)\n", + "Collecting ruamel.yaml<=0.15.89,>=0.15.35\n", + " Downloading ruamel.yaml-0.15.89-cp36-cp36m-manylinux1_x86_64.whl (651 kB)\n", + "Collecting msrestazure>=0.4.33\n", + " Downloading msrestazure-0.6.2-py2.py3-none-any.whl (40 kB)\n", + "Collecting liac-arff>=2.1.1\n", + " Downloading liac-arff-2.4.0.tar.gz (15 kB)\n", + "Collecting dill>=0.2.7.1\n", + " Downloading dill-0.3.1.1.tar.gz (151 kB)\n", + "Requirement already satisfied: numpy>=1.13.0 in /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/lib/python3.6/site-packages (from azureml-model-management-sdk==1.0.1b6.post1->azureml-defaults->-r /azureml-environment-setup/condaenv._awm0369.requirements.txt (line 1)) (1.18.1)\n", + "Collecting pandas>=0.20.2\n", + " Downloading pandas-1.0.1-cp36-cp36m-manylinux1_x86_64.whl (10.1 MB)\n", + "Collecting MarkupSafe>=0.23\n", + " Downloading MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl (27 kB)\n", + "Collecting backports.weakref\n", + " Downloading backports.weakref-1.0.post1-py2.py3-none-any.whl (5.2 kB)\n", + "Collecting idna<3,>=2.5\n", + " Downloading idna-2.9-py2.py3-none-any.whl (58 kB)\n", + "Collecting chardet<4,>=3.0.2\n", + " Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/lib/python3.6/site-packages (from requests>=2.19.1->azureml-core==1.0.85.*->azureml-defaults->-r /azureml-environment-setup/condaenv._awm0369.requirements.txt (line 1)) (2019.11.28)\n", + "Collecting websocket-client>=0.32.0\n", + " Downloading websocket_client-0.57.0-py2.py3-none-any.whl (200 kB)\n", + "Collecting isodate>=0.6.0\n", + " Downloading isodate-0.6.0-py2.py3-none-any.whl (45 kB)\n", + "Collecting requests-oauthlib>=0.5.0\n", + " Downloading requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)\n", + "Collecting jeepney>=0.4.2\n", + " Downloading jeepney-0.4.2-py3-none-any.whl (21 kB)\n", + "Collecting cffi!=1.11.3,>=1.8\n", + " Downloading cffi-1.14.0-cp36-cp36m-manylinux1_x86_64.whl (399 kB)\n", + "Collecting pyasn1>=0.1.1\n", + " Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)\n", + "Collecting oauthlib>=3.0.0\n", + " Downloading oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)\n", + "Collecting pycparser\n", + " Downloading pycparser-2.19.tar.gz (158 kB)\n", + "Building wheels for collected packages: json-logging-py, liac-arff, dill, pycparser\n", + " Building wheel for json-logging-py (setup.py): started\n", + " Building wheel for json-logging-py (setup.py): finished with status 'done'\n", + " Created wheel for json-logging-py: filename=json_logging_py-0.2-py3-none-any.whl size=3923 sha256=d2389923d5fa749959e34ba99e193cfca7c52e3d6157eea15c3fc81f6fe26a52\n", + " Stored in directory: /root/.cache/pip/wheels/e2/1d/52/535a274b9c2ce7d4064838f2bdb62013801281ef7d7f21e2ee\n", + " Building wheel for liac-arff (setup.py): started\n", + " Building wheel for liac-arff (setup.py): finished with status 'done'\n", + " Created wheel for liac-arff: filename=liac_arff-2.4.0-py3-none-any.whl size=13333 sha256=e0cc6e1444ba030cc8494be10458deddbad063265c56cbe0a61b7cfe1f4391b1\n", + " Stored in directory: /root/.cache/pip/wheels/ba/2a/e1/6f7be2e2ea150e2486bff64fd6f0670f4f35f4c8f31c819fb8\n", + " Building wheel for dill (setup.py): started\n", + " Building wheel for dill (setup.py): finished with status 'done'\n", + " Created wheel for dill: filename=dill-0.3.1.1-py3-none-any.whl size=78530 sha256=71bb549eeb11790f4c5b80740982bfaf3f97e22e38d7b630935a76ce02d07da1\n", + " Stored in directory: /root/.cache/pip/wheels/09/84/74/d2b4feb9ac9488bc83c475cb2cbe8e8b7d9cea8320d32f3787\n", + " Building wheel for pycparser (setup.py): started\n", + " Building wheel for pycparser (setup.py): finished with status 'done'\n", + " Created wheel for pycparser: filename=pycparser-2.19-py2.py3-none-any.whl size=111031 sha256=e21fb51230c57b5ba0a2ee68ce1b31d347bae178a3d717f7a061e39c78c5754a\n", + " Stored in directory: /root/.cache/pip/wheels/c6/6b/83/2608afaa57ecfb0a66ac89191a8d9bad71c62ca55ee499c2d0\n", + "Successfully built json-logging-py liac-arff dill pycparser\n", + "Installing collected packages: json-logging-py, configparser, applicationinsights, itsdangerous, MarkupSafe, Jinja2, click, werkzeug, flask, six, python-dateutil, backports.weakref, backports.tempfile, azure-common, idna, chardet, urllib3, requests, pycparser, cffi, cryptography, PyJWT, adal, isodate, oauthlib, requests-oauthlib, msrest, msrestazure, azure-mgmt-authorization, jmespath, pathspec, websocket-client, docker, jsonpickle, pytz, azure-graphrbac, jeepney, SecretStorage, azure-mgmt-containerregistry, azure-mgmt-storage, azure-mgmt-keyvault, contextlib2, pyopenssl, pyasn1, ndg-httpsclient, azure-mgmt-resource, ruamel.yaml, azureml-core, gunicorn, liac-arff, dill, pandas, azureml-model-management-sdk, azureml-defaults\n", + "Successfully installed Jinja2-2.11.1 MarkupSafe-1.1.1 PyJWT-1.7.1 SecretStorage-3.1.2 adal-1.2.2 applicationinsights-0.11.9 azure-common-1.1.24 azure-graphrbac-0.61.1 azure-mgmt-authorization-0.60.0 azure-mgmt-containerregistry-2.8.0 azure-mgmt-keyvault-2.1.1 azure-mgmt-resource-8.0.1 azure-mgmt-storage-8.0.0 azureml-core-1.0.85.5 azureml-defaults-1.0.85.1 azureml-model-management-sdk-1.0.1b6.post1 backports.tempfile-1.0 backports.weakref-1.0.post1 cffi-1.14.0 chardet-3.0.4 click-7.0 configparser-3.7.4 contextlib2-0.6.0.post1 cryptography-2.8 dill-0.3.1.1 docker-4.2.0 flask-1.0.3 gunicorn-19.9.0 idna-2.9 isodate-0.6.0 itsdangerous-1.1.0 jeepney-0.4.2 jmespath-0.9.5 json-logging-py-0.2 jsonpickle-1.3 liac-arff-2.4.0 msrest-0.6.11 msrestazure-0.6.2 ndg-httpsclient-0.5.1 oauthlib-3.1.0 pandas-1.0.1 pathspec-0.7.0 pyasn1-0.4.8 pycparser-2.19 pyopenssl-19.1.0 python-dateutil-2.8.1 pytz-2019.3 requests-2.23.0 requests-oauthlib-1.3.0 ruamel.yaml-0.15.89 six-1.14.0 urllib3-1.25.8 websocket-client-0.57.0 werkzeug-0.16.1\n", + "\u001b[91m\n", + "\u001b[0m#\n", + "# To activate this environment, use:\n", + "# > source activate /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83\n", + "#\n", + "# To deactivate an active environment, use:\n", + "# > source deactivate\n", + "#\n", + "\n", + "Removing intermediate container 5da8256aa492\n", + " ---> d579e138ca80\n", + "Step 9/14 : ENV PATH /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/bin:$PATH\n", + " ---> Running in dd45842a3493\n", + "Removing intermediate container dd45842a3493\n", + " ---> 71036e78cc11\n", + "Step 10/14 : ENV AZUREML_CONDA_ENVIRONMENT_PATH /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83\n", + " ---> Running in c7ae65dd8cca\n", + "Removing intermediate container c7ae65dd8cca\n", + " ---> 8935ec724023\n", + "Step 11/14 : ENV LD_LIBRARY_PATH /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/lib:$LD_LIBRARY_PATH\n", + " ---> Running in 8d351c85fad7\n", + "Removing intermediate container 8d351c85fad7\n", + " ---> c52acf9440c8\n", + "Step 12/14 : COPY azureml-environment-setup/spark_cache.py azureml-environment-setup/log4j.properties /azureml-environment-setup/\n", + " ---> 48f7a0edbcc9\n", + "Step 13/14 : ENV AZUREML_ENVIRONMENT_IMAGE True\n", + " ---> Running in 38335f62c1b0\n", + "Removing intermediate container 38335f62c1b0\n", + " ---> 4f87cfd880ba\n", + "Step 14/14 : CMD [\"bash\"]\n", + " ---> Running in cc09f57ba09c\n", + "Removing intermediate container cc09f57ba09c\n", + " ---> bc6821282c9d\n", + "Successfully built bc6821282c9d\n", + "Successfully tagged azureml/azureml_942e102c8fd48681f49452a15f3fb0f4:latest\n", + "SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.\n", + "\n", + "\n", + "\n", + "\n", + "Logging experiment running status in history service.\n", + "Running: ['docker', 'run', '--name', 'diabetes-training_1583266166_a12fa3dc', '--rm', '-v', 'C:\\\\Users\\\\brysmith\\\\AppData\\\\Local\\\\Temp\\\\azureml_runs\\\\diabetes-training_1583266166_a12fa3dc:/azureml-run', '--shm-size', '2g', '-e', 'EXAMPLE_ENV_VAR=EXAMPLE_VALUE', '-e', 'AZUREML_CONTEXT_MANAGER_TRACKUSERERROR=eyJTa2lwSGlzdG9yeUltcG9ydENoZWNrIjoiRmFsc2UifQ==', '-e', 'AZUREML_CONTEXT_MANAGER_RUNHISTORY=eyJPdXRwdXRDb2xsZWN0aW9uIjp0cnVlLCJEaXJlY3Rvcmllc1RvV2F0Y2giOlsibG9ncyJdLCJzbmFwc2hvdFByb2plY3QiOnRydWV9', '-e', 'AZUREML_CONTEXT_MANAGER_PROJECTPYTHONPATH=bnVsbA==', '-e', 'AZUREML_RUN_TOKEN_EXPIRY=1585080567', '-e', 'AZUREML_RUN_TOKEN=eyJhbGciOiJSUzI1NiIsImtpZCI6IjQ4RDdBNjI3NjYxODI4RUY1QTEyQjEwNTg4MkI2MjY1Q0Q3NzQxRkUiLCJ0eXAiOiJKV1QifQ.eyJyb2xlIjoiQ29udHJpYnV0b3IiLCJzY29wZSI6Ii9zdWJzY3JpcHRpb25zLzQ4ZDQwNGY2LTNhNjktNDU1Mi1hMjEwLWIxYWZlNTUzN2NjMS9yZXNvdXJjZUdyb3Vwcy9tbG9wc29ocmcvcHJvdmlkZXJzL01pY3Jvc29mdC5NYWNoaW5lTGVhcm5pbmdTZXJ2aWNlcy93b3Jrc3BhY2VzL21sb3Bzb2gtd3MiLCJhY2NvdW50aWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJ3b3Jrc3BhY2VJZCI6IjE2NzBkYzc5LTkxYzQtNGZkNy05NDAyLTBhMjczYjdhMWU3ZSIsInByb2plY3RpZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCIsImRpc2NvdmVyeSI6InVyaTovL2Rpc2NvdmVyeXVyaS8iLCJ0aWQiOiI3MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDciLCJvaWQiOiJjOTk3NGE5MS04ZTk4LTRiMTUtOWQwZi1hMzA0ZTMzODVlZWYiLCJwdWlkIjoiMTAwM0JGRkQ4NDZDNDNFQSIsImlzcyI6ImF6dXJlbWwiLCJhcHBpZCI6IkJyeWFuIFNtaXRoIChNTCkiLCJleHAiOjE1ODUwODA1NjcsImF1ZCI6ImF6dXJlbWwifQ.oXXpMn9g4XzqepGHS93xd514E6bnlC6bbri4bv4EBpp6Cb1_GWvkexA4t8K0BYtNbVEwnCDNrE7V8R0r5TvWYCRKnB0vAhDhSXqV_51HrXN8NGcj_oiLi4_oOJ_kHtwxraHTrjXZTsqz2f6IJTwKQeAT01ZQAnBFsP3Hf8ds7V5S8LOjxqXleWelIWnwm5zXN4zhTi_W_K2Wq7CPIUOo_6k4fqVyKHAD5si_hutkC_zjEiQpCiNAMJBWU69Gto-xYspFx2xB1eV-6u-4hKBhv2N3XCA_RJ5ftdREhZJVn5WtrgSOBuLf-3JHRO99LAHade29xz0E_XXJXl9lkisVyg', '-e', 'HBI_WORKSPACE_JOB=false', '-e', 'AZUREML_RUN_TOKEN_RAND=0fa9806f-b4a7-45ba-a824-9844b3afbfd4', '-e', 'AZUREML_RUN_TOKEN_PASS=1b9d6e6f-a778-4420-a828-0210bab0bf6b', '-e', 'PYTHONUNBUFFERED=True', '-e', 'AZUREML_COMMUNICATOR=None', '-e', 'AZUREML_FRAMEWORK=Python', '-e', 'AZUREML_ARM_PROJECT_NAME=diabetes-training', '-e', 'AZUREML_ARM_WORKSPACE_NAME=mlopsoh-ws', '-e', 'AZUREML_ARM_SUBSCRIPTION=48d404f6-3a69-4552-a210-b1afe5537cc1', '-e', 'AZUREML_ARM_RESOURCEGROUP=mlopsohrg', '-e', 'AZUREML_EXPERIMENT_SCOPE=/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training', '-e', 'AZUREML_WORKSPACE_ID=1670dc79-91c4-4fd7-9402-0a273b7a1e7e', '-e', 'AZUREML_WORKSPACE_SCOPE=/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws', '-e', 'AZUREML_DATA_CONTAINER_ID=dcid.diabetes-training_1583266166_a12fa3dc', '-e', 'AZUREML_DISCOVERY_SERVICE_ENDPOINT=https://westus2.experiments.azureml.net/discovery', '-e', 'AZUREML_RUN_HISTORY_SERVICE_ENDPOINT=https://westus2.experiments.azureml.net', '-e', 'AZUREML_SERVICE_ENDPOINT=https://westus2.experiments.azureml.net', '-e', 'AZUREML_RUN_CONFIGURATION=azureml-setup/mutated_run_configuration.json', '-e', 'AZUREML_INSTRUMENTATION_KEY=2d586587-4df8-4336-9af2-277fe3c5d9cd', '-e', 'AZUREML_DRIVERLOG_PATH=azureml-logs/driver_log.txt', '-e', 'TELEMETRY_LOGS=azureml-logs/telemetry_logs/', '-e', 'FAIRLEARN_LOGS=azureml-logs/telemetry_logs/fairlearn_log.txt', '-e', 'INTERPRET_TEXT_LOGS=azureml-logs/telemetry_logs/interpret_text_log.txt', '-e', 'INTERPRET_C_LOGS=azureml-logs/telemetry_logs/interpret_community_log.txt', '-e', 'AZUREML_JOBRELEASELOG_PATH=azureml-logs/job_release_log.txt', '-e', 'AZUREML_JOBPREPLOG_PATH=azureml-logs/job_prep_log.txt', '-e', 'AZUREML_CONTROLLOG_PATH=azureml-logs/control_log.txt', '-e', 'AZUREML_LOGDIRECTORY_PATH=azureml-logs/', '-e', 'AZUREML_PIDFILE_PATH=azureml-setup/pid.txt', '-e', 'AZUREML_RUN_ID=diabetes-training_1583266166_a12fa3dc', 'azureml/azureml_942e102c8fd48681f49452a15f3fb0f4', '/bin/bash', '-c', 'cd /azureml-run && \"/azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/bin/python\" \"azureml-setup/run_script.py\" \"/azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/bin/python\" \"azureml-setup/context_manager_injector.py\" \"-i\" \"ProjectPythonPath:context_managers.ProjectPythonPath\" \"-i\" \"RunHistory:context_managers.RunHistory\" \"-i\" \"TrackUserError:context_managers.TrackUserError\" \"-i\" \"UserExceptions:context_managers.UserExceptions\" \"diabetes_training.py\"']\n", + "/bin/bash: /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/lib/libtinfo.so.5: no version information available (required by /bin/bash)\n", + "Streaming log file azureml-logs/70_driver_log.txt\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Streaming azureml-logs/70_driver_log.txt\n", + "========================================\n", + "\n", + "Starting the daemon thread to refresh tokens in background for process with pid = 8\n", + "Entering Run History Context Manager.\n", + "Preparing to call script [ diabetes_training.py ] with arguments: []\n", + "After variable expansion, calling script [ diabetes_training.py ] with arguments: []\n", + "\n", + "Loading Data...\n", + "\n", + "\n", + "The experiment completed successfully. Finalizing run...\n", + "Logging experiment finalizing status in history service.\n", + "Starting the daemon thread to refresh tokens in background for process with pid = 8\n", + "Cleaning up all outstanding Run operations, waiting 300.0 seconds\n", + "2 items cleaning up...\n", + "Cleanup took 0.01858043670654297 seconds\n", + "\n", + "Execution Summary\n", + "=================\n", + "RunId: diabetes-training_1583266166_a12fa3dc\n", + "Web View: https://mlworkspace.azure.ai/portal/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training/runs/diabetes-training_1583266166_a12fa3dc\n", + "\n" + ] + }, + { + "data": { + "text/plain": [ + "{'runId': 'diabetes-training_1583266166_a12fa3dc',\n", + " 'target': 'local',\n", + " 'status': 'Completed',\n", + " 'startTimeUtc': '2020-03-03T20:12:24.785499Z',\n", + " 'endTimeUtc': '2020-03-03T20:12:33.184738Z',\n", + " 'properties': {'_azureml.ComputeTargetType': 'local',\n", + " 'ContentSnapshotId': '506b34b4-2bdd-42b8-b717-9c0618480bfb',\n", + " 'azureml.git.repository_uri': 'https://github.com/microsoft/MLOpsPython.git',\n", + " 'mlflow.source.git.repoURL': 'https://github.com/microsoft/MLOpsPython.git',\n", + " 'azureml.git.branch': 'jotaylo/split_train_script',\n", + " 'mlflow.source.git.branch': 'jotaylo/split_train_script',\n", + " 'azureml.git.commit': '3df51833d143b722e578d0ae84181cb63bf78747',\n", + " 'mlflow.source.git.commit': '3df51833d143b722e578d0ae84181cb63bf78747',\n", + " 'azureml.git.dirty': 'True'},\n", + " 'inputDatasets': [],\n", + " 'runDefinition': {'script': 'diabetes_training.py',\n", + " 'useAbsolutePath': False,\n", + " 'arguments': [],\n", + " 'sourceDirectoryDataStore': None,\n", + " 'framework': 'Python',\n", + " 'communicator': 'None',\n", + " 'target': 'local',\n", + " 'dataReferences': {},\n", + " 'data': {},\n", + " 'jobName': None,\n", + " 'maxRunDurationSeconds': None,\n", + " 'nodeCount': 1,\n", + " 'environment': {'name': 'Experiment diabetes-training Environment',\n", + " 'version': 'Autosave_2020-03-03T20:09:27Z_e77ba799',\n", + " 'python': {'interpreterPath': 'python',\n", + " 'userManagedDependencies': False,\n", + " 'condaDependencies': {'channels': ['conda-forge'],\n", + " 'dependencies': ['python=3.6.2',\n", + " {'pip': ['azureml-defaults']},\n", + " 'scikit-learn'],\n", + " 'name': 'azureml_2ec026640b47025e72b68c7988b68c83'},\n", + " 'baseCondaEnvironment': None},\n", + " 'environmentVariables': {'EXAMPLE_ENV_VAR': 'EXAMPLE_VALUE'},\n", + " 'docker': {'baseImage': 'mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04',\n", + " 'baseDockerfile': None,\n", + " 'baseImageRegistry': {'address': None, 'username': None, 'password': None},\n", + " 'enabled': True,\n", + " 'arguments': []},\n", + " 'spark': {'repositories': [], 'packages': [], 'precachePackages': False},\n", + " 'inferencingStackVersion': None},\n", + " 'history': {'outputCollection': True,\n", + " 'directoriesToWatch': ['logs'],\n", + " 'snapshotProject': True},\n", + " 'spark': {'configuration': {'spark.app.name': 'Azure ML Experiment',\n", + " 'spark.yarn.maxAppAttempts': '1'}},\n", + " 'amlCompute': {'name': None,\n", + " 'vmSize': None,\n", + " 'retainCluster': False,\n", + " 'clusterMaxNodeCount': 1},\n", + " 'tensorflow': {'workerCount': 1, 'parameterServerCount': 1},\n", + " 'mpi': {'processCountPerNode': 1},\n", + " 'hdi': {'yarnDeployMode': 'Cluster'},\n", + " 'containerInstance': {'region': None, 'cpuCores': 2, 'memoryGb': 3.5},\n", + " 'exposedPorts': None,\n", + " 'docker': {'useDocker': True,\n", + " 'sharedVolumes': True,\n", + " 'shmSize': '2g',\n", + " 'arguments': []}},\n", + " 'logFiles': {'azureml-logs/60_control_log.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.diabetes-training_1583266166_a12fa3dc/azureml-logs/60_control_log.txt?sv=2019-02-02&sr=b&sig=W0ZSp%2BDnGpmoHR5EC4V%2B485QhAc3nLc9H3bZfMfyyC8%3D&st=2020-03-03T20%3A02%3A34Z&se=2020-03-04T04%3A12%3A34Z&sp=r',\n", + " 'azureml-logs/70_driver_log.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.diabetes-training_1583266166_a12fa3dc/azureml-logs/70_driver_log.txt?sv=2019-02-02&sr=b&sig=NGrGUXpgtFS01u6JP%2BzaSurqBlcL%2BuORGKVGEJbcthQ%3D&st=2020-03-03T20%3A02%3A34Z&se=2020-03-04T04%3A12%3A34Z&sp=r',\n", + " 'logs/azureml/8_azureml.log': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.diabetes-training_1583266166_a12fa3dc/logs/azureml/8_azureml.log?sv=2019-02-02&sr=b&sig=3wH1m80rl53SFb5gfDDC3U4k%2BvkaVLxpWDd5vj5o6A0%3D&st=2020-03-03T20%3A02%3A34Z&se=2020-03-04T04%3A12%3A34Z&sp=r'}}" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from azureml.train.estimator import Estimator\n", + "from azureml.core import Experiment\n", + "\n", + "# Create an estimator\n", + "estimator = Estimator(source_directory=training_folder,\n", + " entry_script='diabetes_training.py',\n", + " compute_target='local',\n", + " conda_packages=['scikit-learn']\n", + " )\n", + "\n", + "# Create an experiment\n", + "experiment_name = 'diabetes-training'\n", + "experiment = Experiment(workspace = ws, name = experiment_name)\n", + "\n", + "# Run the experiment based on the estimator\n", + "run = experiment.submit(config=estimator)\n", + "run.wait_for_completion(show_output=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "alpha 0.3\n", + "mse 3302.673633401725\n" + ] + } + ], + "source": [ + "metrics = run.get_metrics()\n", + "for k, v in metrics.items():\n", + " print(k, v)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "azureml-logs/60_control_log.txt\n", + "azureml-logs/70_driver_log.txt\n", + "logs/azureml/8_azureml.log\n", + "outputs/parameters.json\n" + ] + } + ], + "source": [ + "for file in run.get_file_names():\n", + " print(file)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python (storedna)", + "language": "python", + "name": "storedna" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.9" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/experimentation/pipeline.ipynb b/experimentation/pipeline.ipynb new file mode 100644 index 00000000..0d1a4d92 --- /dev/null +++ b/experimentation/pipeline.ipynb @@ -0,0 +1,646 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Experiment with parameters for a Ridge Regression Model on the Diabetes Dataset" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This notebook is for experimenting with different parameters to train a ridge regression model on the Diabetes dataset." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "C:\\Users\\brysmith\\Source\\Repos\\MLOpsPython\n" + ] + } + ], + "source": [ + "# Change out of the experimentation directory\n", + "%cd .." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "import azureml.core\n", + "from azureml.core import Workspace" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "# Load the workspace from the saved config file\n", + "ws = Workspace.from_config()" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'diabetes-training\\\\train.py'" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import os, shutil\n", + "\n", + "# Create a folder for the experiment files\n", + "training_folder = 'diabetes-training'\n", + "os.makedirs(training_folder, exist_ok=True)\n", + "\n", + "# Copy the data file into the experiment folder\n", + "shutil.copy('data/diabetes.csv', os.path.join(training_folder, \"diabetes.csv\"))\n", + "\n", + "# Copy the train functions into the experiment folder\n", + "shutil.copy('diabetes_regression/training/train.py', os.path.join(training_folder, \"train.py\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Overwriting diabetes-training/parameters.json\n" + ] + } + ], + "source": [ + "%%writefile $training_folder/parameters.json\n", + "{\n", + " \"training\":\n", + " {\n", + " \"alpha\": 0.3\n", + " },\n", + " \"evaluation\":\n", + " {\n", + "\n", + " },\n", + " \"scoring\":\n", + " {\n", + " \n", + " }\n", + "}\n" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Overwriting diabetes-training/diabetes_training.py\n" + ] + } + ], + "source": [ + "%%writefile $training_folder/diabetes_training.py\n", + "# Import libraries\n", + "from azureml.core import Run\n", + "import pandas as pd\n", + "import shutil\n", + "import joblib\n", + "\n", + "from train import split_data, train_model\n", + "\n", + "# Get parameters\n", + "parser = argparse.ArgumentParser()\n", + "parser.add_argument('--output_folder', type=str, dest='output_folder', default=\"diabetes_model\", help='output folder')\n", + "args = parser.parse_args()\n", + "output_folder = args.output_folder\n", + "\n", + "# Get the experiment run context\n", + "run = Run.get_context()\n", + "\n", + "# load the diabetes dataset\n", + "print(\"Loading Data...\")\n", + "train_df = pd.read_csv('diabetes.csv')\n", + "\n", + "data = split_data(train_df)\n", + "\n", + "# Specify the parameters to test\n", + "with open(\"parameters.json\") as f:\n", + " pars = json.load(f)\n", + " train_args = pars[\"training\"]\n", + "\n", + "# Log parameters\n", + "for k, v in train_args.items():\n", + " run.log(k, v)\n", + "\n", + "model, metrics = train_model(data, train_args)\n", + "\n", + "# Log metrics\n", + "for k, v in metrics.items():\n", + " run.log(k, v)\n", + "\n", + "# Save the parameters file to the outputs folder\n", + "os.makedirs(output_folder, exist_ok=True)\n", + "shutil.copy('parameters.json', os.path.join(output_folder, 'parameters.json'))\n", + "joblib.dump(value=model, filename= output_folder + \"/model.pkl\")\n", + " \n", + "run.complete()" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Overwriting diabetes-training/register_diabetes.py\n" + ] + } + ], + "source": [ + "%%writefile $training_folder/register_diabetes.py\n", + "# Import libraries\n", + "import argparse\n", + "import joblib\n", + "from azureml.core import Workspace, Model, Run\n", + "\n", + "# Get parameters\n", + "parser = argparse.ArgumentParser()\n", + "parser.add_argument('--model_folder', type=str, dest='model_folder', default=\"diabetes_model\", help='model location')\n", + "args = parser.parse_args()\n", + "model_folder = args.model_folder\n", + "\n", + "# Get the experiment run context\n", + "run = Run.get_context()\n", + "\n", + "# load the model\n", + "print(\"Loading model from \" + model_folder)\n", + "model_file = model_folder + \"/model.pkl\"\n", + "model = joblib.load(model_file)\n", + "\n", + "Model.register(workspace=run.experiment.workspace,\n", + " model_path = model_file,\n", + " model_name = 'diabetes_model',\n", + " tags={'Training context':'Pipeline'})\n", + "\n", + "run.complete()" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Creating\n", + "Succeeded\n", + "AmlCompute wait for completion finished\n", + "Minimum number of nodes requested have been provisioned\n" + ] + } + ], + "source": [ + "from azureml.core.compute import ComputeTarget, AmlCompute\n", + "from azureml.core.compute_target import ComputeTargetException\n", + "\n", + "cluster_name = \"aml-cluster\"\n", + "\n", + "# Verify that cluster exists\n", + "try:\n", + " pipeline_cluster = ComputeTarget(workspace=ws, name=cluster_name)\n", + " print('Found existing cluster, use it.')\n", + "except ComputeTargetException:\n", + " # If not, create it\n", + " compute_config = AmlCompute.provisioning_configuration(vm_size='STANDARD_D2_V2',\n", + " max_nodes=4,\n", + " idle_seconds_before_scaledown=1800)\n", + " pipeline_cluster = ComputeTarget.create(ws, cluster_name, compute_config)\n", + "\n", + "pipeline_cluster.wait_for_completion(show_output=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Run configuration created.\n" + ] + } + ], + "source": [ + "from azureml.core import Environment\n", + "from azureml.core.conda_dependencies import CondaDependencies\n", + "from azureml.core.runconfig import RunConfiguration\n", + "\n", + "# Create a Python environment for the experiment\n", + "diabetes_env = Environment(\"diabetes-pipeline-env\")\n", + "diabetes_env.python.user_managed_dependencies = False # Let Azure ML manage dependencies\n", + "diabetes_env.docker.enabled = True # Use a docker container\n", + "\n", + "# Create a set of package dependencies\n", + "diabetes_packages = CondaDependencies.create(conda_packages=['scikit-learn','pandas'],\n", + " pip_packages=['azureml-sdk'])\n", + "\n", + "# Add the dependencies to the environment\n", + "diabetes_env.python.conda_dependencies = diabetes_packages\n", + "\n", + "# Register the environment (just in case you want to use it again)\n", + "diabetes_env.register(workspace=ws)\n", + "registered_env = Environment.get(ws, 'diabetes-pipeline-env')\n", + "\n", + "# Create a new runconfig object for the pipeline\n", + "pipeline_run_config = RunConfiguration()\n", + "\n", + "# Use the compute you created above. \n", + "pipeline_run_config.target = pipeline_cluster\n", + "\n", + "# Assign the environment to the run configuration\n", + "pipeline_run_config.environment = registered_env\n", + "\n", + "print (\"Run configuration created.\")" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pipeline steps defined\n" + ] + } + ], + "source": [ + "from azureml.pipeline.core import PipelineData\n", + "from azureml.pipeline.steps import PythonScriptStep, EstimatorStep\n", + "from azureml.train.estimator import Estimator\n", + "\n", + "# Get the training dataset\n", + "#diabetes_ds = ws.datasets.get(\"diabetes dataset\")\n", + "\n", + "# Create a PipelineData (temporary Data Reference) for the model folder\n", + "model_folder = PipelineData(\"model_folder\", datastore=ws.get_default_datastore())\n", + "\n", + "estimator = Estimator(source_directory=training_folder,\n", + " compute_target = pipeline_cluster,\n", + " environment_definition=pipeline_run_config.environment,\n", + " entry_script='diabetes_training.py')\n", + "\n", + "# Step 1, run the estimator to train the model\n", + "train_step = EstimatorStep(name = \"Train Model\",\n", + " estimator=estimator, \n", + " estimator_entry_script_arguments=['--output_folder', model_folder],\n", + " outputs=[model_folder],\n", + " compute_target = pipeline_cluster,\n", + " allow_reuse = True)\n", + "\n", + "# Step 2, run the model registration script\n", + "register_step = PythonScriptStep(name = \"Register Model\",\n", + " source_directory = training_folder,\n", + " script_name = \"register_diabetes.py\",\n", + " arguments = ['--model_folder', model_folder],\n", + " inputs=[model_folder],\n", + " compute_target = pipeline_cluster,\n", + " runconfig = pipeline_run_config,\n", + " allow_reuse = True)\n", + "\n", + "print(\"Pipeline steps defined\")" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING - 'gpu_support' is no longer necessary; AzureML now automatically detects and uses nvidia docker extension when it is available. It will be removed in a future release.\n", + "WARNING - 'gpu_support' is no longer necessary; AzureML now automatically detects and uses nvidia docker extension when it is available. It will be removed in a future release.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pipeline is built.\n", + "Created step Train Model [f5c73851][18728f1f-bc86-4767-bfc2-3aa1032c0ba9], (This step will run and generate new outputs)\n", + "Created step Register Model [98ff322a][a35e33b1-fab1-45bc-8f1e-4e9df587d639], (This step will run and generate new outputs)\n", + "Submitted PipelineRun 61cc0698-933d-4a1b-954d-d3c0045f6dbb\n", + "Link to Azure Portal: https://mlworkspace.azure.ai/portal/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training-pipeline/runs/61cc0698-933d-4a1b-954d-d3c0045f6dbb\n", + "Pipeline submitted for execution.\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "e454ca5bb250404b93fb5057597dc039", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "_PipelineWidget(widget_settings={'childWidgetDisplay': 'popup', 'send_telemetry': False, 'log_level': 'INFO', …" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "PipelineRunId: 61cc0698-933d-4a1b-954d-d3c0045f6dbb\n", + "Link to Portal: https://mlworkspace.azure.ai/portal/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training-pipeline/runs/61cc0698-933d-4a1b-954d-d3c0045f6dbb\n", + "PipelineRun Status: NotStarted\n", + "PipelineRun Status: Running\n", + "\n", + "\n", + "StepRunId: d6c05b43-8582-4e6c-aee9-0196ffc64634\n", + "Link to Portal: https://mlworkspace.azure.ai/portal/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training-pipeline/runs/d6c05b43-8582-4e6c-aee9-0196ffc64634\n", + "StepRun( Train Model ) Status: NotStarted\n", + "StepRun( Train Model ) Status: Running\n", + "\n", + "Streaming azureml-logs/55_azureml-execution-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt\n", + "========================================================================================================================\n", + "2020-03-03T21:45:38Z Starting output-watcher...\n", + "2020-03-03T21:45:38Z IsDedicatedCompute == True, won't poll for Low Pri Preemption\n", + "Login Succeeded\n", + "Using default tag: latest\n", + "latest: Pulling from azureml/azureml_d98378851aa287fc3ea388278015dcf6\n", + "Digest: sha256:e3df99acf8c13db41600df4c75a4cc312d3974c8abffe335545d6ef675bf8022\n", + "Status: Image is up to date for mlopsohws46ec5f38.azurecr.io/azureml/azureml_d98378851aa287fc3ea388278015dcf6:latest\n", + "b4414dbe533553d031d9acaff5a13fe7619ec71cf9aef7a36bd4c988ff0a15a7\n", + "2020/03/03 21:45:41 Version: 3.0.01154.0001 Branch: master Commit: fd92aa9d\n", + "2020/03/03 21:45:41 /dev/infiniband/uverbs0 found (implying presence of InfiniBand)?: false\n", + "2020/03/03 21:45:41 sshd runtime has already been installed in the container\n", + "ssh-keygen: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libcrypto.so.1.0.0: no version information available (required by ssh-keygen)\n", + "ssh-keygen: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libcrypto.so.1.0.0: no version information available (required by ssh-keygen)\n", + "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", + "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", + "\n", + "Streaming azureml-logs/65_job_prep-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt\n", + "===============================================================================================================\n", + "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", + "Starting job preparation. Current time:2020-03-03T21:45:51.103994\n", + "Extracting the control code.\n", + "Creating directory: azureml-logs/\n", + "Retrieving project from snapshot: 7c4b3bf6-a347-4898-aae3-69dc2b054b8d\n", + "Starting the daemon thread to refresh tokens in background for process with pid = 90\n", + "Starting project file download.\n", + "Finished project file download.\n", + "Download from datastores if requested.\n", + "\n", + "Streaming azureml-logs/70_driver_log.txt\n", + "========================================\n", + "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", + "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", + "Starting the daemon thread to refresh tokens in background for process with pid = 144\n", + "Entering Run History Context Manager.\n", + "Preparing to call script [ diabetes_training.py ] with arguments: ['--output_folder', '/mnt/batch/tasks/shared/LS_root/jobs/mlopsoh-ws/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/mounts/workspaceblobstore/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder']\n", + "After variable expansion, calling script [ diabetes_training.py ] with arguments: ['--output_folder', '/mnt/batch/tasks/shared/LS_root/jobs/mlopsoh-ws/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/mounts/workspaceblobstore/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder']\n", + "\n", + "Loading Data...\n", + "\n", + "\n", + "The experiment completed successfully. Finalizing run...\n", + "Cleaning up all outstanding Run operations, waiting 300.0 seconds\n", + "2 items cleaning up...\n", + "Cleanup took 0.0016448497772216797 seconds\n", + "Starting the daemon thread to refresh tokens in background for process with pid = 144\n", + "\n", + "Streaming azureml-logs/75_job_post-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt\n", + "===============================================================================================================\n", + "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", + "Starting job release. Current time:2020-03-03T21:46:12.186401\n", + "Logging experiment finalizing status in history service.\n", + "Starting the daemon thread to refresh tokens in background for process with pid = 178\n", + "Job release is complete. Current time:2020-03-03T21:46:14.781124\n", + "\n", + "StepRun(Train Model) Execution Summary\n", + "=======================================\n", + "StepRun( Train Model ) Status: Finished\n", + "{'runId': 'd6c05b43-8582-4e6c-aee9-0196ffc64634', 'target': 'aml-cluster', 'status': 'Completed', 'startTimeUtc': '2020-03-03T21:45:38.215193Z', 'endTimeUtc': '2020-03-03T21:46:26.227746Z', 'properties': {'azureml.runsource': 'azureml.StepRun', 'ContentSnapshotId': '7c4b3bf6-a347-4898-aae3-69dc2b054b8d', 'StepType': 'PythonScriptStep', 'ComputeTargetType': 'AmlCompute', 'azureml.pipelinerunid': '61cc0698-933d-4a1b-954d-d3c0045f6dbb', '_azureml.ComputeTargetType': 'amlcompute', 'AzureML.DerivedImageName': 'azureml/azureml_d98378851aa287fc3ea388278015dcf6', 'ProcessInfoFile': 'azureml-logs/process_info.json', 'ProcessStatusFile': 'azureml-logs/process_status.json'}, 'inputDatasets': [], 'runDefinition': {'script': 'diabetes_training.py', 'useAbsolutePath': False, 'arguments': ['--output_folder', '$AZUREML_DATAREFERENCE_model_folder'], 'sourceDirectoryDataStore': None, 'framework': 'Python', 'communicator': 'None', 'target': 'aml-cluster', 'dataReferences': {'model_folder': {'dataStoreName': 'workspaceblobstore', 'mode': 'Mount', 'pathOnDataStore': 'azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder', 'pathOnCompute': None, 'overwrite': False}}, 'data': {}, 'jobName': None, 'maxRunDurationSeconds': None, 'nodeCount': 1, 'environment': {'name': 'Experiment diabetes-training-pipeline Environment', 'version': 'Autosave_2020-03-03T21:07:02Z_4e883779', 'python': {'interpreterPath': 'python', 'userManagedDependencies': False, 'condaDependencies': {'channels': ['conda-forge'], 'dependencies': ['python=3.6.2', {'pip': ['azureml-sdk==1.0.65.*']}, 'scikit-learn', 'pandas'], 'name': 'azureml_26255de668949460e1d18d9466048046'}, 'baseCondaEnvironment': None}, 'environmentVariables': {'EXAMPLE_ENV_VAR': 'EXAMPLE_VALUE'}, 'docker': {'baseImage': 'mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04', 'baseDockerfile': None, 'baseImageRegistry': {'address': None, 'username': None, 'password': None}, 'enabled': True, 'shmSize': '1g'}, 'spark': {'repositories': ['[]'], 'packages': [], 'precachePackages': True}, 'inferencingStackVersion': None}, 'history': {'outputCollection': True, 'directoriesToWatch': ['logs']}, 'spark': {'configuration': {'spark.app.name': 'Azure ML Experiment', 'spark.yarn.maxAppAttempts': '1'}}, 'amlCompute': {'name': None, 'vmSize': None, 'retainCluster': False, 'clusterMaxNodeCount': 1}, 'tensorflow': {'workerCount': 1, 'parameterServerCount': 1}, 'mpi': {'processCountPerNode': 1}, 'hdi': {'yarnDeployMode': 'Cluster'}, 'containerInstance': {'region': None, 'cpuCores': 2, 'memoryGb': 3.5}, 'exposedPorts': None, 'docker': {'useDocker': True, 'sharedVolumes': True, 'shmSize': '1g', 'arguments': []}}, 'logFiles': {'azureml-logs/55_azureml-execution-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/azureml-logs/55_azureml-execution-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt?sv=2019-02-02&sr=b&sig=sRzw0o48ZqzSwJH96ttQVR8jKPjhpoIONx8xXrqZc6c%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'azureml-logs/65_job_prep-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/azureml-logs/65_job_prep-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt?sv=2019-02-02&sr=b&sig=KXAeYN0v6f9FS3T2gSMph0mnhhd8PclswAaDcSZ35gc%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'azureml-logs/70_driver_log.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/azureml-logs/70_driver_log.txt?sv=2019-02-02&sr=b&sig=Rt6lPoTqgRuaavLxaDQMte3LpACYe5rlUmOgVkPeqKo%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'azureml-logs/75_job_post-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/azureml-logs/75_job_post-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt?sv=2019-02-02&sr=b&sig=jPunjSUTwbIV0uoaFBFI1LhVnPOVnHtuw84iXx3xRV0%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'azureml-logs/process_info.json': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/azureml-logs/process_info.json?sv=2019-02-02&sr=b&sig=1QJfL3OKhipnsIEWUSFwWaoFRr%2FHhqSKLI2oLj%2BlWn8%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'azureml-logs/process_status.json': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/azureml-logs/process_status.json?sv=2019-02-02&sr=b&sig=IH9Fzbsug0aRPq4gio8V3vNAiXKVjEF4KgCVZVpB1CA%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'logs/azureml/144_azureml.log': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/logs/azureml/144_azureml.log?sv=2019-02-02&sr=b&sig=pySuopDJv8QnIozRS%2BC94LmGrT393Yc8K8kH2GbyfZU%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'logs/azureml/azureml.log': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/logs/azureml/azureml.log?sv=2019-02-02&sr=b&sig=YnXYKFlCrs5KglDWZLoqO%2Br1mbkjbxlxTXFNhWdJFws%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'logs/azureml/executionlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/logs/azureml/executionlogs.txt?sv=2019-02-02&sr=b&sig=C2CoAsflOiTxs35LHT1%2BLZh5mZbxuhB3K4kWtRooH2Y%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'logs/azureml/stderrlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/logs/azureml/stderrlogs.txt?sv=2019-02-02&sr=b&sig=92riKqZCzj7gqBskV1pZh5UjtVCFI%2Fx%2BRVeQYeZQFP8%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'logs/azureml/stdoutlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/logs/azureml/stdoutlogs.txt?sv=2019-02-02&sr=b&sig=IIOWNF7c013atekMUf0E2Uv34%2FrTgySNaRceprLnsdI%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r'}}\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "\n", + "StepRunId: 49dcaa65-8f24-452e-99bd-4b458f9aa95b\n", + "Link to Portal: https://mlworkspace.azure.ai/portal/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training-pipeline/runs/49dcaa65-8f24-452e-99bd-4b458f9aa95b\n", + "StepRun( Register Model ) Status: NotStarted\n", + "StepRun( Register Model ) Status: Running\n", + "\n", + "Streaming azureml-logs/55_azureml-execution-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt\n", + "========================================================================================================================\n", + "2020-03-03T21:47:09Z Starting output-watcher...\n", + "2020-03-03T21:47:09Z IsDedicatedCompute == True, won't poll for Low Pri Preemption\n", + "Login Succeeded\n", + "Using default tag: latest\n", + "latest: Pulling from azureml/azureml_d98378851aa287fc3ea388278015dcf6\n", + "Digest: sha256:e3df99acf8c13db41600df4c75a4cc312d3974c8abffe335545d6ef675bf8022\n", + "Status: Image is up to date for mlopsohws46ec5f38.azurecr.io/azureml/azureml_d98378851aa287fc3ea388278015dcf6:latest\n", + "4d22500e0304c424c9cb39e8eab9203f23e9c08209bf0288ff00b9d3663470b7\n", + "2020/03/03 21:47:11 Version: 3.0.01154.0001 Branch: master Commit: fd92aa9d\n", + "2020/03/03 21:47:12 /dev/infiniband/uverbs0 found (implying presence of InfiniBand)?: false\n", + "2020/03/03 21:47:12 sshd runtime has already been installed in the container\n", + "ssh-keygen: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libcrypto.so.1.0.0: no version information available (required by ssh-keygen)\n", + "ssh-keygen: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libcrypto.so.1.0.0: no version information available (required by ssh-keygen)\n", + "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", + "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", + "\n", + "Streaming azureml-logs/65_job_prep-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt\n", + "===============================================================================================================\n", + "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", + "Starting job preparation. Current time:2020-03-03T21:47:21.735589\n", + "Extracting the control code.\n", + "Creating directory: azureml-logs/\n", + "Retrieving project from snapshot: 7c4b3bf6-a347-4898-aae3-69dc2b054b8d\n", + "Starting the daemon thread to refresh tokens in background for process with pid = 89\n", + "Starting project file download.\n", + "Finished project file download.\n", + "Download from datastores if requested.\n", + "\n", + "Streaming azureml-logs/70_driver_log.txt\n", + "========================================\n", + "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", + "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", + "Starting the daemon thread to refresh tokens in background for process with pid = 143\n", + "Entering Run History Context Manager.\n", + "Preparing to call script [ register_diabetes.py ] with arguments: ['--model_folder', '/mnt/batch/tasks/shared/LS_root/jobs/mlopsoh-ws/azureml/49dcaa65-8f24-452e-99bd-4b458f9aa95b/mounts/workspaceblobstore/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder']\n", + "After variable expansion, calling script [ register_diabetes.py ] with arguments: ['--model_folder', '/mnt/batch/tasks/shared/LS_root/jobs/mlopsoh-ws/azureml/49dcaa65-8f24-452e-99bd-4b458f9aa95b/mounts/workspaceblobstore/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder']\n", + "\n", + "Loading model from /mnt/batch/tasks/shared/LS_root/jobs/mlopsoh-ws/azureml/49dcaa65-8f24-452e-99bd-4b458f9aa95b/mounts/workspaceblobstore/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder\n", + "Registering model diabetes_model\n", + "\n", + "\n", + "The experiment completed successfully. Finalizing run...\n", + "Cleaning up all outstanding Run operations, waiting 300.0 seconds\n", + "2 items cleaning up...\n", + "Cleanup took 0.0016734600067138672 seconds\n", + "Starting the daemon thread to refresh tokens in background for process with pid = 143\n", + "\n", + "Streaming azureml-logs/75_job_post-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt\n", + "===============================================================================================================\n", + "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", + "Starting job release. Current time:2020-03-03T21:47:42.433595\n", + "Logging experiment finalizing status in history service.\n", + "Starting the daemon thread to refresh tokens in background for process with pid = 173\n", + "Job release is complete. Current time:2020-03-03T21:47:44.523187\n", + "\n", + "StepRun(Register Model) Execution Summary\n", + "==========================================\n", + "StepRun( Register Model ) Status: Finished\n", + "{'runId': '49dcaa65-8f24-452e-99bd-4b458f9aa95b', 'target': 'aml-cluster', 'status': 'Completed', 'startTimeUtc': '2020-03-03T21:47:07.772408Z', 'endTimeUtc': '2020-03-03T21:47:55.940406Z', 'properties': {'azureml.runsource': 'azureml.StepRun', 'ContentSnapshotId': '7c4b3bf6-a347-4898-aae3-69dc2b054b8d', 'StepType': 'PythonScriptStep', 'ComputeTargetType': 'AmlCompute', 'azureml.pipelinerunid': '61cc0698-933d-4a1b-954d-d3c0045f6dbb', '_azureml.ComputeTargetType': 'amlcompute', 'AzureML.DerivedImageName': 'azureml/azureml_d98378851aa287fc3ea388278015dcf6', 'ProcessInfoFile': 'azureml-logs/process_info.json', 'ProcessStatusFile': 'azureml-logs/process_status.json'}, 'inputDatasets': [], 'runDefinition': {'script': 'register_diabetes.py', 'useAbsolutePath': False, 'arguments': ['--model_folder', '$AZUREML_DATAREFERENCE_model_folder'], 'sourceDirectoryDataStore': None, 'framework': 'Python', 'communicator': 'None', 'target': 'aml-cluster', 'dataReferences': {'model_folder': {'dataStoreName': 'workspaceblobstore', 'mode': 'Mount', 'pathOnDataStore': 'azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder', 'pathOnCompute': None, 'overwrite': False}}, 'data': {}, 'jobName': None, 'maxRunDurationSeconds': None, 'nodeCount': 1, 'environment': {'name': 'Experiment diabetes-training-pipeline Environment', 'version': 'Autosave_2020-03-03T21:07:02Z_4e883779', 'python': {'interpreterPath': 'python', 'userManagedDependencies': False, 'condaDependencies': {'channels': ['conda-forge'], 'dependencies': ['python=3.6.2', {'pip': ['azureml-sdk==1.0.65.*']}, 'scikit-learn', 'pandas'], 'name': 'azureml_26255de668949460e1d18d9466048046'}, 'baseCondaEnvironment': None}, 'environmentVariables': {'EXAMPLE_ENV_VAR': 'EXAMPLE_VALUE'}, 'docker': {'baseImage': 'mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04', 'baseDockerfile': None, 'baseImageRegistry': {'address': None, 'username': None, 'password': None}, 'enabled': True, 'shmSize': '1g'}, 'spark': {'repositories': ['[]'], 'packages': [], 'precachePackages': True}, 'inferencingStackVersion': None}, 'history': {'outputCollection': True, 'directoriesToWatch': ['logs']}, 'spark': {'configuration': {'spark.app.name': 'Azure ML Experiment', 'spark.yarn.maxAppAttempts': '1'}}, 'amlCompute': {'name': None, 'vmSize': None, 'retainCluster': False, 'clusterMaxNodeCount': 1}, 'tensorflow': {'workerCount': 1, 'parameterServerCount': 1}, 'mpi': {'processCountPerNode': 1}, 'hdi': {'yarnDeployMode': 'Cluster'}, 'containerInstance': {'region': None, 'cpuCores': 2, 'memoryGb': 3.5}, 'exposedPorts': None, 'docker': {'useDocker': True, 'sharedVolumes': True, 'shmSize': '1g', 'arguments': []}}, 'logFiles': {'azureml-logs/55_azureml-execution-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/azureml-logs/55_azureml-execution-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt?sv=2019-02-02&sr=b&sig=cyDaMnSXvG%2Bf0WcCiV2uPlpF2JjkGjsIqASqRcj74XM%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'azureml-logs/65_job_prep-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/azureml-logs/65_job_prep-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt?sv=2019-02-02&sr=b&sig=MDK4eXiieizd5CCxPSOH0ZrNYqXOWb3hxBI%2B3jYzxYg%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'azureml-logs/70_driver_log.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/azureml-logs/70_driver_log.txt?sv=2019-02-02&sr=b&sig=9KKN%2BbX8YK3P1OdW%2Bdu%2FHMqriMIT4mSVvKOIoI0iRaI%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'azureml-logs/75_job_post-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/azureml-logs/75_job_post-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt?sv=2019-02-02&sr=b&sig=ZbOSWoRrnoxgb1vA163Buv%2F8jS47biV%2F7yCbZD6BvW4%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'azureml-logs/process_info.json': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/azureml-logs/process_info.json?sv=2019-02-02&sr=b&sig=wIZIabHFN4TUgtsAtVW7OHh8%2FOyOEbzjDSAam8gOPPE%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'azureml-logs/process_status.json': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/azureml-logs/process_status.json?sv=2019-02-02&sr=b&sig=zJtcpK7%2FLPaDn3pNVgMCfrKj1wd5%2BbIM6nlUxo0vFgU%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'logs/azureml/143_azureml.log': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/logs/azureml/143_azureml.log?sv=2019-02-02&sr=b&sig=H1Ejs1%2FGgNpBz%2BmDBlITjUwuxo%2BP01qsQH9VzI7adF8%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'logs/azureml/azureml.log': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/logs/azureml/azureml.log?sv=2019-02-02&sr=b&sig=7e5pMnohW7WmA%2BIzVpUMntb0hMpDGx%2Fca0Rjb1kBank%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'logs/azureml/executionlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/logs/azureml/executionlogs.txt?sv=2019-02-02&sr=b&sig=Uv%2Flj%2FHG5UzEXVPFtJb26%2FOcckyuhoqd9PmUzPLkPTo%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'logs/azureml/stderrlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/logs/azureml/stderrlogs.txt?sv=2019-02-02&sr=b&sig=Q%2FIgd%2F3ygd%2FWZXm%2FFVLWWBbR0TGyGrDU3E7LwnMH%2FHQ%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'logs/azureml/stdoutlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/logs/azureml/stdoutlogs.txt?sv=2019-02-02&sr=b&sig=3VKIIzOaCzCUktPjKxT3JQGVtiZjMTmtk9xnC%2F41EtY%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r'}}\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "PipelineRun Execution Summary\n", + "==============================\n", + "PipelineRun Status: Finished\n", + "{'runId': '61cc0698-933d-4a1b-954d-d3c0045f6dbb', 'status': 'Completed', 'startTimeUtc': '2020-03-03T21:44:42.792356Z', 'endTimeUtc': '2020-03-03T21:48:00.994573Z', 'properties': {'azureml.runsource': 'azureml.PipelineRun', 'runSource': 'SDK', 'runType': 'SDK', 'azureml.parameters': '{}'}, 'inputDatasets': [], 'logFiles': {'logs/azureml/executionlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.61cc0698-933d-4a1b-954d-d3c0045f6dbb/logs/azureml/executionlogs.txt?sv=2019-02-02&sr=b&sig=0C79LU1qNR%2B30%2F6pNyZPlY%2BNpQWE7vxxKbu8%2F78ujj0%3D&st=2020-03-03T21%3A38%3A04Z&se=2020-03-04T05%3A48%3A04Z&sp=r', 'logs/azureml/stderrlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.61cc0698-933d-4a1b-954d-d3c0045f6dbb/logs/azureml/stderrlogs.txt?sv=2019-02-02&sr=b&sig=CuR0vlYXJ2UVmyNyfwAlHuANnWZoB0TaudFDRCpm%2FpU%3D&st=2020-03-03T21%3A38%3A04Z&se=2020-03-04T05%3A48%3A04Z&sp=r', 'logs/azureml/stdoutlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.61cc0698-933d-4a1b-954d-d3c0045f6dbb/logs/azureml/stdoutlogs.txt?sv=2019-02-02&sr=b&sig=c%2BXdCoEVfhL%2Fj6uUfbJvoDzYSmsKDXJG0WpEPEJeeA8%3D&st=2020-03-03T21%3A38%3A04Z&se=2020-03-04T05%3A48%3A04Z&sp=r'}}\n", + "\n" + ] + }, + { + "data": { + "text/plain": [ + "'Finished'" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from azureml.core import Experiment\n", + "from azureml.pipeline.core import Pipeline\n", + "from azureml.widgets import RunDetails\n", + "\n", + "# Construct the pipeline\n", + "pipeline_steps = [train_step, register_step]\n", + "pipeline = Pipeline(workspace = ws, steps=pipeline_steps)\n", + "print(\"Pipeline is built.\")\n", + "\n", + "# Create an experiment and run the pipeline\n", + "experiment = Experiment(workspace = ws, name = 'diabetes-training-pipeline')\n", + "pipeline_run = experiment.submit(pipeline, regenerate_outputs=True)\n", + "print(\"Pipeline submitted for execution.\")\n", + "\n", + "RunDetails(pipeline_run).show()\n", + "pipeline_run.wait_for_completion()" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "diabetes_model version: 1\n", + "\t Training context : Pipeline\n", + "\n", + "\n" + ] + } + ], + "source": [ + "from azureml.core import Model\n", + "\n", + "for model in Model.list(ws):\n", + " print(model.name, 'version:', model.version)\n", + " for tag_name in model.tags:\n", + " tag = model.tags[tag_name]\n", + " print ('\\t',tag_name, ':', tag)\n", + " for prop_name in model.properties:\n", + " prop = model.properties[prop_name]\n", + " print ('\\t',prop_name, ':', prop)\n", + " print('\\n')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python (storedna)", + "language": "python", + "name": "storedna" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.9" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From b6b614431c1f6ce8324bc806be060ed966b8e230 Mon Sep 17 00:00:00 2001 From: Jovana Taylor Date: Wed, 4 Mar 2020 15:37:40 -0800 Subject: [PATCH 5/5] rename and clean up experimentation notebooks --- ... Regression Experimentation Pipeline.ipynb | 353 +++++++++ ...Regression Parameter Experimentation.ipynb | 211 +++++ experimentation/exp.ipynb | 718 ------------------ experimentation/pipeline.ipynb | 646 ---------------- 4 files changed, 564 insertions(+), 1364 deletions(-) create mode 100644 experimentation/Diabetes Ridge Regression Experimentation Pipeline.ipynb create mode 100644 experimentation/Diabetes Ridge Regression Parameter Experimentation.ipynb delete mode 100644 experimentation/exp.ipynb delete mode 100644 experimentation/pipeline.ipynb diff --git a/experimentation/Diabetes Ridge Regression Experimentation Pipeline.ipynb b/experimentation/Diabetes Ridge Regression Experimentation Pipeline.ipynb new file mode 100644 index 00000000..8b04a5c5 --- /dev/null +++ b/experimentation/Diabetes Ridge Regression Experimentation Pipeline.ipynb @@ -0,0 +1,353 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Experiment with parameters for a Ridge Regression Model on the Diabetes Dataset in an Azure ML Pipeline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This notebook is for experimenting with different parameters to train a ridge regression model on the Diabetes dataset." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Change out of the experimentation directory\n", + "%cd .." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import azureml.core\n", + "from azureml.core import Workspace" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Load the workspace from the saved config file\n", + "ws = Workspace.from_config()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import os, shutil\n", + "\n", + "# Create a folder for the experiment files\n", + "training_folder = 'diabetes-training'\n", + "os.makedirs(training_folder, exist_ok=True)\n", + "\n", + "# Copy the data file into the experiment folder\n", + "shutil.copy('data/diabetes.csv', os.path.join(training_folder, \"diabetes.csv\"))\n", + "\n", + "# Copy the train functions into the experiment folder\n", + "shutil.copy('diabetes_regression/training/train.py', os.path.join(training_folder, \"train.py\"))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%writefile $training_folder/parameters.json\n", + "{\n", + " \"training\":\n", + " {\n", + " \"alpha\": 0.3\n", + " },\n", + " \"evaluation\":\n", + " {\n", + "\n", + " },\n", + " \"scoring\":\n", + " {\n", + " \n", + " }\n", + "}\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%writefile $training_folder/diabetes_training.py\n", + "# Import libraries\n", + "from azureml.core import Run\n", + "import pandas as pd\n", + "import shutil\n", + "import joblib\n", + "\n", + "from train import split_data, train_model\n", + "\n", + "# Get parameters\n", + "parser = argparse.ArgumentParser()\n", + "parser.add_argument('--output_folder', type=str, dest='output_folder', default=\"diabetes_model\", help='output folder')\n", + "args = parser.parse_args()\n", + "output_folder = args.output_folder\n", + "\n", + "# Get the experiment run context\n", + "run = Run.get_context()\n", + "\n", + "# load the diabetes dataset\n", + "print(\"Loading Data...\")\n", + "train_df = pd.read_csv('diabetes.csv')\n", + "\n", + "data = split_data(train_df)\n", + "\n", + "# Specify the parameters to test\n", + "with open(\"parameters.json\") as f:\n", + " pars = json.load(f)\n", + " train_args = pars[\"training\"]\n", + "\n", + "# Log parameters\n", + "for k, v in train_args.items():\n", + " run.log(k, v)\n", + "\n", + "model, metrics = train_model(data, train_args)\n", + "\n", + "# Log metrics\n", + "for k, v in metrics.items():\n", + " run.log(k, v)\n", + "\n", + "# Save the parameters file to the outputs folder\n", + "os.makedirs(output_folder, exist_ok=True)\n", + "shutil.copy('parameters.json', os.path.join(output_folder, 'parameters.json'))\n", + "joblib.dump(value=model, filename= output_folder + \"/model.pkl\")\n", + " \n", + "run.complete()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%writefile $training_folder/register_diabetes.py\n", + "# Import libraries\n", + "import argparse\n", + "import joblib\n", + "from azureml.core import Workspace, Model, Run\n", + "\n", + "# Get parameters\n", + "parser = argparse.ArgumentParser()\n", + "parser.add_argument('--model_folder', type=str, dest='model_folder', default=\"diabetes_model\", help='model location')\n", + "args = parser.parse_args()\n", + "model_folder = args.model_folder\n", + "\n", + "# Get the experiment run context\n", + "run = Run.get_context()\n", + "\n", + "# load the model\n", + "print(\"Loading model from \" + model_folder)\n", + "model_file = model_folder + \"/model.pkl\"\n", + "model = joblib.load(model_file)\n", + "\n", + "Model.register(workspace=run.experiment.workspace,\n", + " model_path = model_file,\n", + " model_name = 'diabetes_model',\n", + " tags={'Training context':'Pipeline'})\n", + "\n", + "run.complete()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from azureml.core.compute import ComputeTarget, AmlCompute\n", + "from azureml.core.compute_target import ComputeTargetException\n", + "\n", + "cluster_name = \"aml-cluster\"\n", + "\n", + "# Verify that cluster exists\n", + "try:\n", + " pipeline_cluster = ComputeTarget(workspace=ws, name=cluster_name)\n", + " print('Found existing cluster, use it.')\n", + "except ComputeTargetException:\n", + " # If not, create it\n", + " compute_config = AmlCompute.provisioning_configuration(vm_size='STANDARD_D2_V2',\n", + " max_nodes=4,\n", + " idle_seconds_before_scaledown=1800)\n", + " pipeline_cluster = ComputeTarget.create(ws, cluster_name, compute_config)\n", + "\n", + "pipeline_cluster.wait_for_completion(show_output=True)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from azureml.core import Environment\n", + "from azureml.core.conda_dependencies import CondaDependencies\n", + "from azureml.core.runconfig import RunConfiguration\n", + "\n", + "# Create a Python environment for the experiment\n", + "diabetes_env = Environment(\"diabetes-pipeline-env\")\n", + "diabetes_env.python.user_managed_dependencies = False # Let Azure ML manage dependencies\n", + "diabetes_env.docker.enabled = True # Use a docker container\n", + "\n", + "# Create a set of package dependencies\n", + "diabetes_packages = CondaDependencies.create(conda_packages=['scikit-learn','pandas'],\n", + " pip_packages=['azureml-sdk'])\n", + "\n", + "# Add the dependencies to the environment\n", + "diabetes_env.python.conda_dependencies = diabetes_packages\n", + "\n", + "# Register the environment (just in case you want to use it again)\n", + "diabetes_env.register(workspace=ws)\n", + "registered_env = Environment.get(ws, 'diabetes-pipeline-env')\n", + "\n", + "# Create a new runconfig object for the pipeline\n", + "pipeline_run_config = RunConfiguration()\n", + "\n", + "# Use the compute you created above. \n", + "pipeline_run_config.target = pipeline_cluster\n", + "\n", + "# Assign the environment to the run configuration\n", + "pipeline_run_config.environment = registered_env\n", + "\n", + "print (\"Run configuration created.\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from azureml.pipeline.core import PipelineData\n", + "from azureml.pipeline.steps import PythonScriptStep, EstimatorStep\n", + "from azureml.train.estimator import Estimator\n", + "\n", + "# Get the training dataset\n", + "#diabetes_ds = ws.datasets.get(\"diabetes dataset\")\n", + "\n", + "# Create a PipelineData (temporary Data Reference) for the model folder\n", + "model_folder = PipelineData(\"model_folder\", datastore=ws.get_default_datastore())\n", + "\n", + "estimator = Estimator(source_directory=training_folder,\n", + " compute_target = pipeline_cluster,\n", + " environment_definition=pipeline_run_config.environment,\n", + " entry_script='diabetes_training.py')\n", + "\n", + "# Step 1, run the estimator to train the model\n", + "train_step = EstimatorStep(name = \"Train Model\",\n", + " estimator=estimator, \n", + " estimator_entry_script_arguments=['--output_folder', model_folder],\n", + " outputs=[model_folder],\n", + " compute_target = pipeline_cluster,\n", + " allow_reuse = True)\n", + "\n", + "# Step 2, run the model registration script\n", + "register_step = PythonScriptStep(name = \"Register Model\",\n", + " source_directory = training_folder,\n", + " script_name = \"register_diabetes.py\",\n", + " arguments = ['--model_folder', model_folder],\n", + " inputs=[model_folder],\n", + " compute_target = pipeline_cluster,\n", + " runconfig = pipeline_run_config,\n", + " allow_reuse = True)\n", + "\n", + "print(\"Pipeline steps defined\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from azureml.core import Experiment\n", + "from azureml.pipeline.core import Pipeline\n", + "from azureml.widgets import RunDetails\n", + "\n", + "# Construct the pipeline\n", + "pipeline_steps = [train_step, register_step]\n", + "pipeline = Pipeline(workspace = ws, steps=pipeline_steps)\n", + "print(\"Pipeline is built.\")\n", + "\n", + "# Create an experiment and run the pipeline\n", + "experiment = Experiment(workspace = ws, name = 'diabetes-training-pipeline')\n", + "pipeline_run = experiment.submit(pipeline, regenerate_outputs=True)\n", + "print(\"Pipeline submitted for execution.\")\n", + "\n", + "RunDetails(pipeline_run).show()\n", + "pipeline_run.wait_for_completion()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from azureml.core import Model\n", + "\n", + "for model in Model.list(ws):\n", + " print(model.name, 'version:', model.version)\n", + " for tag_name in model.tags:\n", + " tag = model.tags[tag_name]\n", + " print ('\\t',tag_name, ':', tag)\n", + " for prop_name in model.properties:\n", + " prop = model.properties[prop_name]\n", + " print ('\\t',prop_name, ':', prop)\n", + " print('\\n')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/experimentation/Diabetes Ridge Regression Parameter Experimentation.ipynb b/experimentation/Diabetes Ridge Regression Parameter Experimentation.ipynb new file mode 100644 index 00000000..aab5e052 --- /dev/null +++ b/experimentation/Diabetes Ridge Regression Parameter Experimentation.ipynb @@ -0,0 +1,211 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Experiment with parameters for a Ridge Regression Model on the Diabetes Dataset" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This notebook is for experimenting with different parameters to train a ridge regression model on the Diabetes dataset." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Change out of the experimentation directory\n", + "%cd .." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import azureml.core\n", + "from azureml.core import Workspace" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Load the workspace from the saved config file\n", + "ws = Workspace.from_config()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import os, shutil\n", + "\n", + "# Create a folder for the experiment files\n", + "training_folder = 'diabetes-training'\n", + "os.makedirs(training_folder, exist_ok=True)\n", + "\n", + "# Copy the data file into the experiment folder\n", + "shutil.copy('data/diabetes.csv', os.path.join(training_folder, \"diabetes.csv\"))\n", + "\n", + "# Copy the train functions into the experiment folder\n", + "shutil.copy('diabetes_regression/training/train.py', os.path.join(training_folder, \"train.py\"))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%writefile $training_folder/parameters.json\n", + "{\n", + " \"training\":\n", + " {\n", + " \"alpha\": 0.3\n", + " },\n", + " \"evaluation\":\n", + " {\n", + "\n", + " },\n", + " \"scoring\":\n", + " {\n", + " \n", + " }\n", + "}\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%writefile $training_folder/diabetes_training.py\n", + "# Import libraries\n", + "from azureml.core import Run\n", + "import json\n", + "import os\n", + "import pandas as pd\n", + "import shutil\n", + "\n", + "from train import split_data, train_model\n", + "\n", + "# Get the experiment run context\n", + "run = Run.get_context()\n", + "\n", + "# load the diabetes dataset\n", + "print(\"Loading Data...\")\n", + "train_df = pd.read_csv('diabetes.csv')\n", + "\n", + "data = split_data(train_df)\n", + "\n", + "# Specify the parameters to test\n", + "with open(\"parameters.json\") as f:\n", + " pars = json.load(f)\n", + " train_args = pars[\"training\"]\n", + "\n", + "# Log parameters\n", + "for k, v in train_args.items():\n", + " run.log(k, v)\n", + "\n", + "model, metrics = train_model(data, train_args)\n", + "\n", + "# Log metrics\n", + "for k, v in metrics.items():\n", + " run.log(k, v)\n", + "\n", + "# Save the parameters file to the outputs folder\n", + "os.makedirs('outputs', exist_ok=True)\n", + "shutil.copy('parameters.json', os.path.join('outputs', 'parameters.json'))\n", + " \n", + "run.complete()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from azureml.train.estimator import Estimator\n", + "from azureml.core import Experiment\n", + "\n", + "# Create an estimator\n", + "estimator = Estimator(source_directory=training_folder,\n", + " entry_script='diabetes_training.py',\n", + " compute_target='local',\n", + " conda_packages=['scikit-learn']\n", + " )\n", + "\n", + "# Create an experiment\n", + "experiment_name = 'diabetes-training'\n", + "experiment = Experiment(workspace = ws, name = experiment_name)\n", + "\n", + "# Run the experiment based on the estimator\n", + "run = experiment.submit(config=estimator)\n", + "run.wait_for_completion(show_output=True)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "metrics = run.get_metrics()\n", + "for k, v in metrics.items():\n", + " print(k, v)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "for file in run.get_file_names():\n", + " print(file)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3.6.10 64-bit ('OH3': conda)", + "language": "python", + "name": "python361064bitoh3conda5f7beeba8c1d407187c86667ecfb684f" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.10" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/experimentation/exp.ipynb b/experimentation/exp.ipynb deleted file mode 100644 index b6147055..00000000 --- a/experimentation/exp.ipynb +++ /dev/null @@ -1,718 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment with parameters for a Ridge Regression Model on the Diabetes Dataset" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This notebook is for experimenting with different parameters to train a ridge regression model on the Diabetes dataset." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "C:\\Users\\brysmith\\Source\\Repos\\MLOpsPython\n" - ] - } - ], - "source": [ - "# Change out of the experimentation directory\n", - "%cd .." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "import azureml.core\n", - "from azureml.core import Workspace" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Performing interactive authentication. Please follow the instructions on the terminal.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING - Note, we have launched a browser for you to login. For old experience with device code, use \"az login --use-device-code\"\n", - "WARNING - You have logged in. Now let us find all the subscriptions to which you have access...\n", - "WARNING - Failed to authenticate '{'additional_properties': {}, 'id': '/tenants/42cc3295-cd0e-449c-b98e-5ce5b560c1d3', 'tenant_id': '42cc3295-cd0e-449c-b98e-5ce5b560c1d3'}' due to error 'Get Token request returned http error: 400 and server response: {\"error\":\"interaction_required\",\"error_description\":\"AADSTS50158: External security challenge not satisfied.\\r\\nTrace ID: 1e188174-b55f-449a-b42f-b60752d63300\\r\\nCorrelation ID: 976b40a0-2d3f-4848-8220-dc9dafabac4e\\r\\nTimestamp: 2020-03-03 20:09:21Z\",\"error_codes\":[50158],\"timestamp\":\"2020-03-03 20:09:21Z\",\"trace_id\":\"1e188174-b55f-449a-b42f-b60752d63300\",\"correlation_id\":\"976b40a0-2d3f-4848-8220-dc9dafabac4e\",\"error_uri\":\"https://login.microsoftonline.com/error?code=50158\",\"suberror\":\"basic_action\"}'\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Interactive authentication successfully completed.\n" - ] - } - ], - "source": [ - "# Load the workspace from the saved config file\n", - "ws = Workspace.from_config()" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'diabetes-training\\\\train.py'" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "import os, shutil\n", - "\n", - "# Create a folder for the experiment files\n", - "training_folder = 'diabetes-training'\n", - "os.makedirs(training_folder, exist_ok=True)\n", - "\n", - "# Copy the data file into the experiment folder\n", - "shutil.copy('data/diabetes.csv', os.path.join(training_folder, \"diabetes.csv\"))\n", - "\n", - "# Copy the train functions into the experiment folder\n", - "shutil.copy('diabetes_regression/training/train.py', os.path.join(training_folder, \"train.py\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Writing diabetes-training/parameters.json\n" - ] - } - ], - "source": [ - "%%writefile $training_folder/parameters.json\n", - "{\n", - " \"training\":\n", - " {\n", - " \"alpha\": 0.3\n", - " },\n", - " \"evaluation\":\n", - " {\n", - "\n", - " },\n", - " \"scoring\":\n", - " {\n", - " \n", - " }\n", - "}\n" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Writing diabetes-training/diabetes_training.py\n" - ] - } - ], - "source": [ - "%%writefile $training_folder/diabetes_training.py\n", - "# Import libraries\n", - "from azureml.core import Run\n", - "import pandas as pd\n", - "import shutil\n", - "\n", - "from train import split_data, train_model\n", - "\n", - "# Get the experiment run context\n", - "run = Run.get_context()\n", - "\n", - "# load the diabetes dataset\n", - "print(\"Loading Data...\")\n", - "train_df = pd.read_csv('diabetes.csv')\n", - "\n", - "data = split_data(train_df)\n", - "\n", - "# Specify the parameters to test\n", - "with open(\"parameters.json\") as f:\n", - " pars = json.load(f)\n", - " train_args = pars[\"training\"]\n", - "\n", - "# Log parameters\n", - "for k, v in train_args.items():\n", - " run.log(k, v)\n", - "\n", - "model, metrics = train_model(data, train_args)\n", - "\n", - "# Log metrics\n", - "for k, v in metrics.items():\n", - " run.log(k, v)\n", - "\n", - "# Save the parameters file to the outputs folder\n", - "os.makedirs('outputs', exist_ok=True)\n", - "shutil.copy('parameters.json', os.path.join('outputs', 'parameters.json'))\n", - " \n", - "run.complete()" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "RunId: diabetes-training_1583266166_a12fa3dc\n", - "Web View: https://mlworkspace.azure.ai/portal/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training/runs/diabetes-training_1583266166_a12fa3dc\n", - "\n", - "Streaming azureml-logs/60_control_log.txt\n", - "=========================================\n", - "\n", - "Streaming log file azureml-logs/60_control_log.txt\n", - "Starting the daemon thread to refresh tokens in background for process with pid = 14668\n", - "Running: ['cmd.exe', '/c', 'C:\\\\Users\\\\brysmith\\\\AppData\\\\Local\\\\Temp\\\\azureml_runs\\\\diabetes-training_1583266166_a12fa3dc\\\\azureml-environment-setup/docker_env_checker.bat']\n", - "\n", - "Materialized image not found on target: azureml/azureml_942e102c8fd48681f49452a15f3fb0f4\n", - "\n", - "\n", - "Logging experiment preparation status in history service.\n", - "Running: ['cmd.exe', '/c', 'C:\\\\Users\\\\brysmith\\\\AppData\\\\Local\\\\Temp\\\\azureml_runs\\\\diabetes-training_1583266166_a12fa3dc\\\\azureml-environment-setup/docker_env_builder.bat']\n", - "Running: ['docker', 'build', '-f', 'azureml-environment-setup/Dockerfile', '-t', 'azureml/azureml_942e102c8fd48681f49452a15f3fb0f4', '.']\n", - "Sending build context to Docker daemon 440.8kB\n", - "Step 1/14 : FROM mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04@sha256:a1b514f3ba884b9a7695cbba5638933ddaf222e8ce3e8c81e8cdf861679abb05\n", - "sha256:a1b514f3ba884b9a7695cbba5638933ddaf222e8ce3e8c81e8cdf861679abb05: Pulling from azureml/base\n", - "a1298f4ce990: Pulling fs layer\n", - "04a3282d9c4b: Pulling fs layer\n", - "9b0d3db6dc03: Pulling fs layer\n", - "8269c605f3f1: Pulling fs layer\n", - "6504d449e70c: Pulling fs layer\n", - "4e38f320d0d4: Pulling fs layer\n", - "b0a763e8ee03: Pulling fs layer\n", - "11917a028ca4: Pulling fs layer\n", - "a6c378d11cbf: Pulling fs layer\n", - "6cc007ad9140: Pulling fs layer\n", - "6c1698a608f3: Pulling fs layer\n", - "8269c605f3f1: Waiting\n", - "6504d449e70c: Waiting\n", - "4e38f320d0d4: Waiting\n", - "b0a763e8ee03: Waiting\n", - "11917a028ca4: Waiting\n", - "a6c378d11cbf: Waiting\n", - "6cc007ad9140: Waiting\n", - "6c1698a608f3: Waiting\n", - "04a3282d9c4b: Verifying Checksum\n", - "04a3282d9c4b: Download complete\n", - "9b0d3db6dc03: Download complete\n", - "8269c605f3f1: Verifying Checksum\n", - "8269c605f3f1: Download complete\n", - "a1298f4ce990: Verifying Checksum\n", - "a1298f4ce990: Download complete\n", - "4e38f320d0d4: Verifying Checksum\n", - "4e38f320d0d4: Download complete\n", - "a1298f4ce990: Pull complete\n", - "04a3282d9c4b: Pull complete\n", - "9b0d3db6dc03: Pull complete\n", - "8269c605f3f1: Pull complete\n", - "b0a763e8ee03: Verifying Checksum\n", - "b0a763e8ee03: Download complete\n", - "6504d449e70c: Verifying Checksum\n", - "6504d449e70c: Download complete\n", - "11917a028ca4: Verifying Checksum\n", - "11917a028ca4: Download complete\n", - "6cc007ad9140: Verifying Checksum\n", - "6cc007ad9140: Download complete\n", - "a6c378d11cbf: Verifying Checksum\n", - "a6c378d11cbf: Download complete\n", - "6c1698a608f3: Verifying Checksum\n", - "6c1698a608f3: Download complete\n", - "6504d449e70c: Pull complete\n", - "4e38f320d0d4: Pull complete\n", - "b0a763e8ee03: Pull complete\n", - "11917a028ca4: Pull complete\n", - "a6c378d11cbf: Pull complete\n", - "6cc007ad9140: Pull complete\n", - "6c1698a608f3: Pull complete\n", - "Digest: sha256:a1b514f3ba884b9a7695cbba5638933ddaf222e8ce3e8c81e8cdf861679abb05\n", - "Status: Downloaded newer image for mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04@sha256:a1b514f3ba884b9a7695cbba5638933ddaf222e8ce3e8c81e8cdf861679abb05\n", - " ---> 93a72e6bd1ce\n", - "Step 2/14 : USER root\n", - " ---> Running in ccb78e3f8cb1\n", - "Removing intermediate container ccb78e3f8cb1\n", - " ---> 9492eb08e712\n", - "Step 3/14 : RUN mkdir -p $HOME/.cache\n", - " ---> Running in 345018e23095\n", - "Removing intermediate container 345018e23095\n", - " ---> 84c815f63781\n", - "Step 4/14 : WORKDIR /\n", - " ---> Running in dac4137ec988\n", - "Removing intermediate container dac4137ec988\n", - " ---> 026bc49e1fc7\n", - "Step 5/14 : COPY azureml-environment-setup/99brokenproxy /etc/apt/apt.conf.d/\n", - " ---> bdbaac820e6f\n", - "Step 6/14 : RUN if dpkg --compare-versions `conda --version | grep -oE '[^ ]+$'` lt 4.4.11; then conda install conda==4.4.11; fi\n", - " ---> Running in 07a0646408e0\n", - "Removing intermediate container 07a0646408e0\n", - " ---> df90c35bdf32\n", - "Step 7/14 : COPY azureml-environment-setup/mutated_conda_dependencies.yml azureml-environment-setup/mutated_conda_dependencies.yml\n", - " ---> 5ef66b75b1dd\n", - "Step 8/14 : RUN ldconfig /usr/local/cuda/lib64/stubs && conda env create -p /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83 -f azureml-environment-setup/mutated_conda_dependencies.yml && rm -rf \"$HOME/.cache/pip\" && conda clean -aqy && CONDA_ROOT_DIR=$(conda info --root) && rm -rf \"$CONDA_ROOT_DIR/pkgs\" && find \"$CONDA_ROOT_DIR\" -type d -name __pycache__ -exec rm -rf {} + && ldconfig\n", - " ---> Running in 5da8256aa492\n", - "Solving environment: ...working... done\n", - "\u001b[91m\n", - "\n", - "==> WARNING: A newer version of conda exists. <==\n", - " current version: 4.5.11\n", - " latest version: 4.8.2\n", - "\n", - "Please update conda by running\n", - "\n", - " $ conda update -n base -c defaults conda\n", - "\n", - "\n", - "setuptools-45.2.0 | 653 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "xz-5.2.4 | 366 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "_openmp_mutex-4.5 | 5 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "libstdcxx-ng-9.2.0 | 4.5 MB | ########## | 100% \u001b[0m\u001b[91m\n", - "sqlite-3.13.0 | 4.9 MB | ########## | 100% \u001b[0m\u001b[91m\n", - "joblib-0.14.1 | 198 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "pip-20.0.2 | 1.0 MB | ########## | 100% \u001b[0m\u001b[91m\n", - "libcblas-3.8.0 | 10 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "llvm-openmp-9.0.1 | 782 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "certifi-2019.11.28 | 149 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "libopenblas-0.3.8 | 7.8 MB | ########## | 100% \u001b[0m\u001b[91m\n", - "scipy-1.4.1 | 18.9 MB | ########## | 100% \u001b[0m\u001b[91m\n", - "libgcc-ng-9.2.0 | 8.2 MB | ########## | 100% \u001b[0m\u001b[91m\n", - "wheel-0.34.2 | 24 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "libblas-3.8.0 | 10 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "readline-6.2 | 713 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "libgfortran-ng-7.3.0 | 1.7 MB | ########## | 100% \u001b[0m\u001b[91m\n", - "liblapack-3.8.0 | 10 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "python-3.6.2 | 19.0 MB | ########## | 100% \u001b[0m\u001b[91m\n", - "ncurses-5.9 | 1.1 MB | ########## | 100% \u001b[0m\u001b[91m\n", - "scikit-learn-0.22.1 | 7.1 MB | ########## | 100% \u001b[0m\u001b[91m\n", - "numpy-1.18.1 | 5.2 MB | ########## | 100% \u001b[0m\u001b[91m\n", - "zlib-1.2.11 | 105 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "ca-certificates-2019 | 145 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "tk-8.5.19 | 1.9 MB | ########## | 100% \u001b[0m\u001b[91m\n", - "_libgcc_mutex-0.1 | 3 KB | ########## | 100% \u001b[0m\u001b[91m\n", - "openssl-1.0.2u | 3.2 MB | ########## | 100% \u001b[0m\n", - "Downloading and Extracting Packages\n", - "Preparing transaction: ...working... done\n", - "Verifying transaction: ...working... done\n", - "Executing transaction: ...working... done\n", - "Collecting azureml-defaults\n", - " Downloading azureml_defaults-1.0.85.1-py2.py3-none-any.whl (3.0 kB)\n", - "Collecting json-logging-py==0.2\n", - " Downloading json-logging-py-0.2.tar.gz (3.6 kB)\n", - "Collecting configparser==3.7.4\n", - " Downloading configparser-3.7.4-py2.py3-none-any.whl (22 kB)\n", - "Collecting applicationinsights>=0.11.7\n", - " Downloading applicationinsights-0.11.9-py2.py3-none-any.whl (58 kB)\n", - "Collecting flask==1.0.3\n", - " Downloading Flask-1.0.3-py2.py3-none-any.whl (92 kB)\n", - "Collecting azureml-core==1.0.85.*\n", - " Downloading azureml_core-1.0.85.5-py2.py3-none-any.whl (1.2 MB)\n", - "Collecting gunicorn==19.9.0\n", - " Downloading gunicorn-19.9.0-py2.py3-none-any.whl (112 kB)\n", - "Collecting azureml-model-management-sdk==1.0.1b6.post1\n", - " Downloading azureml_model_management_sdk-1.0.1b6.post1-py2.py3-none-any.whl (130 kB)\n", - "Collecting werkzeug==0.16.1\n", - " Downloading Werkzeug-0.16.1-py2.py3-none-any.whl (327 kB)\n", - "Collecting itsdangerous>=0.24\n", - " Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)\n", - "Collecting Jinja2>=2.10\n", - " Downloading Jinja2-2.11.1-py2.py3-none-any.whl (126 kB)\n", - "Collecting click>=5.1\n", - " Downloading Click-7.0-py2.py3-none-any.whl (81 kB)\n", - "Collecting python-dateutil>=2.7.3\n", - " Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)\n", - "Collecting backports.tempfile\n", - " Downloading backports.tempfile-1.0-py2.py3-none-any.whl (4.4 kB)\n", - "Collecting azure-mgmt-authorization>=0.40.0\n", - " Downloading azure_mgmt_authorization-0.60.0-py2.py3-none-any.whl (82 kB)\n", - "Collecting jmespath\n", - " Downloading jmespath-0.9.5-py2.py3-none-any.whl (24 kB)\n", - "Collecting PyJWT\n", - " Downloading PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)\n", - "Collecting pathspec\n", - " Downloading pathspec-0.7.0-py2.py3-none-any.whl (25 kB)\n", - "Collecting requests>=2.19.1\n", - " Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)\n", - "Collecting adal>=1.2.0\n", - " Downloading adal-1.2.2-py2.py3-none-any.whl (53 kB)\n", - "Collecting docker\n", - " Downloading docker-4.2.0-py2.py3-none-any.whl (143 kB)\n", - "Collecting jsonpickle\n", - " Downloading jsonpickle-1.3-py2.py3-none-any.whl (32 kB)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Collecting msrest>=0.5.1\n", - " Downloading msrest-0.6.11-py2.py3-none-any.whl (83 kB)\n", - "Collecting pytz\n", - " Downloading pytz-2019.3-py2.py3-none-any.whl (509 kB)\n", - "Collecting azure-graphrbac>=0.40.0\n", - " Downloading azure_graphrbac-0.61.1-py2.py3-none-any.whl (141 kB)\n", - "Collecting six>=1.11.0\n", - " Downloading six-1.14.0-py2.py3-none-any.whl (10 kB)\n", - "Collecting SecretStorage\n", - " Downloading SecretStorage-3.1.2-py3-none-any.whl (14 kB)\n", - "Collecting azure-mgmt-containerregistry>=2.0.0\n", - " Downloading azure_mgmt_containerregistry-2.8.0-py2.py3-none-any.whl (718 kB)\n", - "Collecting azure-mgmt-storage>=1.5.0\n", - " Downloading azure_mgmt_storage-8.0.0-py2.py3-none-any.whl (524 kB)\n", - "Collecting azure-common>=1.1.12\n", - " Downloading azure_common-1.1.24-py2.py3-none-any.whl (12 kB)\n", - "Collecting cryptography!=1.9,!=2.0.*,!=2.1.*,!=2.2.*\n", - " Downloading cryptography-2.8-cp34-abi3-manylinux2010_x86_64.whl (2.3 MB)\n", - "Collecting azure-mgmt-keyvault>=0.40.0\n", - " Downloading azure_mgmt_keyvault-2.1.1-py2.py3-none-any.whl (117 kB)\n", - "Collecting contextlib2\n", - " Downloading contextlib2-0.6.0.post1-py2.py3-none-any.whl (9.8 kB)\n", - "Collecting pyopenssl\n", - " Downloading pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB)\n", - "Collecting ndg-httpsclient\n", - " Downloading ndg_httpsclient-0.5.1-py3-none-any.whl (34 kB)\n", - "Collecting urllib3>=1.23\n", - " Downloading urllib3-1.25.8-py2.py3-none-any.whl (125 kB)\n", - "Collecting azure-mgmt-resource>=1.2.1\n", - " Downloading azure_mgmt_resource-8.0.1-py2.py3-none-any.whl (758 kB)\n", - "Collecting ruamel.yaml<=0.15.89,>=0.15.35\n", - " Downloading ruamel.yaml-0.15.89-cp36-cp36m-manylinux1_x86_64.whl (651 kB)\n", - "Collecting msrestazure>=0.4.33\n", - " Downloading msrestazure-0.6.2-py2.py3-none-any.whl (40 kB)\n", - "Collecting liac-arff>=2.1.1\n", - " Downloading liac-arff-2.4.0.tar.gz (15 kB)\n", - "Collecting dill>=0.2.7.1\n", - " Downloading dill-0.3.1.1.tar.gz (151 kB)\n", - "Requirement already satisfied: numpy>=1.13.0 in /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/lib/python3.6/site-packages (from azureml-model-management-sdk==1.0.1b6.post1->azureml-defaults->-r /azureml-environment-setup/condaenv._awm0369.requirements.txt (line 1)) (1.18.1)\n", - "Collecting pandas>=0.20.2\n", - " Downloading pandas-1.0.1-cp36-cp36m-manylinux1_x86_64.whl (10.1 MB)\n", - "Collecting MarkupSafe>=0.23\n", - " Downloading MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl (27 kB)\n", - "Collecting backports.weakref\n", - " Downloading backports.weakref-1.0.post1-py2.py3-none-any.whl (5.2 kB)\n", - "Collecting idna<3,>=2.5\n", - " Downloading idna-2.9-py2.py3-none-any.whl (58 kB)\n", - "Collecting chardet<4,>=3.0.2\n", - " Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/lib/python3.6/site-packages (from requests>=2.19.1->azureml-core==1.0.85.*->azureml-defaults->-r /azureml-environment-setup/condaenv._awm0369.requirements.txt (line 1)) (2019.11.28)\n", - "Collecting websocket-client>=0.32.0\n", - " Downloading websocket_client-0.57.0-py2.py3-none-any.whl (200 kB)\n", - "Collecting isodate>=0.6.0\n", - " Downloading isodate-0.6.0-py2.py3-none-any.whl (45 kB)\n", - "Collecting requests-oauthlib>=0.5.0\n", - " Downloading requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)\n", - "Collecting jeepney>=0.4.2\n", - " Downloading jeepney-0.4.2-py3-none-any.whl (21 kB)\n", - "Collecting cffi!=1.11.3,>=1.8\n", - " Downloading cffi-1.14.0-cp36-cp36m-manylinux1_x86_64.whl (399 kB)\n", - "Collecting pyasn1>=0.1.1\n", - " Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)\n", - "Collecting oauthlib>=3.0.0\n", - " Downloading oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)\n", - "Collecting pycparser\n", - " Downloading pycparser-2.19.tar.gz (158 kB)\n", - "Building wheels for collected packages: json-logging-py, liac-arff, dill, pycparser\n", - " Building wheel for json-logging-py (setup.py): started\n", - " Building wheel for json-logging-py (setup.py): finished with status 'done'\n", - " Created wheel for json-logging-py: filename=json_logging_py-0.2-py3-none-any.whl size=3923 sha256=d2389923d5fa749959e34ba99e193cfca7c52e3d6157eea15c3fc81f6fe26a52\n", - " Stored in directory: /root/.cache/pip/wheels/e2/1d/52/535a274b9c2ce7d4064838f2bdb62013801281ef7d7f21e2ee\n", - " Building wheel for liac-arff (setup.py): started\n", - " Building wheel for liac-arff (setup.py): finished with status 'done'\n", - " Created wheel for liac-arff: filename=liac_arff-2.4.0-py3-none-any.whl size=13333 sha256=e0cc6e1444ba030cc8494be10458deddbad063265c56cbe0a61b7cfe1f4391b1\n", - " Stored in directory: /root/.cache/pip/wheels/ba/2a/e1/6f7be2e2ea150e2486bff64fd6f0670f4f35f4c8f31c819fb8\n", - " Building wheel for dill (setup.py): started\n", - " Building wheel for dill (setup.py): finished with status 'done'\n", - " Created wheel for dill: filename=dill-0.3.1.1-py3-none-any.whl size=78530 sha256=71bb549eeb11790f4c5b80740982bfaf3f97e22e38d7b630935a76ce02d07da1\n", - " Stored in directory: /root/.cache/pip/wheels/09/84/74/d2b4feb9ac9488bc83c475cb2cbe8e8b7d9cea8320d32f3787\n", - " Building wheel for pycparser (setup.py): started\n", - " Building wheel for pycparser (setup.py): finished with status 'done'\n", - " Created wheel for pycparser: filename=pycparser-2.19-py2.py3-none-any.whl size=111031 sha256=e21fb51230c57b5ba0a2ee68ce1b31d347bae178a3d717f7a061e39c78c5754a\n", - " Stored in directory: /root/.cache/pip/wheels/c6/6b/83/2608afaa57ecfb0a66ac89191a8d9bad71c62ca55ee499c2d0\n", - "Successfully built json-logging-py liac-arff dill pycparser\n", - "Installing collected packages: json-logging-py, configparser, applicationinsights, itsdangerous, MarkupSafe, Jinja2, click, werkzeug, flask, six, python-dateutil, backports.weakref, backports.tempfile, azure-common, idna, chardet, urllib3, requests, pycparser, cffi, cryptography, PyJWT, adal, isodate, oauthlib, requests-oauthlib, msrest, msrestazure, azure-mgmt-authorization, jmespath, pathspec, websocket-client, docker, jsonpickle, pytz, azure-graphrbac, jeepney, SecretStorage, azure-mgmt-containerregistry, azure-mgmt-storage, azure-mgmt-keyvault, contextlib2, pyopenssl, pyasn1, ndg-httpsclient, azure-mgmt-resource, ruamel.yaml, azureml-core, gunicorn, liac-arff, dill, pandas, azureml-model-management-sdk, azureml-defaults\n", - "Successfully installed Jinja2-2.11.1 MarkupSafe-1.1.1 PyJWT-1.7.1 SecretStorage-3.1.2 adal-1.2.2 applicationinsights-0.11.9 azure-common-1.1.24 azure-graphrbac-0.61.1 azure-mgmt-authorization-0.60.0 azure-mgmt-containerregistry-2.8.0 azure-mgmt-keyvault-2.1.1 azure-mgmt-resource-8.0.1 azure-mgmt-storage-8.0.0 azureml-core-1.0.85.5 azureml-defaults-1.0.85.1 azureml-model-management-sdk-1.0.1b6.post1 backports.tempfile-1.0 backports.weakref-1.0.post1 cffi-1.14.0 chardet-3.0.4 click-7.0 configparser-3.7.4 contextlib2-0.6.0.post1 cryptography-2.8 dill-0.3.1.1 docker-4.2.0 flask-1.0.3 gunicorn-19.9.0 idna-2.9 isodate-0.6.0 itsdangerous-1.1.0 jeepney-0.4.2 jmespath-0.9.5 json-logging-py-0.2 jsonpickle-1.3 liac-arff-2.4.0 msrest-0.6.11 msrestazure-0.6.2 ndg-httpsclient-0.5.1 oauthlib-3.1.0 pandas-1.0.1 pathspec-0.7.0 pyasn1-0.4.8 pycparser-2.19 pyopenssl-19.1.0 python-dateutil-2.8.1 pytz-2019.3 requests-2.23.0 requests-oauthlib-1.3.0 ruamel.yaml-0.15.89 six-1.14.0 urllib3-1.25.8 websocket-client-0.57.0 werkzeug-0.16.1\n", - "\u001b[91m\n", - "\u001b[0m#\n", - "# To activate this environment, use:\n", - "# > source activate /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83\n", - "#\n", - "# To deactivate an active environment, use:\n", - "# > source deactivate\n", - "#\n", - "\n", - "Removing intermediate container 5da8256aa492\n", - " ---> d579e138ca80\n", - "Step 9/14 : ENV PATH /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/bin:$PATH\n", - " ---> Running in dd45842a3493\n", - "Removing intermediate container dd45842a3493\n", - " ---> 71036e78cc11\n", - "Step 10/14 : ENV AZUREML_CONDA_ENVIRONMENT_PATH /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83\n", - " ---> Running in c7ae65dd8cca\n", - "Removing intermediate container c7ae65dd8cca\n", - " ---> 8935ec724023\n", - "Step 11/14 : ENV LD_LIBRARY_PATH /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/lib:$LD_LIBRARY_PATH\n", - " ---> Running in 8d351c85fad7\n", - "Removing intermediate container 8d351c85fad7\n", - " ---> c52acf9440c8\n", - "Step 12/14 : COPY azureml-environment-setup/spark_cache.py azureml-environment-setup/log4j.properties /azureml-environment-setup/\n", - " ---> 48f7a0edbcc9\n", - "Step 13/14 : ENV AZUREML_ENVIRONMENT_IMAGE True\n", - " ---> Running in 38335f62c1b0\n", - "Removing intermediate container 38335f62c1b0\n", - " ---> 4f87cfd880ba\n", - "Step 14/14 : CMD [\"bash\"]\n", - " ---> Running in cc09f57ba09c\n", - "Removing intermediate container cc09f57ba09c\n", - " ---> bc6821282c9d\n", - "Successfully built bc6821282c9d\n", - "Successfully tagged azureml/azureml_942e102c8fd48681f49452a15f3fb0f4:latest\n", - "SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.\n", - "\n", - "\n", - "\n", - "\n", - "Logging experiment running status in history service.\n", - "Running: ['docker', 'run', '--name', 'diabetes-training_1583266166_a12fa3dc', '--rm', '-v', 'C:\\\\Users\\\\brysmith\\\\AppData\\\\Local\\\\Temp\\\\azureml_runs\\\\diabetes-training_1583266166_a12fa3dc:/azureml-run', '--shm-size', '2g', '-e', 'EXAMPLE_ENV_VAR=EXAMPLE_VALUE', '-e', 'AZUREML_CONTEXT_MANAGER_TRACKUSERERROR=eyJTa2lwSGlzdG9yeUltcG9ydENoZWNrIjoiRmFsc2UifQ==', '-e', 'AZUREML_CONTEXT_MANAGER_RUNHISTORY=eyJPdXRwdXRDb2xsZWN0aW9uIjp0cnVlLCJEaXJlY3Rvcmllc1RvV2F0Y2giOlsibG9ncyJdLCJzbmFwc2hvdFByb2plY3QiOnRydWV9', '-e', 'AZUREML_CONTEXT_MANAGER_PROJECTPYTHONPATH=bnVsbA==', '-e', 'AZUREML_RUN_TOKEN_EXPIRY=1585080567', '-e', 'AZUREML_RUN_TOKEN=eyJhbGciOiJSUzI1NiIsImtpZCI6IjQ4RDdBNjI3NjYxODI4RUY1QTEyQjEwNTg4MkI2MjY1Q0Q3NzQxRkUiLCJ0eXAiOiJKV1QifQ.eyJyb2xlIjoiQ29udHJpYnV0b3IiLCJzY29wZSI6Ii9zdWJzY3JpcHRpb25zLzQ4ZDQwNGY2LTNhNjktNDU1Mi1hMjEwLWIxYWZlNTUzN2NjMS9yZXNvdXJjZUdyb3Vwcy9tbG9wc29ocmcvcHJvdmlkZXJzL01pY3Jvc29mdC5NYWNoaW5lTGVhcm5pbmdTZXJ2aWNlcy93b3Jrc3BhY2VzL21sb3Bzb2gtd3MiLCJhY2NvdW50aWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJ3b3Jrc3BhY2VJZCI6IjE2NzBkYzc5LTkxYzQtNGZkNy05NDAyLTBhMjczYjdhMWU3ZSIsInByb2plY3RpZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCIsImRpc2NvdmVyeSI6InVyaTovL2Rpc2NvdmVyeXVyaS8iLCJ0aWQiOiI3MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDciLCJvaWQiOiJjOTk3NGE5MS04ZTk4LTRiMTUtOWQwZi1hMzA0ZTMzODVlZWYiLCJwdWlkIjoiMTAwM0JGRkQ4NDZDNDNFQSIsImlzcyI6ImF6dXJlbWwiLCJhcHBpZCI6IkJyeWFuIFNtaXRoIChNTCkiLCJleHAiOjE1ODUwODA1NjcsImF1ZCI6ImF6dXJlbWwifQ.oXXpMn9g4XzqepGHS93xd514E6bnlC6bbri4bv4EBpp6Cb1_GWvkexA4t8K0BYtNbVEwnCDNrE7V8R0r5TvWYCRKnB0vAhDhSXqV_51HrXN8NGcj_oiLi4_oOJ_kHtwxraHTrjXZTsqz2f6IJTwKQeAT01ZQAnBFsP3Hf8ds7V5S8LOjxqXleWelIWnwm5zXN4zhTi_W_K2Wq7CPIUOo_6k4fqVyKHAD5si_hutkC_zjEiQpCiNAMJBWU69Gto-xYspFx2xB1eV-6u-4hKBhv2N3XCA_RJ5ftdREhZJVn5WtrgSOBuLf-3JHRO99LAHade29xz0E_XXJXl9lkisVyg', '-e', 'HBI_WORKSPACE_JOB=false', '-e', 'AZUREML_RUN_TOKEN_RAND=0fa9806f-b4a7-45ba-a824-9844b3afbfd4', '-e', 'AZUREML_RUN_TOKEN_PASS=1b9d6e6f-a778-4420-a828-0210bab0bf6b', '-e', 'PYTHONUNBUFFERED=True', '-e', 'AZUREML_COMMUNICATOR=None', '-e', 'AZUREML_FRAMEWORK=Python', '-e', 'AZUREML_ARM_PROJECT_NAME=diabetes-training', '-e', 'AZUREML_ARM_WORKSPACE_NAME=mlopsoh-ws', '-e', 'AZUREML_ARM_SUBSCRIPTION=48d404f6-3a69-4552-a210-b1afe5537cc1', '-e', 'AZUREML_ARM_RESOURCEGROUP=mlopsohrg', '-e', 'AZUREML_EXPERIMENT_SCOPE=/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training', '-e', 'AZUREML_WORKSPACE_ID=1670dc79-91c4-4fd7-9402-0a273b7a1e7e', '-e', 'AZUREML_WORKSPACE_SCOPE=/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws', '-e', 'AZUREML_DATA_CONTAINER_ID=dcid.diabetes-training_1583266166_a12fa3dc', '-e', 'AZUREML_DISCOVERY_SERVICE_ENDPOINT=https://westus2.experiments.azureml.net/discovery', '-e', 'AZUREML_RUN_HISTORY_SERVICE_ENDPOINT=https://westus2.experiments.azureml.net', '-e', 'AZUREML_SERVICE_ENDPOINT=https://westus2.experiments.azureml.net', '-e', 'AZUREML_RUN_CONFIGURATION=azureml-setup/mutated_run_configuration.json', '-e', 'AZUREML_INSTRUMENTATION_KEY=2d586587-4df8-4336-9af2-277fe3c5d9cd', '-e', 'AZUREML_DRIVERLOG_PATH=azureml-logs/driver_log.txt', '-e', 'TELEMETRY_LOGS=azureml-logs/telemetry_logs/', '-e', 'FAIRLEARN_LOGS=azureml-logs/telemetry_logs/fairlearn_log.txt', '-e', 'INTERPRET_TEXT_LOGS=azureml-logs/telemetry_logs/interpret_text_log.txt', '-e', 'INTERPRET_C_LOGS=azureml-logs/telemetry_logs/interpret_community_log.txt', '-e', 'AZUREML_JOBRELEASELOG_PATH=azureml-logs/job_release_log.txt', '-e', 'AZUREML_JOBPREPLOG_PATH=azureml-logs/job_prep_log.txt', '-e', 'AZUREML_CONTROLLOG_PATH=azureml-logs/control_log.txt', '-e', 'AZUREML_LOGDIRECTORY_PATH=azureml-logs/', '-e', 'AZUREML_PIDFILE_PATH=azureml-setup/pid.txt', '-e', 'AZUREML_RUN_ID=diabetes-training_1583266166_a12fa3dc', 'azureml/azureml_942e102c8fd48681f49452a15f3fb0f4', '/bin/bash', '-c', 'cd /azureml-run && \"/azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/bin/python\" \"azureml-setup/run_script.py\" \"/azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/bin/python\" \"azureml-setup/context_manager_injector.py\" \"-i\" \"ProjectPythonPath:context_managers.ProjectPythonPath\" \"-i\" \"RunHistory:context_managers.RunHistory\" \"-i\" \"TrackUserError:context_managers.TrackUserError\" \"-i\" \"UserExceptions:context_managers.UserExceptions\" \"diabetes_training.py\"']\n", - "/bin/bash: /azureml-envs/azureml_2ec026640b47025e72b68c7988b68c83/lib/libtinfo.so.5: no version information available (required by /bin/bash)\n", - "Streaming log file azureml-logs/70_driver_log.txt\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "Streaming azureml-logs/70_driver_log.txt\n", - "========================================\n", - "\n", - "Starting the daemon thread to refresh tokens in background for process with pid = 8\n", - "Entering Run History Context Manager.\n", - "Preparing to call script [ diabetes_training.py ] with arguments: []\n", - "After variable expansion, calling script [ diabetes_training.py ] with arguments: []\n", - "\n", - "Loading Data...\n", - "\n", - "\n", - "The experiment completed successfully. Finalizing run...\n", - "Logging experiment finalizing status in history service.\n", - "Starting the daemon thread to refresh tokens in background for process with pid = 8\n", - "Cleaning up all outstanding Run operations, waiting 300.0 seconds\n", - "2 items cleaning up...\n", - "Cleanup took 0.01858043670654297 seconds\n", - "\n", - "Execution Summary\n", - "=================\n", - "RunId: diabetes-training_1583266166_a12fa3dc\n", - "Web View: https://mlworkspace.azure.ai/portal/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training/runs/diabetes-training_1583266166_a12fa3dc\n", - "\n" - ] - }, - { - "data": { - "text/plain": [ - "{'runId': 'diabetes-training_1583266166_a12fa3dc',\n", - " 'target': 'local',\n", - " 'status': 'Completed',\n", - " 'startTimeUtc': '2020-03-03T20:12:24.785499Z',\n", - " 'endTimeUtc': '2020-03-03T20:12:33.184738Z',\n", - " 'properties': {'_azureml.ComputeTargetType': 'local',\n", - " 'ContentSnapshotId': '506b34b4-2bdd-42b8-b717-9c0618480bfb',\n", - " 'azureml.git.repository_uri': 'https://github.com/microsoft/MLOpsPython.git',\n", - " 'mlflow.source.git.repoURL': 'https://github.com/microsoft/MLOpsPython.git',\n", - " 'azureml.git.branch': 'jotaylo/split_train_script',\n", - " 'mlflow.source.git.branch': 'jotaylo/split_train_script',\n", - " 'azureml.git.commit': '3df51833d143b722e578d0ae84181cb63bf78747',\n", - " 'mlflow.source.git.commit': '3df51833d143b722e578d0ae84181cb63bf78747',\n", - " 'azureml.git.dirty': 'True'},\n", - " 'inputDatasets': [],\n", - " 'runDefinition': {'script': 'diabetes_training.py',\n", - " 'useAbsolutePath': False,\n", - " 'arguments': [],\n", - " 'sourceDirectoryDataStore': None,\n", - " 'framework': 'Python',\n", - " 'communicator': 'None',\n", - " 'target': 'local',\n", - " 'dataReferences': {},\n", - " 'data': {},\n", - " 'jobName': None,\n", - " 'maxRunDurationSeconds': None,\n", - " 'nodeCount': 1,\n", - " 'environment': {'name': 'Experiment diabetes-training Environment',\n", - " 'version': 'Autosave_2020-03-03T20:09:27Z_e77ba799',\n", - " 'python': {'interpreterPath': 'python',\n", - " 'userManagedDependencies': False,\n", - " 'condaDependencies': {'channels': ['conda-forge'],\n", - " 'dependencies': ['python=3.6.2',\n", - " {'pip': ['azureml-defaults']},\n", - " 'scikit-learn'],\n", - " 'name': 'azureml_2ec026640b47025e72b68c7988b68c83'},\n", - " 'baseCondaEnvironment': None},\n", - " 'environmentVariables': {'EXAMPLE_ENV_VAR': 'EXAMPLE_VALUE'},\n", - " 'docker': {'baseImage': 'mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04',\n", - " 'baseDockerfile': None,\n", - " 'baseImageRegistry': {'address': None, 'username': None, 'password': None},\n", - " 'enabled': True,\n", - " 'arguments': []},\n", - " 'spark': {'repositories': [], 'packages': [], 'precachePackages': False},\n", - " 'inferencingStackVersion': None},\n", - " 'history': {'outputCollection': True,\n", - " 'directoriesToWatch': ['logs'],\n", - " 'snapshotProject': True},\n", - " 'spark': {'configuration': {'spark.app.name': 'Azure ML Experiment',\n", - " 'spark.yarn.maxAppAttempts': '1'}},\n", - " 'amlCompute': {'name': None,\n", - " 'vmSize': None,\n", - " 'retainCluster': False,\n", - " 'clusterMaxNodeCount': 1},\n", - " 'tensorflow': {'workerCount': 1, 'parameterServerCount': 1},\n", - " 'mpi': {'processCountPerNode': 1},\n", - " 'hdi': {'yarnDeployMode': 'Cluster'},\n", - " 'containerInstance': {'region': None, 'cpuCores': 2, 'memoryGb': 3.5},\n", - " 'exposedPorts': None,\n", - " 'docker': {'useDocker': True,\n", - " 'sharedVolumes': True,\n", - " 'shmSize': '2g',\n", - " 'arguments': []}},\n", - " 'logFiles': {'azureml-logs/60_control_log.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.diabetes-training_1583266166_a12fa3dc/azureml-logs/60_control_log.txt?sv=2019-02-02&sr=b&sig=W0ZSp%2BDnGpmoHR5EC4V%2B485QhAc3nLc9H3bZfMfyyC8%3D&st=2020-03-03T20%3A02%3A34Z&se=2020-03-04T04%3A12%3A34Z&sp=r',\n", - " 'azureml-logs/70_driver_log.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.diabetes-training_1583266166_a12fa3dc/azureml-logs/70_driver_log.txt?sv=2019-02-02&sr=b&sig=NGrGUXpgtFS01u6JP%2BzaSurqBlcL%2BuORGKVGEJbcthQ%3D&st=2020-03-03T20%3A02%3A34Z&se=2020-03-04T04%3A12%3A34Z&sp=r',\n", - " 'logs/azureml/8_azureml.log': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.diabetes-training_1583266166_a12fa3dc/logs/azureml/8_azureml.log?sv=2019-02-02&sr=b&sig=3wH1m80rl53SFb5gfDDC3U4k%2BvkaVLxpWDd5vj5o6A0%3D&st=2020-03-03T20%3A02%3A34Z&se=2020-03-04T04%3A12%3A34Z&sp=r'}}" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from azureml.train.estimator import Estimator\n", - "from azureml.core import Experiment\n", - "\n", - "# Create an estimator\n", - "estimator = Estimator(source_directory=training_folder,\n", - " entry_script='diabetes_training.py',\n", - " compute_target='local',\n", - " conda_packages=['scikit-learn']\n", - " )\n", - "\n", - "# Create an experiment\n", - "experiment_name = 'diabetes-training'\n", - "experiment = Experiment(workspace = ws, name = experiment_name)\n", - "\n", - "# Run the experiment based on the estimator\n", - "run = experiment.submit(config=estimator)\n", - "run.wait_for_completion(show_output=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "alpha 0.3\n", - "mse 3302.673633401725\n" - ] - } - ], - "source": [ - "metrics = run.get_metrics()\n", - "for k, v in metrics.items():\n", - " print(k, v)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "azureml-logs/60_control_log.txt\n", - "azureml-logs/70_driver_log.txt\n", - "logs/azureml/8_azureml.log\n", - "outputs/parameters.json\n" - ] - } - ], - "source": [ - "for file in run.get_file_names():\n", - " print(file)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python (storedna)", - "language": "python", - "name": "storedna" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/experimentation/pipeline.ipynb b/experimentation/pipeline.ipynb deleted file mode 100644 index 0d1a4d92..00000000 --- a/experimentation/pipeline.ipynb +++ /dev/null @@ -1,646 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment with parameters for a Ridge Regression Model on the Diabetes Dataset" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This notebook is for experimenting with different parameters to train a ridge regression model on the Diabetes dataset." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "C:\\Users\\brysmith\\Source\\Repos\\MLOpsPython\n" - ] - } - ], - "source": [ - "# Change out of the experimentation directory\n", - "%cd .." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "import azureml.core\n", - "from azureml.core import Workspace" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "# Load the workspace from the saved config file\n", - "ws = Workspace.from_config()" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'diabetes-training\\\\train.py'" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "import os, shutil\n", - "\n", - "# Create a folder for the experiment files\n", - "training_folder = 'diabetes-training'\n", - "os.makedirs(training_folder, exist_ok=True)\n", - "\n", - "# Copy the data file into the experiment folder\n", - "shutil.copy('data/diabetes.csv', os.path.join(training_folder, \"diabetes.csv\"))\n", - "\n", - "# Copy the train functions into the experiment folder\n", - "shutil.copy('diabetes_regression/training/train.py', os.path.join(training_folder, \"train.py\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Overwriting diabetes-training/parameters.json\n" - ] - } - ], - "source": [ - "%%writefile $training_folder/parameters.json\n", - "{\n", - " \"training\":\n", - " {\n", - " \"alpha\": 0.3\n", - " },\n", - " \"evaluation\":\n", - " {\n", - "\n", - " },\n", - " \"scoring\":\n", - " {\n", - " \n", - " }\n", - "}\n" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Overwriting diabetes-training/diabetes_training.py\n" - ] - } - ], - "source": [ - "%%writefile $training_folder/diabetes_training.py\n", - "# Import libraries\n", - "from azureml.core import Run\n", - "import pandas as pd\n", - "import shutil\n", - "import joblib\n", - "\n", - "from train import split_data, train_model\n", - "\n", - "# Get parameters\n", - "parser = argparse.ArgumentParser()\n", - "parser.add_argument('--output_folder', type=str, dest='output_folder', default=\"diabetes_model\", help='output folder')\n", - "args = parser.parse_args()\n", - "output_folder = args.output_folder\n", - "\n", - "# Get the experiment run context\n", - "run = Run.get_context()\n", - "\n", - "# load the diabetes dataset\n", - "print(\"Loading Data...\")\n", - "train_df = pd.read_csv('diabetes.csv')\n", - "\n", - "data = split_data(train_df)\n", - "\n", - "# Specify the parameters to test\n", - "with open(\"parameters.json\") as f:\n", - " pars = json.load(f)\n", - " train_args = pars[\"training\"]\n", - "\n", - "# Log parameters\n", - "for k, v in train_args.items():\n", - " run.log(k, v)\n", - "\n", - "model, metrics = train_model(data, train_args)\n", - "\n", - "# Log metrics\n", - "for k, v in metrics.items():\n", - " run.log(k, v)\n", - "\n", - "# Save the parameters file to the outputs folder\n", - "os.makedirs(output_folder, exist_ok=True)\n", - "shutil.copy('parameters.json', os.path.join(output_folder, 'parameters.json'))\n", - "joblib.dump(value=model, filename= output_folder + \"/model.pkl\")\n", - " \n", - "run.complete()" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Overwriting diabetes-training/register_diabetes.py\n" - ] - } - ], - "source": [ - "%%writefile $training_folder/register_diabetes.py\n", - "# Import libraries\n", - "import argparse\n", - "import joblib\n", - "from azureml.core import Workspace, Model, Run\n", - "\n", - "# Get parameters\n", - "parser = argparse.ArgumentParser()\n", - "parser.add_argument('--model_folder', type=str, dest='model_folder', default=\"diabetes_model\", help='model location')\n", - "args = parser.parse_args()\n", - "model_folder = args.model_folder\n", - "\n", - "# Get the experiment run context\n", - "run = Run.get_context()\n", - "\n", - "# load the model\n", - "print(\"Loading model from \" + model_folder)\n", - "model_file = model_folder + \"/model.pkl\"\n", - "model = joblib.load(model_file)\n", - "\n", - "Model.register(workspace=run.experiment.workspace,\n", - " model_path = model_file,\n", - " model_name = 'diabetes_model',\n", - " tags={'Training context':'Pipeline'})\n", - "\n", - "run.complete()" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Creating\n", - "Succeeded\n", - "AmlCompute wait for completion finished\n", - "Minimum number of nodes requested have been provisioned\n" - ] - } - ], - "source": [ - "from azureml.core.compute import ComputeTarget, AmlCompute\n", - "from azureml.core.compute_target import ComputeTargetException\n", - "\n", - "cluster_name = \"aml-cluster\"\n", - "\n", - "# Verify that cluster exists\n", - "try:\n", - " pipeline_cluster = ComputeTarget(workspace=ws, name=cluster_name)\n", - " print('Found existing cluster, use it.')\n", - "except ComputeTargetException:\n", - " # If not, create it\n", - " compute_config = AmlCompute.provisioning_configuration(vm_size='STANDARD_D2_V2',\n", - " max_nodes=4,\n", - " idle_seconds_before_scaledown=1800)\n", - " pipeline_cluster = ComputeTarget.create(ws, cluster_name, compute_config)\n", - "\n", - "pipeline_cluster.wait_for_completion(show_output=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Run configuration created.\n" - ] - } - ], - "source": [ - "from azureml.core import Environment\n", - "from azureml.core.conda_dependencies import CondaDependencies\n", - "from azureml.core.runconfig import RunConfiguration\n", - "\n", - "# Create a Python environment for the experiment\n", - "diabetes_env = Environment(\"diabetes-pipeline-env\")\n", - "diabetes_env.python.user_managed_dependencies = False # Let Azure ML manage dependencies\n", - "diabetes_env.docker.enabled = True # Use a docker container\n", - "\n", - "# Create a set of package dependencies\n", - "diabetes_packages = CondaDependencies.create(conda_packages=['scikit-learn','pandas'],\n", - " pip_packages=['azureml-sdk'])\n", - "\n", - "# Add the dependencies to the environment\n", - "diabetes_env.python.conda_dependencies = diabetes_packages\n", - "\n", - "# Register the environment (just in case you want to use it again)\n", - "diabetes_env.register(workspace=ws)\n", - "registered_env = Environment.get(ws, 'diabetes-pipeline-env')\n", - "\n", - "# Create a new runconfig object for the pipeline\n", - "pipeline_run_config = RunConfiguration()\n", - "\n", - "# Use the compute you created above. \n", - "pipeline_run_config.target = pipeline_cluster\n", - "\n", - "# Assign the environment to the run configuration\n", - "pipeline_run_config.environment = registered_env\n", - "\n", - "print (\"Run configuration created.\")" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pipeline steps defined\n" - ] - } - ], - "source": [ - "from azureml.pipeline.core import PipelineData\n", - "from azureml.pipeline.steps import PythonScriptStep, EstimatorStep\n", - "from azureml.train.estimator import Estimator\n", - "\n", - "# Get the training dataset\n", - "#diabetes_ds = ws.datasets.get(\"diabetes dataset\")\n", - "\n", - "# Create a PipelineData (temporary Data Reference) for the model folder\n", - "model_folder = PipelineData(\"model_folder\", datastore=ws.get_default_datastore())\n", - "\n", - "estimator = Estimator(source_directory=training_folder,\n", - " compute_target = pipeline_cluster,\n", - " environment_definition=pipeline_run_config.environment,\n", - " entry_script='diabetes_training.py')\n", - "\n", - "# Step 1, run the estimator to train the model\n", - "train_step = EstimatorStep(name = \"Train Model\",\n", - " estimator=estimator, \n", - " estimator_entry_script_arguments=['--output_folder', model_folder],\n", - " outputs=[model_folder],\n", - " compute_target = pipeline_cluster,\n", - " allow_reuse = True)\n", - "\n", - "# Step 2, run the model registration script\n", - "register_step = PythonScriptStep(name = \"Register Model\",\n", - " source_directory = training_folder,\n", - " script_name = \"register_diabetes.py\",\n", - " arguments = ['--model_folder', model_folder],\n", - " inputs=[model_folder],\n", - " compute_target = pipeline_cluster,\n", - " runconfig = pipeline_run_config,\n", - " allow_reuse = True)\n", - "\n", - "print(\"Pipeline steps defined\")" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING - 'gpu_support' is no longer necessary; AzureML now automatically detects and uses nvidia docker extension when it is available. It will be removed in a future release.\n", - "WARNING - 'gpu_support' is no longer necessary; AzureML now automatically detects and uses nvidia docker extension when it is available. It will be removed in a future release.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Pipeline is built.\n", - "Created step Train Model [f5c73851][18728f1f-bc86-4767-bfc2-3aa1032c0ba9], (This step will run and generate new outputs)\n", - "Created step Register Model [98ff322a][a35e33b1-fab1-45bc-8f1e-4e9df587d639], (This step will run and generate new outputs)\n", - "Submitted PipelineRun 61cc0698-933d-4a1b-954d-d3c0045f6dbb\n", - "Link to Azure Portal: https://mlworkspace.azure.ai/portal/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training-pipeline/runs/61cc0698-933d-4a1b-954d-d3c0045f6dbb\n", - "Pipeline submitted for execution.\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "e454ca5bb250404b93fb5057597dc039", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "_PipelineWidget(widget_settings={'childWidgetDisplay': 'popup', 'send_telemetry': False, 'log_level': 'INFO', …" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "PipelineRunId: 61cc0698-933d-4a1b-954d-d3c0045f6dbb\n", - "Link to Portal: https://mlworkspace.azure.ai/portal/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training-pipeline/runs/61cc0698-933d-4a1b-954d-d3c0045f6dbb\n", - "PipelineRun Status: NotStarted\n", - "PipelineRun Status: Running\n", - "\n", - "\n", - "StepRunId: d6c05b43-8582-4e6c-aee9-0196ffc64634\n", - "Link to Portal: https://mlworkspace.azure.ai/portal/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training-pipeline/runs/d6c05b43-8582-4e6c-aee9-0196ffc64634\n", - "StepRun( Train Model ) Status: NotStarted\n", - "StepRun( Train Model ) Status: Running\n", - "\n", - "Streaming azureml-logs/55_azureml-execution-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt\n", - "========================================================================================================================\n", - "2020-03-03T21:45:38Z Starting output-watcher...\n", - "2020-03-03T21:45:38Z IsDedicatedCompute == True, won't poll for Low Pri Preemption\n", - "Login Succeeded\n", - "Using default tag: latest\n", - "latest: Pulling from azureml/azureml_d98378851aa287fc3ea388278015dcf6\n", - "Digest: sha256:e3df99acf8c13db41600df4c75a4cc312d3974c8abffe335545d6ef675bf8022\n", - "Status: Image is up to date for mlopsohws46ec5f38.azurecr.io/azureml/azureml_d98378851aa287fc3ea388278015dcf6:latest\n", - "b4414dbe533553d031d9acaff5a13fe7619ec71cf9aef7a36bd4c988ff0a15a7\n", - "2020/03/03 21:45:41 Version: 3.0.01154.0001 Branch: master Commit: fd92aa9d\n", - "2020/03/03 21:45:41 /dev/infiniband/uverbs0 found (implying presence of InfiniBand)?: false\n", - "2020/03/03 21:45:41 sshd runtime has already been installed in the container\n", - "ssh-keygen: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libcrypto.so.1.0.0: no version information available (required by ssh-keygen)\n", - "ssh-keygen: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libcrypto.so.1.0.0: no version information available (required by ssh-keygen)\n", - "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", - "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", - "\n", - "Streaming azureml-logs/65_job_prep-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt\n", - "===============================================================================================================\n", - "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", - "Starting job preparation. Current time:2020-03-03T21:45:51.103994\n", - "Extracting the control code.\n", - "Creating directory: azureml-logs/\n", - "Retrieving project from snapshot: 7c4b3bf6-a347-4898-aae3-69dc2b054b8d\n", - "Starting the daemon thread to refresh tokens in background for process with pid = 90\n", - "Starting project file download.\n", - "Finished project file download.\n", - "Download from datastores if requested.\n", - "\n", - "Streaming azureml-logs/70_driver_log.txt\n", - "========================================\n", - "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", - "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", - "Starting the daemon thread to refresh tokens in background for process with pid = 144\n", - "Entering Run History Context Manager.\n", - "Preparing to call script [ diabetes_training.py ] with arguments: ['--output_folder', '/mnt/batch/tasks/shared/LS_root/jobs/mlopsoh-ws/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/mounts/workspaceblobstore/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder']\n", - "After variable expansion, calling script [ diabetes_training.py ] with arguments: ['--output_folder', '/mnt/batch/tasks/shared/LS_root/jobs/mlopsoh-ws/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/mounts/workspaceblobstore/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder']\n", - "\n", - "Loading Data...\n", - "\n", - "\n", - "The experiment completed successfully. Finalizing run...\n", - "Cleaning up all outstanding Run operations, waiting 300.0 seconds\n", - "2 items cleaning up...\n", - "Cleanup took 0.0016448497772216797 seconds\n", - "Starting the daemon thread to refresh tokens in background for process with pid = 144\n", - "\n", - "Streaming azureml-logs/75_job_post-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt\n", - "===============================================================================================================\n", - "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", - "Starting job release. Current time:2020-03-03T21:46:12.186401\n", - "Logging experiment finalizing status in history service.\n", - "Starting the daemon thread to refresh tokens in background for process with pid = 178\n", - "Job release is complete. Current time:2020-03-03T21:46:14.781124\n", - "\n", - "StepRun(Train Model) Execution Summary\n", - "=======================================\n", - "StepRun( Train Model ) Status: Finished\n", - "{'runId': 'd6c05b43-8582-4e6c-aee9-0196ffc64634', 'target': 'aml-cluster', 'status': 'Completed', 'startTimeUtc': '2020-03-03T21:45:38.215193Z', 'endTimeUtc': '2020-03-03T21:46:26.227746Z', 'properties': {'azureml.runsource': 'azureml.StepRun', 'ContentSnapshotId': '7c4b3bf6-a347-4898-aae3-69dc2b054b8d', 'StepType': 'PythonScriptStep', 'ComputeTargetType': 'AmlCompute', 'azureml.pipelinerunid': '61cc0698-933d-4a1b-954d-d3c0045f6dbb', '_azureml.ComputeTargetType': 'amlcompute', 'AzureML.DerivedImageName': 'azureml/azureml_d98378851aa287fc3ea388278015dcf6', 'ProcessInfoFile': 'azureml-logs/process_info.json', 'ProcessStatusFile': 'azureml-logs/process_status.json'}, 'inputDatasets': [], 'runDefinition': {'script': 'diabetes_training.py', 'useAbsolutePath': False, 'arguments': ['--output_folder', '$AZUREML_DATAREFERENCE_model_folder'], 'sourceDirectoryDataStore': None, 'framework': 'Python', 'communicator': 'None', 'target': 'aml-cluster', 'dataReferences': {'model_folder': {'dataStoreName': 'workspaceblobstore', 'mode': 'Mount', 'pathOnDataStore': 'azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder', 'pathOnCompute': None, 'overwrite': False}}, 'data': {}, 'jobName': None, 'maxRunDurationSeconds': None, 'nodeCount': 1, 'environment': {'name': 'Experiment diabetes-training-pipeline Environment', 'version': 'Autosave_2020-03-03T21:07:02Z_4e883779', 'python': {'interpreterPath': 'python', 'userManagedDependencies': False, 'condaDependencies': {'channels': ['conda-forge'], 'dependencies': ['python=3.6.2', {'pip': ['azureml-sdk==1.0.65.*']}, 'scikit-learn', 'pandas'], 'name': 'azureml_26255de668949460e1d18d9466048046'}, 'baseCondaEnvironment': None}, 'environmentVariables': {'EXAMPLE_ENV_VAR': 'EXAMPLE_VALUE'}, 'docker': {'baseImage': 'mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04', 'baseDockerfile': None, 'baseImageRegistry': {'address': None, 'username': None, 'password': None}, 'enabled': True, 'shmSize': '1g'}, 'spark': {'repositories': ['[]'], 'packages': [], 'precachePackages': True}, 'inferencingStackVersion': None}, 'history': {'outputCollection': True, 'directoriesToWatch': ['logs']}, 'spark': {'configuration': {'spark.app.name': 'Azure ML Experiment', 'spark.yarn.maxAppAttempts': '1'}}, 'amlCompute': {'name': None, 'vmSize': None, 'retainCluster': False, 'clusterMaxNodeCount': 1}, 'tensorflow': {'workerCount': 1, 'parameterServerCount': 1}, 'mpi': {'processCountPerNode': 1}, 'hdi': {'yarnDeployMode': 'Cluster'}, 'containerInstance': {'region': None, 'cpuCores': 2, 'memoryGb': 3.5}, 'exposedPorts': None, 'docker': {'useDocker': True, 'sharedVolumes': True, 'shmSize': '1g', 'arguments': []}}, 'logFiles': {'azureml-logs/55_azureml-execution-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/azureml-logs/55_azureml-execution-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt?sv=2019-02-02&sr=b&sig=sRzw0o48ZqzSwJH96ttQVR8jKPjhpoIONx8xXrqZc6c%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'azureml-logs/65_job_prep-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/azureml-logs/65_job_prep-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt?sv=2019-02-02&sr=b&sig=KXAeYN0v6f9FS3T2gSMph0mnhhd8PclswAaDcSZ35gc%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'azureml-logs/70_driver_log.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/azureml-logs/70_driver_log.txt?sv=2019-02-02&sr=b&sig=Rt6lPoTqgRuaavLxaDQMte3LpACYe5rlUmOgVkPeqKo%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'azureml-logs/75_job_post-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/azureml-logs/75_job_post-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt?sv=2019-02-02&sr=b&sig=jPunjSUTwbIV0uoaFBFI1LhVnPOVnHtuw84iXx3xRV0%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'azureml-logs/process_info.json': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/azureml-logs/process_info.json?sv=2019-02-02&sr=b&sig=1QJfL3OKhipnsIEWUSFwWaoFRr%2FHhqSKLI2oLj%2BlWn8%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'azureml-logs/process_status.json': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/azureml-logs/process_status.json?sv=2019-02-02&sr=b&sig=IH9Fzbsug0aRPq4gio8V3vNAiXKVjEF4KgCVZVpB1CA%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'logs/azureml/144_azureml.log': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/logs/azureml/144_azureml.log?sv=2019-02-02&sr=b&sig=pySuopDJv8QnIozRS%2BC94LmGrT393Yc8K8kH2GbyfZU%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'logs/azureml/azureml.log': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/logs/azureml/azureml.log?sv=2019-02-02&sr=b&sig=YnXYKFlCrs5KglDWZLoqO%2Br1mbkjbxlxTXFNhWdJFws%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'logs/azureml/executionlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/logs/azureml/executionlogs.txt?sv=2019-02-02&sr=b&sig=C2CoAsflOiTxs35LHT1%2BLZh5mZbxuhB3K4kWtRooH2Y%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'logs/azureml/stderrlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/logs/azureml/stderrlogs.txt?sv=2019-02-02&sr=b&sig=92riKqZCzj7gqBskV1pZh5UjtVCFI%2Fx%2BRVeQYeZQFP8%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r', 'logs/azureml/stdoutlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.d6c05b43-8582-4e6c-aee9-0196ffc64634/logs/azureml/stdoutlogs.txt?sv=2019-02-02&sr=b&sig=IIOWNF7c013atekMUf0E2Uv34%2FrTgySNaRceprLnsdI%3D&st=2020-03-03T21%3A36%3A32Z&se=2020-03-04T05%3A46%3A32Z&sp=r'}}\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\n", - "\n", - "StepRunId: 49dcaa65-8f24-452e-99bd-4b458f9aa95b\n", - "Link to Portal: https://mlworkspace.azure.ai/portal/subscriptions/48d404f6-3a69-4552-a210-b1afe5537cc1/resourceGroups/mlopsohrg/providers/Microsoft.MachineLearningServices/workspaces/mlopsoh-ws/experiments/diabetes-training-pipeline/runs/49dcaa65-8f24-452e-99bd-4b458f9aa95b\n", - "StepRun( Register Model ) Status: NotStarted\n", - "StepRun( Register Model ) Status: Running\n", - "\n", - "Streaming azureml-logs/55_azureml-execution-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt\n", - "========================================================================================================================\n", - "2020-03-03T21:47:09Z Starting output-watcher...\n", - "2020-03-03T21:47:09Z IsDedicatedCompute == True, won't poll for Low Pri Preemption\n", - "Login Succeeded\n", - "Using default tag: latest\n", - "latest: Pulling from azureml/azureml_d98378851aa287fc3ea388278015dcf6\n", - "Digest: sha256:e3df99acf8c13db41600df4c75a4cc312d3974c8abffe335545d6ef675bf8022\n", - "Status: Image is up to date for mlopsohws46ec5f38.azurecr.io/azureml/azureml_d98378851aa287fc3ea388278015dcf6:latest\n", - "4d22500e0304c424c9cb39e8eab9203f23e9c08209bf0288ff00b9d3663470b7\n", - "2020/03/03 21:47:11 Version: 3.0.01154.0001 Branch: master Commit: fd92aa9d\n", - "2020/03/03 21:47:12 /dev/infiniband/uverbs0 found (implying presence of InfiniBand)?: false\n", - "2020/03/03 21:47:12 sshd runtime has already been installed in the container\n", - "ssh-keygen: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libcrypto.so.1.0.0: no version information available (required by ssh-keygen)\n", - "ssh-keygen: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libcrypto.so.1.0.0: no version information available (required by ssh-keygen)\n", - "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", - "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", - "\n", - "Streaming azureml-logs/65_job_prep-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt\n", - "===============================================================================================================\n", - "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", - "Starting job preparation. Current time:2020-03-03T21:47:21.735589\n", - "Extracting the control code.\n", - "Creating directory: azureml-logs/\n", - "Retrieving project from snapshot: 7c4b3bf6-a347-4898-aae3-69dc2b054b8d\n", - "Starting the daemon thread to refresh tokens in background for process with pid = 89\n", - "Starting project file download.\n", - "Finished project file download.\n", - "Download from datastores if requested.\n", - "\n", - "Streaming azureml-logs/70_driver_log.txt\n", - "========================================\n", - "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", - "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", - "Starting the daemon thread to refresh tokens in background for process with pid = 143\n", - "Entering Run History Context Manager.\n", - "Preparing to call script [ register_diabetes.py ] with arguments: ['--model_folder', '/mnt/batch/tasks/shared/LS_root/jobs/mlopsoh-ws/azureml/49dcaa65-8f24-452e-99bd-4b458f9aa95b/mounts/workspaceblobstore/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder']\n", - "After variable expansion, calling script [ register_diabetes.py ] with arguments: ['--model_folder', '/mnt/batch/tasks/shared/LS_root/jobs/mlopsoh-ws/azureml/49dcaa65-8f24-452e-99bd-4b458f9aa95b/mounts/workspaceblobstore/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder']\n", - "\n", - "Loading model from /mnt/batch/tasks/shared/LS_root/jobs/mlopsoh-ws/azureml/49dcaa65-8f24-452e-99bd-4b458f9aa95b/mounts/workspaceblobstore/azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder\n", - "Registering model diabetes_model\n", - "\n", - "\n", - "The experiment completed successfully. Finalizing run...\n", - "Cleaning up all outstanding Run operations, waiting 300.0 seconds\n", - "2 items cleaning up...\n", - "Cleanup took 0.0016734600067138672 seconds\n", - "Starting the daemon thread to refresh tokens in background for process with pid = 143\n", - "\n", - "Streaming azureml-logs/75_job_post-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt\n", - "===============================================================================================================\n", - "bash: /azureml-envs/azureml_26255de668949460e1d18d9466048046/lib/libtinfo.so.5: no version information available (required by bash)\n", - "Starting job release. Current time:2020-03-03T21:47:42.433595\n", - "Logging experiment finalizing status in history service.\n", - "Starting the daemon thread to refresh tokens in background for process with pid = 173\n", - "Job release is complete. Current time:2020-03-03T21:47:44.523187\n", - "\n", - "StepRun(Register Model) Execution Summary\n", - "==========================================\n", - "StepRun( Register Model ) Status: Finished\n", - "{'runId': '49dcaa65-8f24-452e-99bd-4b458f9aa95b', 'target': 'aml-cluster', 'status': 'Completed', 'startTimeUtc': '2020-03-03T21:47:07.772408Z', 'endTimeUtc': '2020-03-03T21:47:55.940406Z', 'properties': {'azureml.runsource': 'azureml.StepRun', 'ContentSnapshotId': '7c4b3bf6-a347-4898-aae3-69dc2b054b8d', 'StepType': 'PythonScriptStep', 'ComputeTargetType': 'AmlCompute', 'azureml.pipelinerunid': '61cc0698-933d-4a1b-954d-d3c0045f6dbb', '_azureml.ComputeTargetType': 'amlcompute', 'AzureML.DerivedImageName': 'azureml/azureml_d98378851aa287fc3ea388278015dcf6', 'ProcessInfoFile': 'azureml-logs/process_info.json', 'ProcessStatusFile': 'azureml-logs/process_status.json'}, 'inputDatasets': [], 'runDefinition': {'script': 'register_diabetes.py', 'useAbsolutePath': False, 'arguments': ['--model_folder', '$AZUREML_DATAREFERENCE_model_folder'], 'sourceDirectoryDataStore': None, 'framework': 'Python', 'communicator': 'None', 'target': 'aml-cluster', 'dataReferences': {'model_folder': {'dataStoreName': 'workspaceblobstore', 'mode': 'Mount', 'pathOnDataStore': 'azureml/d6c05b43-8582-4e6c-aee9-0196ffc64634/model_folder', 'pathOnCompute': None, 'overwrite': False}}, 'data': {}, 'jobName': None, 'maxRunDurationSeconds': None, 'nodeCount': 1, 'environment': {'name': 'Experiment diabetes-training-pipeline Environment', 'version': 'Autosave_2020-03-03T21:07:02Z_4e883779', 'python': {'interpreterPath': 'python', 'userManagedDependencies': False, 'condaDependencies': {'channels': ['conda-forge'], 'dependencies': ['python=3.6.2', {'pip': ['azureml-sdk==1.0.65.*']}, 'scikit-learn', 'pandas'], 'name': 'azureml_26255de668949460e1d18d9466048046'}, 'baseCondaEnvironment': None}, 'environmentVariables': {'EXAMPLE_ENV_VAR': 'EXAMPLE_VALUE'}, 'docker': {'baseImage': 'mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04', 'baseDockerfile': None, 'baseImageRegistry': {'address': None, 'username': None, 'password': None}, 'enabled': True, 'shmSize': '1g'}, 'spark': {'repositories': ['[]'], 'packages': [], 'precachePackages': True}, 'inferencingStackVersion': None}, 'history': {'outputCollection': True, 'directoriesToWatch': ['logs']}, 'spark': {'configuration': {'spark.app.name': 'Azure ML Experiment', 'spark.yarn.maxAppAttempts': '1'}}, 'amlCompute': {'name': None, 'vmSize': None, 'retainCluster': False, 'clusterMaxNodeCount': 1}, 'tensorflow': {'workerCount': 1, 'parameterServerCount': 1}, 'mpi': {'processCountPerNode': 1}, 'hdi': {'yarnDeployMode': 'Cluster'}, 'containerInstance': {'region': None, 'cpuCores': 2, 'memoryGb': 3.5}, 'exposedPorts': None, 'docker': {'useDocker': True, 'sharedVolumes': True, 'shmSize': '1g', 'arguments': []}}, 'logFiles': {'azureml-logs/55_azureml-execution-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/azureml-logs/55_azureml-execution-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt?sv=2019-02-02&sr=b&sig=cyDaMnSXvG%2Bf0WcCiV2uPlpF2JjkGjsIqASqRcj74XM%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'azureml-logs/65_job_prep-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/azureml-logs/65_job_prep-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt?sv=2019-02-02&sr=b&sig=MDK4eXiieizd5CCxPSOH0ZrNYqXOWb3hxBI%2B3jYzxYg%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'azureml-logs/70_driver_log.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/azureml-logs/70_driver_log.txt?sv=2019-02-02&sr=b&sig=9KKN%2BbX8YK3P1OdW%2Bdu%2FHMqriMIT4mSVvKOIoI0iRaI%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'azureml-logs/75_job_post-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/azureml-logs/75_job_post-tvmps_058956e2b18c5cbe96f17d2694f3bc08560b1d64dc64a8d98214df439a8dd3c6_d.txt?sv=2019-02-02&sr=b&sig=ZbOSWoRrnoxgb1vA163Buv%2F8jS47biV%2F7yCbZD6BvW4%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'azureml-logs/process_info.json': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/azureml-logs/process_info.json?sv=2019-02-02&sr=b&sig=wIZIabHFN4TUgtsAtVW7OHh8%2FOyOEbzjDSAam8gOPPE%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'azureml-logs/process_status.json': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/azureml-logs/process_status.json?sv=2019-02-02&sr=b&sig=zJtcpK7%2FLPaDn3pNVgMCfrKj1wd5%2BbIM6nlUxo0vFgU%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'logs/azureml/143_azureml.log': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/logs/azureml/143_azureml.log?sv=2019-02-02&sr=b&sig=H1Ejs1%2FGgNpBz%2BmDBlITjUwuxo%2BP01qsQH9VzI7adF8%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'logs/azureml/azureml.log': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/logs/azureml/azureml.log?sv=2019-02-02&sr=b&sig=7e5pMnohW7WmA%2BIzVpUMntb0hMpDGx%2Fca0Rjb1kBank%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'logs/azureml/executionlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/logs/azureml/executionlogs.txt?sv=2019-02-02&sr=b&sig=Uv%2Flj%2FHG5UzEXVPFtJb26%2FOcckyuhoqd9PmUzPLkPTo%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'logs/azureml/stderrlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/logs/azureml/stderrlogs.txt?sv=2019-02-02&sr=b&sig=Q%2FIgd%2F3ygd%2FWZXm%2FFVLWWBbR0TGyGrDU3E7LwnMH%2FHQ%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r', 'logs/azureml/stdoutlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.49dcaa65-8f24-452e-99bd-4b458f9aa95b/logs/azureml/stdoutlogs.txt?sv=2019-02-02&sr=b&sig=3VKIIzOaCzCUktPjKxT3JQGVtiZjMTmtk9xnC%2F41EtY%3D&st=2020-03-03T21%3A38%3A02Z&se=2020-03-04T05%3A48%3A02Z&sp=r'}}\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\n", - "PipelineRun Execution Summary\n", - "==============================\n", - "PipelineRun Status: Finished\n", - "{'runId': '61cc0698-933d-4a1b-954d-d3c0045f6dbb', 'status': 'Completed', 'startTimeUtc': '2020-03-03T21:44:42.792356Z', 'endTimeUtc': '2020-03-03T21:48:00.994573Z', 'properties': {'azureml.runsource': 'azureml.PipelineRun', 'runSource': 'SDK', 'runType': 'SDK', 'azureml.parameters': '{}'}, 'inputDatasets': [], 'logFiles': {'logs/azureml/executionlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.61cc0698-933d-4a1b-954d-d3c0045f6dbb/logs/azureml/executionlogs.txt?sv=2019-02-02&sr=b&sig=0C79LU1qNR%2B30%2F6pNyZPlY%2BNpQWE7vxxKbu8%2F78ujj0%3D&st=2020-03-03T21%3A38%3A04Z&se=2020-03-04T05%3A48%3A04Z&sp=r', 'logs/azureml/stderrlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.61cc0698-933d-4a1b-954d-d3c0045f6dbb/logs/azureml/stderrlogs.txt?sv=2019-02-02&sr=b&sig=CuR0vlYXJ2UVmyNyfwAlHuANnWZoB0TaudFDRCpm%2FpU%3D&st=2020-03-03T21%3A38%3A04Z&se=2020-03-04T05%3A48%3A04Z&sp=r', 'logs/azureml/stdoutlogs.txt': 'https://mlopsohws3623368663.blob.core.windows.net/azureml/ExperimentRun/dcid.61cc0698-933d-4a1b-954d-d3c0045f6dbb/logs/azureml/stdoutlogs.txt?sv=2019-02-02&sr=b&sig=c%2BXdCoEVfhL%2Fj6uUfbJvoDzYSmsKDXJG0WpEPEJeeA8%3D&st=2020-03-03T21%3A38%3A04Z&se=2020-03-04T05%3A48%3A04Z&sp=r'}}\n", - "\n" - ] - }, - { - "data": { - "text/plain": [ - "'Finished'" - ] - }, - "execution_count": 28, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from azureml.core import Experiment\n", - "from azureml.pipeline.core import Pipeline\n", - "from azureml.widgets import RunDetails\n", - "\n", - "# Construct the pipeline\n", - "pipeline_steps = [train_step, register_step]\n", - "pipeline = Pipeline(workspace = ws, steps=pipeline_steps)\n", - "print(\"Pipeline is built.\")\n", - "\n", - "# Create an experiment and run the pipeline\n", - "experiment = Experiment(workspace = ws, name = 'diabetes-training-pipeline')\n", - "pipeline_run = experiment.submit(pipeline, regenerate_outputs=True)\n", - "print(\"Pipeline submitted for execution.\")\n", - "\n", - "RunDetails(pipeline_run).show()\n", - "pipeline_run.wait_for_completion()" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "diabetes_model version: 1\n", - "\t Training context : Pipeline\n", - "\n", - "\n" - ] - } - ], - "source": [ - "from azureml.core import Model\n", - "\n", - "for model in Model.list(ws):\n", - " print(model.name, 'version:', model.version)\n", - " for tag_name in model.tags:\n", - " tag = model.tags[tag_name]\n", - " print ('\\t',tag_name, ':', tag)\n", - " for prop_name in model.properties:\n", - " prop = model.properties[prop_name]\n", - " print ('\\t',prop_name, ':', prop)\n", - " print('\\n')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python (storedna)", - "language": "python", - "name": "storedna" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -}