Skip to content

Commit b0bba58

Browse files
authored
Update how-to-use-mlflow-cli-runs.md
1 parent c831807 commit b0bba58

File tree

1 file changed

+34
-36
lines changed

1 file changed

+34
-36
lines changed

articles/machine-learning/how-to-use-mlflow-cli-runs.md

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -106,61 +106,59 @@ Use MLflow SDK to track any metric, parameter, artifacts, or models. For detaile
106106

107107
Use the parameter `display_name` of Azure Machine Learning jobs to configure the name of the run. The following example shows how:
108108

109-
# [Azure CLI](#tab/cli)
109+
# [Azure CLI](#tab/cli)
110110

111-
To submit the job, create a YAML file with your job definition in a `job.yml` file. This file should be created outside the `src` directory.
111+
To submit the job, create a YAML file with your job definition in a `job.yml` file. This file should be created outside the `src` directory.
112112

113-
:::code language="yaml" source="~/azureml-examples-main/cli/jobs/basics/hello-world-org.yml" highlight="8" range="1-9":::
113+
:::code language="yaml" source="~/azureml-examples-main/cli/jobs/basics/hello-world-org.yml" highlight="8" range="1-9":::
114114

115-
# [Python](#tab/python)
115+
# [Python](#tab/python)
116116

117-
```python
118-
from azure.ai.ml import command, Environment
119-
120-
command_job = command(
121-
code="src",
122-
command="echo "hello world",
123-
environment=Environment(image="library/python:latest"),
124-
compute="cpu-cluster",
125-
display_name="hello-world-example"
126-
)
127-
```
117+
```python
118+
from azure.ai.ml import command, Environment
128119

129-
---
120+
command_job = command(
121+
code="src",
122+
command="echo "hello world",
123+
environment=Environment(image="library/python:latest"),
124+
compute="cpu-cluster",
125+
display_name="hello-world-example"
126+
)
127+
```
130128

131129
---
132130

133131
### Submitting the job
134132

135133
1. First, let's connect to Azure Machine Learning workspace where we are going to work on.
136134

137-
# [Azure CLI](#tab/cli)
135+
# [Azure CLI](#tab/cli)
138136

139-
```azurecli
140-
az account set --subscription <subscription>
141-
az configure --defaults workspace=<workspace> group=<resource-group> location=<location>
142-
```
137+
```azurecli
138+
az account set --subscription <subscription>
139+
az configure --defaults workspace=<workspace> group=<resource-group> location=<location>
140+
```
143141
144-
# [Python SDK](#tab/sdk)
142+
# [Python SDK](#tab/sdk)
145143
146-
The workspace is the top-level resource for Azure Machine Learning, providing a centralized place to work with all the artifacts you create when you use Azure Machine Learning. In this section, we'll connect to the workspace in which you'll perform deployment tasks.
144+
The workspace is the top-level resource for Azure Machine Learning, providing a centralized place to work with all the artifacts you create when you use Azure Machine Learning. In this section, we'll connect to the workspace in which you'll perform deployment tasks.
147145
148-
1. Import the required libraries:
146+
1. Import the required libraries:
149147
150-
```python
151-
from azure.ai.ml import MLClient
152-
from azure.identity import DefaultAzureCredential
153-
```
148+
```python
149+
from azure.ai.ml import MLClient
150+
from azure.identity import DefaultAzureCredential
151+
```
154152
155-
2. Configure workspace details and get a handle to the workspace:
153+
2. Configure workspace details and get a handle to the workspace:
156154
157-
```python
158-
subscription_id = "<subscription>"
159-
resource_group = "<resource-group>"
160-
workspace = "<workspace>"
161-
162-
ml_client = MLClient(DefaultAzureCredential(), subscription_id, resource_group, workspace)
163-
```
155+
```python
156+
subscription_id = "<subscription>"
157+
resource_group = "<resource-group>"
158+
workspace = "<workspace>"
159+
160+
ml_client = MLClient(DefaultAzureCredential(), subscription_id, resource_group, workspace)
161+
```
164162
165163
1. Submit the job
166164

0 commit comments

Comments
 (0)