Skip to content

Commit

Permalink
Update data.ipynb (#1918)
Browse files Browse the repository at this point in the history
* Update data.ipynb

* Update data.ipynb

* Update data.ipynb

* Update data.ipynb
  • Loading branch information
rastala committed Nov 30, 2022
1 parent 9876e60 commit 0a2a8be
Showing 1 changed file with 28 additions and 9 deletions.
37 changes: 28 additions & 9 deletions sdk/python/assets/data/data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,33 @@
"returned_job.studio_url"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Authenticate with user identity\r\n",
"\r\n",
"When running a job on a compute cluster, you can also use your user identity to access data. To enable job to access data on behald of you, specify **identity=UserIdentity()** in job definition, as shown below. For more details, see [Accessing storage services](https://learn.microsoft.com/azure/machine-learning/how-to-identity-based-service-authentication)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from azure.ai.ml import UserIdentity\r\n",
"\r\n",
"job = command(\r\n",
" code=\"./src\",\r\n",
" command=\"python read_data.py --input_data ${{inputs.input_data}}\",\r\n",
" inputs=my_job_inputs,\r\n",
" environment=\"AzureML-sklearn-1.0-ubuntu20.04-py38-cpu:1\",\r\n",
" compute=\"cpu-cluster\",\r\n",
" identity=UserIdentity() \r\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -345,16 +372,8 @@
"name": "python310-sdkv2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": ""
},
"vscode": {
"interpreter": {
Expand Down

0 comments on commit 0a2a8be

Please sign in to comment.