Skip to content

Commit 49cdde0

Browse files
Merge pull request #241 from J-Silvestre/patch-6
Update how-to-connection.md
2 parents 44794fd + 4912f88 commit 49cdde0

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

articles/machine-learning/how-to-connection.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -596,16 +596,16 @@ az ml connection create --file connection.yaml
596596

597597
# [Python SDK](#tab/python)
598598

599-
The following example creates an Azure Container Registry connection. A managed identity authenticates this connection:
599+
The following example creates an Azure Container Registry connection:
600600

601601
```python
602602
from azure.ai.ml.entities import WorkspaceConnection
603603
from azure.ai.ml.entities import UsernamePasswordConfiguration
604604

605605
# If using username/password, the name/password values should be url-encoded
606606
import urllib.parse
607-
username = urllib.parse.quote(os.environ["REGISTRY_USERNAME"], safe="")
608-
password = urllib.parse.quote(os.environ["REGISTRY_PASSWORD"], safe="")
607+
username = os.environ["REGISTRY_USERNAME"]
608+
password = os.environ["REGISTRY_PASSWORD"]
609609

610610
name = "my_acr_conn"
611611

@@ -717,7 +717,7 @@ az ml environment show --name my-env --version 1 --resource-group my-resource-gr
717717

718718
# [Python SDK](#tab/python)
719719

720-
The following example creates an Azure Container Registry connection. A managed identity authenticates this connection:
720+
The following example creates a Generic Container Registry connection:
721721

722722
```python
723723
import os
@@ -729,10 +729,8 @@ from azure.ai.ml.entities import UsernamePasswordConfiguration
729729
from azureml.core.conda_dependencies import CondaDependencies
730730
from azure.ai.ml import command
731731

732-
# If using username/password, the name/password values should be url-encoded
733-
import urllib.parse
734-
username = urllib.parse.quote(os.environ["REGISTRY_USERNAME"], safe="")
735-
password = urllib.parse.quote(os.environ["REGISTRY_PASSWORD"], safe="")
732+
username = os.environ["REGISTRY_USERNAME"]
733+
password = os.environ["REGISTRY_PASSWORD"]
736734

737735
# Enter details of AML workspace
738736
subscription_id = "<SUBSCRIPTION_ID>"

0 commit comments

Comments
 (0)