You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/lab-services/class-type-jupyter-notebook.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ physical_device_desc: "device: 0, name: NVIDIA Tesla K80, pci bus id: 0001:00:00
109
109
110
110
### Provide notebooks for the class
111
111
112
-
The next task is to provide students with notebooks that you want them to use. Notebooks can be saved locally on the template VM so each student has their own copy. If you want to use sample notebooks from Azure Machine Learning, see [how to configure an environment with Jupyter Notebooks](../machine-learning/how-to-configure-environment.md#jupyter).
112
+
The next task is to provide students with notebooks that you want them to use. Notebooks can be saved locally on the template VM so each student has their own copy. If you want to use sample notebooks from Azure Machine Learning, see [how to configure an environment with Jupyter Notebooks](../machine-learning/how-to-configure-environment.md#jupyter-notebooks).
# Set up a Python development environment for Azure Machine Learning
@@ -21,22 +21,22 @@ The following table shows each development environment covered in this article,
21
21
22
22
| Environment | Pros | Cons |
23
23
| --- | --- | --- |
24
-
|[Local environment](#local)| Full control of your development environment and dependencies. Run with any build tool, environment, or IDE of your choice. | Takes longer to get started. Necessary SDK packages must be installed, and an environment must also be installed if you don't already have one. |
25
-
|[The Data Science Virtual Machine (DSVM)](#dsvm)| Similar to the cloud-based compute instance (Python and the SDK are pre-installed), but with additional popular data science and machine learning tools pre-installed. Easy to scale and combine with other custom tools and workflows. | A slower getting started experience compared to the cloud-based compute instance. |
26
-
|[Azure Machine Learning compute instance](#compute-instance)| Easiest way to get started. The entire SDK is already installed in your workspace VM, and notebook tutorials are pre-cloned and ready to run. | Lack of control over your development environment and dependencies. Additional cost incurred for Linux VM (VM can be stopped when not in use to avoid charges). See [pricing details](https://azure.microsoft.com/pricing/details/virtual-machines/linux/). |
24
+
|[Local environment](#local-computer-or-remote-vm-environment)| Full control of your development environment and dependencies. Run with any build tool, environment, or IDE of your choice. | Takes longer to get started. Necessary SDK packages must be installed, and an environment must also be installed if you don't already have one. |
25
+
|[The Data Science Virtual Machine (DSVM)](#data-science-virtual-machine)| Similar to the cloud-based compute instance (Python is pre-installed), but with additional popular data science and machine learning tools pre-installed. Easy to scale and combine with other custom tools and workflows. | A slower getting started experience compared to the cloud-based compute instance. |
26
+
|[Azure Machine Learning compute instance](#azure-machine-learning-compute-instance)| Easiest way to get started. The SDK is already installed in your workspace VM, and notebook tutorials are pre-cloned and ready to run. | Lack of control over your development environment and dependencies. Additional cost incurred for Linux VM (VM can be stopped when not in use to avoid charges). See [pricing details](https://azure.microsoft.com/pricing/details/virtual-machines/linux/). |
27
27
|[Azure Databricks](how-to-configure-databricks-automl-environment.md)| Ideal for running large-scale intensive machine learning workflows on the scalable Apache Spark platform. | Overkill for experimental machine learning, or smaller-scale experiments and workflows. Additional cost incurred for Azure Databricks. See [pricing details](https://azure.microsoft.com/pricing/details/databricks/). |
28
28
29
29
This article also provides additional usage tips for the following tools:
30
30
31
31
* Jupyter Notebooks: If you're already using Jupyter Notebooks, the SDK has some extras that you should install.
32
32
33
-
* Visual Studio Code: If you use Visual Studio Code, the [Azure Machine Learning extension](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.vscode-ai) includes extensive language support for Python as well as features to make working with the Azure Machine Learning much more convenient and productive.
33
+
* Visual Studio Code: If you use Visual Studio Code, the [Azure Machine Learning extension](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.vscode-ai) includes language support for Python, and features to make working with the Azure Machine Learning much more convenient and productive.
34
34
35
35
## Prerequisites
36
36
37
37
* Azure Machine Learning workspace. If you don't have one, you can create an Azure Machine Learning workspace through the [Azure portal](how-to-manage-workspace.md), [Azure CLI](how-to-manage-workspace-cli.md#create-a-workspace), and [Azure Resource Manager templates](how-to-create-workspace-template.md).
38
38
39
-
### <aid="workspace"></a> Local and DSVM only: Create a workspace configuration file
39
+
### Local and DSVM only: Create a workspace configuration file
40
40
41
41
The workspace configuration file is a JSON file that tells the SDK how to communicate with your Azure Machine Learning workspace. The file is named *config.json*, and it has the following format:
42
42
@@ -48,9 +48,9 @@ The workspace configuration file is a JSON file that tells the SDK how to commun
48
48
}
49
49
```
50
50
51
-
This JSON file must be in the directory structure that contains your Python scripts or Jupyter Notebooks. It can be in the same directory, a subdirectory named*.azureml*, or in a parent directory.
51
+
This JSON file must be in the directory structure that contains your Python scripts or Jupyter Notebooks. It can be in the same directory, a subdirectory named.azureml*, or in a parent directory.
52
52
53
-
To use this file from your code, use the [`Workspace.from_config`](/python/api/azureml-core/azureml.core.workspace.workspace#from-config-path-none--auth-none---logger-none---file-name-none-) method. This code loads the information from the file and connects to your workspace.
53
+
To use this file from your code, use the [`MLClient.from_config`](/python/api/azure-ai-ml/azure.ai.ml.mlclient#azure-ai-ml-mlclient-from-config) method. This code loads the information from the file and connects to your workspace.
54
54
55
55
Create a workspace configuration file in one of the following methods:
56
56
@@ -62,26 +62,25 @@ Create a workspace configuration file in one of the following methods:
62
62
63
63
* Azure Machine Learning Python SDK
64
64
65
-
Create a script to connect to your Azure Machine Learning workspace and use the [`write_config`](/python/api/azureml-core/azureml.core.workspace.workspace#write-config-path-none--file-name-none-) method to generate your file and save it as *.azureml/config.json*. Make sure to replace `subscription_id`,`resource_group`, and `workspace_name` with your own.
65
+
Create a script to connect to your Azure Machine Learning workspace. Make sure to replace `subscription_id`,`resource_group`, and `workspace_name` with your own.
## <a id="local"></a>Local computer or remote VM environment
83
+
## Local computer or remote VM environment
85
84
86
85
You can set up an environment on a local computer or remote virtual machine, such as an Azure Machine Learning compute instance or Data Science VM.
87
86
@@ -96,12 +95,12 @@ To configure a local development environment or remote VM:
96
95
> If you're on Linux or macOS and use a shell other than bash (for example, zsh) you might receive errors when you run some commands. To work around this problem, use the `bash` command to start a new bash shell and run the commands there.
97
96
98
97
1. Activate your newly created Python virtual environment.
99
-
1. Install the [Azure Machine Learning Python SDK](/python/api/overview/azure/ml/install).
100
-
1. To configure your local environment to use your Azure Machine Learning workspace, [create a workspace configuration file](#workspace) or use an existing one.
98
+
1. Install the [Azure Machine Learning Python SDK](/python/api/overview/azure/ai-ml-readme).
99
+
1. To configure your local environment to use your Azure Machine Learning workspace, [create a workspace configuration file](#local-and-dsvm-only-create-a-workspace-configuration-file) or use an existing one.
101
100
102
101
Now that you have your local environment set up, you're ready to start working with Azure Machine Learning. See the [Azure Machine Learning Python getting started guide](tutorial-1st-experiment-hello-world.md) to get started.
103
102
104
-
### <a id="jupyter"></a>Jupyter Notebooks
103
+
### Jupyter Notebooks
105
104
106
105
When running a local Jupyter Notebook server, it's recommended that you create an IPython kernel for your Python virtual environment. This helps ensure the expected kernel and package import behavior.
107
106
@@ -119,10 +118,10 @@ When running a local Jupyter Notebook server, it's recommended that you create a
119
118
120
119
1. Launch the Jupyter Notebook server
121
120
122
-
See the [Azure Machine Learning notebooks repository](https://github.com/Azure/MachineLearningNotebooks) to get started with Azure Machine Learning and Jupyter Notebooks.
123
-
Also see the community-driven repository, [AzureML-Examples](https://github.com/Azure/azureml-examples).
121
+
> [!TIP]
122
+
For example notebooks, see the [AzureML-Examples](https://github.com/Azure/azureml-examples) repository. SDK examples are located under [/sdk/python](https://github.com/Azure/azureml-examples/tree/main/sdk/python). For example, the [Configuration notebook](https://github.com/Azure/azureml-examples/blob/main/sdk/python/jobs/configuration.ipynb) example.
124
123
125
-
### <a id="vscode"></a>Visual Studio Code
124
+
### Visual Studio Code
126
125
127
126
To use Visual Studio Code for development:
128
127
@@ -136,11 +135,11 @@ Once you have the Visual Studio Code extension installed, use it to:
136
135
* [Run and debug experiments](how-to-debug-visual-studio-code.md)
The Azure Machine Learning [compute instance](concept-compute-instance.md) is a secure, cloud-based Azure workstation that provides data scientists with a Jupyter Notebook server, JupyterLab, and a fully managed machine learning environment.
142
141
143
-
Thereis nothing to install or configure for a compute instance.
142
+
There's nothing to install or configure for a compute instance.
144
143
145
144
Create one anytime from within your Azure Machine Learning workspace. Provide just a name and specify an Azure VMtype. Try it now with this [Tutorial: Setup environment and workspace](quickstart-create-resources.md).
146
145
@@ -153,7 +152,7 @@ In addition to a Jupyter Notebook server and JupyterLab, you can use compute ins
153
152
154
153
You can also use the Azure Machine Learning Visual Studio Code extension to [connect to a remote compute instance using VS Code](how-to-set-up-vs-code-remote.md).
155
154
156
-
## <a id="dsvm"></a>Data Science Virtual Machine
155
+
## Data Science Virtual Machine
157
156
158
157
The Data Science VMis a customized virtual machine (VM) image you can use as a development environment. It's designed for data science work that's pre-configured tools and software like:
159
158
@@ -193,28 +192,28 @@ To use the Data Science VM as a development environment:
193
192
az vm create --resource-group YOUR-RESOURCE-GROUP-NAME--name YOUR-VM-NAME--image microsoft-dsvm:dsvm-windows:server-2016:latest --admin-username YOUR-USERNAME--admin-password YOUR-PASSWORD--authentication-type password
194
193
```
195
194
196
-
1. Activate the conda environment containing the Azure Machine Learning SDK.
195
+
1. Create a conda environment for the Azure Machine Learning SDK:
197
196
198
-
* For Ubuntu Data Science VM:
199
-
200
-
```bash
201
-
conda activate py36
202
-
```
203
-
204
-
* For Windows Data Science VM:
197
+
```bash
198
+
conda create -n py310 python=310
199
+
```
205
200
206
-
```bash
207
-
conda activate AzureML
208
-
```
201
+
1. Once the environment has been created, activate it and install the SDK
209
202
210
-
1. To configure the Data Science VM to use your Azure Machine Learning workspace, [create a workspace configuration file](#workspace) or use an existing one.
203
+
```bash
204
+
conda activate py310
205
+
pip install azure-ai-ml
206
+
```
211
207
212
-
Similar to local environments, you can use Visual Studio Code and the [Azure Machine Learning Visual Studio Code extension](#vscode) to interact with Azure Machine Learning.
208
+
1. To configure the Data Science VM to use your Azure Machine Learning workspace, [create a workspace configuration file](#local-and-dsvm-only-create-a-workspace-configuration-file) or use an existing one.
213
209
214
-
For more information, see [Data Science Virtual Machines](https://azure.microsoft.com/services/virtual-machines/data-science-virtual-machines/).
210
+
> [!TIP]
211
+
> Similar to local environments, you can use Visual Studio Code and the [Azure Machine Learning Visual Studio Code extension](#visual-studio-code) to interact with Azure Machine Learning.
212
+
>
213
+
> For more information, see [Data Science Virtual Machines](https://azure.microsoft.com/services/virtual-machines/data-science-virtual-machines/).
215
214
216
215
217
216
## Next steps
218
217
219
218
- [Train and deploy a model](tutorial-train-deploy-notebook.md) on Azure Machine Learning with the MNIST dataset.
220
-
- See the [Azure Machine Learning SDKfor Python reference](/python/api/overview/azure/ml/intro).
219
+
- See the [Azure Machine Learning SDKfor Python reference](https://aka.ms/sdk-v2-install).
> This code snippet expects the workspace configuration json file to be saved in the current directory or its parent. For more information on creating a workspace, see [Create workspace resources](quickstart-create-resources.md). For more information on saving the configuration to file, see [Create a workspace configuration file](how-to-configure-environment.md#workspace).
273
+
> This code snippet expects the workspace configuration json file to be saved in the current directory or its parent. For more information on creating a workspace, see [Create workspace resources](quickstart-create-resources.md). For more information on saving the configuration to file, see [Create a workspace configuration file](how-to-configure-environment.md#local-and-dsvm-only-create-a-workspace-configuration-file).
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-deploy-model-cognitive-search.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ An Azure Machine Learning workspace provides a centralized place to work with al
55
55
To connect to an existing workspace, use the following code:
56
56
57
57
> [!IMPORTANT]
58
-
> This code snippet expects the workspace configuration to be saved in the current directory or its parent. For more information, see [Create and manage Azure Machine Learning workspaces](how-to-manage-workspace.md). For more information on saving the configuration to file, see [Create a workspace configuration file](how-to-configure-environment.md#workspace).
58
+
> This code snippet expects the workspace configuration to be saved in the current directory or its parent. For more information, see [Create and manage Azure Machine Learning workspaces](how-to-manage-workspace.md). For more information on saving the configuration to file, see [Create a workspace configuration file](v1/how-to-configure-environment-v1.md).
0 commit comments