Skip to content

Commit 5e4dc90

Browse files
committed
incorporating feedback
1 parent 74955a8 commit 5e4dc90

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

articles/machine-learning/v1/how-to-use-private-python-packages.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.reviewer: laobri
99
ms.service: azure-machine-learning
1010
ms.subservice: core
1111
ms.topic: how-to
12-
ms.date: 07/09/2024
12+
ms.date: 06/10/2025
1313
ms.custom: UpdateFrequency5, sdkv1, devx-track-python
1414
---
1515

@@ -72,7 +72,7 @@ with token based authentication, such as private GitHub repositories.
7272
value = pat_token)
7373
```
7474

75-
3. Create an Azure Machine Learning environment and add Python packages from the feed.
75+
3. Create an Azure Machine Learning environment, add Python packages from the feed, and then register the workspace.
7676

7777
```python
7878
from azureml.core import Environment
@@ -81,8 +81,10 @@ with token based authentication, such as private GitHub repositories.
8181
env = Environment(name="my-env")
8282
cd = CondaDependencies()
8383
cd.add_pip_package("<my-package>")
84-
cd.set_pip_option("--extra-index-url https://pkgs.dev.azure.com/<MY-ORG>/_packaging/<MY-FEED>/pypi/simple")")
84+
cd.set_pip_option("--extra-index-url https://pkgs.dev.azure.com/<MY-ORG>/pythonfeed/_packaging/feed/pypi/simple")
8585
env.python.conda_dependencies=cd
86+
87+
env.register(ws)
8688
```
8789

8890
The environment is now ready to be used in training runs or web service endpoint deployments. When building the environment, Azure Machine Learning service uses the PAT to authenticate against the feed with the matching base URL.

0 commit comments

Comments
 (0)