From 3c0210269106298802cd6153e43f2895e7815946 Mon Sep 17 00:00:00 2001 From: amlrelsa-ms Date: Thu, 27 Aug 2020 23:28:05 +0000 Subject: [PATCH] update samples from Release-62 as a part of SDK release --- README.md | 2 +- how-to-use-azureml/README.md | 2 +- .../explain-model-on-amlcompute.ipynb | 8 ++++---- .../train-explain-model-locally-and-deploy.ipynb | 3 +-- ...train-explain-model-on-amlcompute-and-deploy.ipynb | 8 ++++---- .../intro-to-pipelines/README.md | 2 +- ...l-pipelines-use-databricks-as-compute-target.ipynb | 3 ++- .../tutorial-1st-experiment-sdk-train.ipynb | 11 +++-------- 8 files changed, 17 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index c85002c1..bc701a4b 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Visit following repos to see projects contributed by Azure ML users: - [UMass Amherst Student Samples](https://github.com/katiehouse3/microsoft-azure-ml-notebooks) - A number of end-to-end machine learning notebooks, including machine translation, image classification, and customer churn, created by students in the 696DS course at UMass Amherst. ## Data/Telemetry -This repository collects usage data and sends it to Microsoft to help improve our products and services. Read Microsoft's [privacy statement to learn more](https://privacy.microsoft.com/en-US/privacystatement) +This repository collects usage data and sends it to Mircosoft to help improve our products and services. Read Microsoft's [privacy statement to learn more](https://privacy.microsoft.com/en-US/privacystatement) To opt out of tracking, please go to the raw markdown or .ipynb files and remove the following line of code: diff --git a/how-to-use-azureml/README.md b/how-to-use-azureml/README.md index 0accac07..c9110933 100644 --- a/how-to-use-azureml/README.md +++ b/how-to-use-azureml/README.md @@ -4,7 +4,7 @@ Learn how to use Azure Machine Learning services for experimentation and model m As a pre-requisite, run the [configuration Notebook](../configuration.ipynb) notebook first to set up your Azure ML Workspace. Then, run the notebooks in following recommended order. -* [train-within-notebook](./training/train-within-notebook): Train a model while tracking run history, and learn how to deploy the model as web service to Azure Container Instance. +* [train-within-notebook](./training/train-within-notebook): Train a model hile tracking run history, and learn how to deploy the model as web service to Azure Container Instance. * [train-on-local](./training/train-on-local): Learn how to submit a run to local computer and use Azure ML managed run configuration. * [train-on-amlcompute](./training/train-on-amlcompute): Use a 1-n node Azure ML managed compute cluster for remote runs on Azure CPU or GPU infrastructure. * [train-on-remote-vm](./training/train-on-remote-vm): Use Data Science Virtual Machine as a target for remote runs. diff --git a/how-to-use-azureml/explain-model/azure-integration/remote-explanation/explain-model-on-amlcompute.ipynb b/how-to-use-azureml/explain-model/azure-integration/remote-explanation/explain-model-on-amlcompute.ipynb index 0ab5daed..54687a68 100644 --- a/how-to-use-azureml/explain-model/azure-integration/remote-explanation/explain-model-on-amlcompute.ipynb +++ b/how-to-use-azureml/explain-model/azure-integration/remote-explanation/explain-model-on-amlcompute.ipynb @@ -287,8 +287,8 @@ "# the submitted job is run in. Note the remote environment(s) needs to be similar to the local\n", "# environment, otherwise if a model is trained or deployed in a different environment this can\n", "# cause errors. Please take extra care when specifying your dependencies in a production environment.\n", - "run_config.environment.python.conda_dependencies = CondaDependencies.create(conda_packages=[sklearn_dep, pandas_dep],\n", - " pip_packages=azureml_pip_packages)\n", + "azureml_pip_packages.extend([sklearn_dep, pandas_dep])\n", + "run_config.environment.python.conda_dependencies = CondaDependencies.create(pip_packages=azureml_pip_packages)\n", "\n", "from azureml.core import Run\n", "from azureml.core import ScriptRunConfig\n", @@ -427,8 +427,8 @@ "# the submitted job is run in. Note the remote environment(s) needs to be similar to the local\n", "# environment, otherwise if a model is trained or deployed in a different environment this can\n", "# cause errors. Please take extra care when specifying your dependencies in a production environment.\n", - "run_config.environment.python.conda_dependencies = CondaDependencies.create(conda_packages=[sklearn_dep, pandas_dep],\n", - " pip_packages=azureml_pip_packages)\n", + "azureml_pip_packages.extend([sklearn_dep, pandas_dep])\n", + "run_config.environment.python.conda_dependencies = CondaDependencies.create(pip_packages=azureml_pip_packages)\n", "\n", "from azureml.core import Run\n", "from azureml.core import ScriptRunConfig\n", diff --git a/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-locally-and-deploy.ipynb b/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-locally-and-deploy.ipynb index 268a9332..a7556a72 100644 --- a/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-locally-and-deploy.ipynb +++ b/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-locally-and-deploy.ipynb @@ -350,8 +350,7 @@ "# the submitted job is run in. Note the remote environment(s) needs to be similar to the local\n", "# environment, otherwise if a model is trained or deployed in a different environment this can\n", "# cause errors. Please take extra care when specifying your dependencies in a production environment.\n", - "myenv = CondaDependencies.create(conda_packages=[sklearn_dep, pandas_dep],\n", - " pip_packages=['sklearn-pandas', 'pyyaml'] + azureml_pip_packages,\n", + "myenv = CondaDependencies.create(pip_packages=['sklearn-pandas', 'pyyaml', sklearn_dep, pandas_dep] + azureml_pip_packages,\n", " pin_sdk_version=False)\n", "\n", "with open(\"myenv.yml\",\"w\") as f:\n", diff --git a/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-on-amlcompute-and-deploy.ipynb b/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-on-amlcompute-and-deploy.ipynb index fc3fa084..cce857ab 100644 --- a/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-on-amlcompute-and-deploy.ipynb +++ b/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-on-amlcompute-and-deploy.ipynb @@ -294,8 +294,8 @@ "# the submitted job is run in. Note the remote environment(s) needs to be similar to the local\n", "# environment, otherwise if a model is trained or deployed in a different environment this can\n", "# cause errors. Please take extra care when specifying your dependencies in a production environment.\n", - "run_config.environment.python.conda_dependencies = CondaDependencies.create(conda_packages=[sklearn_dep, pandas_dep],\n", - " pip_packages=['sklearn_pandas', 'pyyaml'] + azureml_pip_packages,\n", + "azureml_pip_packages.extend(['sklearn-pandas', 'pyyaml', sklearn_dep, pandas_dep])\n", + "run_config.environment.python.conda_dependencies = CondaDependencies.create(pip_packages=azureml_pip_packages,\n", " pin_sdk_version=False)\n", "# Now submit a run on AmlCompute\n", "from azureml.core.script_run_config import ScriptRunConfig\n", @@ -459,8 +459,8 @@ "# the submitted job is run in. Note the remote environment(s) needs to be similar to the local\n", "# environment, otherwise if a model is trained or deployed in a different environment this can\n", "# cause errors. Please take extra care when specifying your dependencies in a production environment.\n", - "myenv = CondaDependencies.create(conda_packages=[sklearn_dep, pandas_dep],\n", - " pip_packages=['sklearn-pandas', 'pyyaml'] + azureml_pip_packages,\n", + "azureml_pip_packages.extend(['sklearn-pandas', 'pyyaml', sklearn_dep, pandas_dep])\n", + "myenv = CondaDependencies.create(pip_packages=azureml_pip_packages,\n", " pin_sdk_version=False)\n", "\n", "with open(\"myenv.yml\",\"w\") as f:\n", diff --git a/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/README.md b/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/README.md index a687d31c..c0fae5ac 100644 --- a/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/README.md +++ b/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/README.md @@ -17,7 +17,7 @@ These notebooks below are designed to go in sequence. 12. [aml-pipelines-setup-versioned-pipeline-endpoints.ipynb](https://aka.ms/pl-ver-endpoint): This notebook shows how you can setup PipelineEndpoint and submit a Pipeline using the PipelineEndpoint. 13. [aml-pipelines-showcasing-datapath-and-pipelineparameter.ipynb](https://aka.ms/pl-datapath): This notebook showcases how to use DataPath and PipelineParameter in AML Pipeline. 14. [aml-pipelines-how-to-use-pipeline-drafts.ipynb](http://aka.ms/pl-pl-draft): This notebook shows how to use Pipeline Drafts. Pipeline Drafts are mutable pipelines which can be used to submit runs and create Published Pipelines. -15. [aml-pipelines-how-to-use-modulestep.ipynb](https://aka.ms/pl-modulestep): This notebook shows how to define Module, ModuleVersion and how to use them in an AML Pipeline using ModuleStep. +15. [aml-pipelines-hot-to-use-modulestep.ipynb](https://aka.ms/pl-modulestep): This notebook shows how to define Module, ModuleVersion and how to use them in an AML Pipeline using ModuleStep. 16. [aml-pipelines-with-notebook-runner-step.ipynb](https://aka.ms/pl-nbrstep): This notebook shows how you can run another notebook as a step in Azure Machine Learning Pipeline. ![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/MachineLearningNotebooks/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/README.png) diff --git a/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/aml-pipelines-use-databricks-as-compute-target.ipynb b/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/aml-pipelines-use-databricks-as-compute-target.ipynb index 0df8bdd5..affaa213 100644 --- a/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/aml-pipelines-use-databricks-as-compute-target.ipynb +++ b/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/aml-pipelines-use-databricks-as-compute-target.ipynb @@ -164,6 +164,7 @@ " print('db_compute_name {}'.format(db_compute_name))\n", " print('db_resource_group {}'.format(db_resource_group))\n", " print('db_workspace_name {}'.format(db_workspace_name))\n", + " print('db_access_token {}'.format(db_access_token))\n", " \n", " config = DatabricksCompute.attach_configuration(\n", " resource_group = db_resource_group,\n", @@ -755,4 +756,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} +} \ No newline at end of file diff --git a/tutorials/create-first-ml-experiment/tutorial-1st-experiment-sdk-train.ipynb b/tutorials/create-first-ml-experiment/tutorial-1st-experiment-sdk-train.ipynb index 26691937..01da453c 100644 --- a/tutorials/create-first-ml-experiment/tutorial-1st-experiment-sdk-train.ipynb +++ b/tutorials/create-first-ml-experiment/tutorial-1st-experiment-sdk-train.ipynb @@ -57,13 +57,8 @@ "source": [ "Import the `Workspace` class, and load your subscription information from the file `config.json` using the function `from_config().` This looks for the JSON file in the current directory by default, but you can also specify a path parameter to point to the file using `from_config(path=\"your/file/path\")`. If you are running this notebook in a cloud notebook server in your workspace, the file is automatically in the root directory.\n", "\n", - "If the following code asks for additional authentication, simply paste the link in a browser and enter the authentication token. In addition, if you have more than one tenant linked to your user, you will need to add the following lines:\n", - "```\n", - "from azureml.core.authentication import InteractiveLoginAuthentication\n", - "interactive_auth = InteractiveLoginAuthentication(tenant_id=\"your-tenant-id\")\n", - "Additional details on authentication can be found here: https://aka.ms/aml-notebook-auth \n", - "```\n" - ] + "If the following code asks for additional authentication, simply paste the link in a browser and enter the authentication token." + ] }, { "cell_type": "code", @@ -391,4 +386,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} +} \ No newline at end of file