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/machine-learning/how-to-access-data-interactive.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ path_on_datastore = '<path>'
68
68
uri = f'azureml://subscriptions/{subscription}/resourcegroups/{resource_group}/workspaces/{workspace}/datastores/{datastore_name}/paths/{path_on_datastore}'.
69
69
```
70
70
71
-
These Datastore URIs are a known implementation of the [Filesystem spec](https://filesystem-spec.readthedocs.io/en/latest/index.html) (`fsspec`): a unified pythonic interface to local, remote, and embedded file systems and bytes storage. First, pip install the `azureml-fsspec` package and its dependency `azureml-dataprep` package. Then, you can use the Azure Machine Learning Datastore `fsspec` implementation.
71
+
These Datastore URIs are a known implementation of the [Filesystem spec](https://filesystem-spec.readthedocs.io/en/latest/index.html) (`fsspec`): a unified pythonic interface to local, remote, and embedded file systems and bytes storage. First, use pip to install the `azureml-fsspec` package and its dependency `azureml-dataprep` package. Then, you can use the Azure Machine Learning Datastore `fsspec` implementation.
72
72
73
73
The Azure Machine Learning Datastore `fsspec` implementation automatically handles the credential/identity passthrough that the Azure Machine Learning datastore uses. You can avoid both account key exposure in your scripts, and extra sign-in procedures, on a compute instance.
74
74
@@ -86,7 +86,7 @@ df.head()
86
86
> 1. Select **Data** from the left-hand menu, then select the **Datastores** tab.
87
87
> 1. Select your datastore name, and then **Browse**.
88
88
> 1. Find the file/folder you want to read into Pandas, and select the ellipsis (**...**) next to it. Select **Copy URI** from the menu. You can select the **Datastore URI** to copy into your notebook/script.
89
-
> :::image type="content" source="media/how-to-access-data-ci/datastore_uri_copy.png" alt-text="Screenshot highlighting the copy of the datastore URI.":::
89
+
> :::image type="content" source="media/how-to-access-data-interactive/datastore-uri-copy.png" alt-text="Screenshot highlighting the copy of the datastore URI.":::
90
90
91
91
You can also instantiate an Azure Machine Learning filesystem, to handle filesystem-like commands - for example `ls`, `glob`, `exists`, `open`.
92
92
- The `ls()` method lists files in a specific directory. You can use ls(), ls(.), ls (<<folder_level_1>/<folder_level_2>) to list files. We support both '.' and '..', in relative paths.
@@ -197,7 +197,7 @@ df.head()
197
197
#### Read a folder of parquet files into Pandas
198
198
As part of an ETL process, Parquet files are typically written to a folder, which can then emit files relevant to the ETL such as progress, commits, etc. This example shows files created from an ETL process (files beginning with`_`) which then produce a parquet file of data.
199
199
200
-
:::image type="content"source="media/how-to-access-data-ci/parquet-auxillary.png" alt-text="Screenshot showing the parquet ETL process.":::
200
+
:::image type="content"source="media/how-to-access-data-interactive/parquet-auxillary.png" alt-text="Screenshot showing the parquet ETL process.":::
201
201
202
202
In these scenarios, you only read the parquet files in the folder, and ignore the ETL process files. This code sample shows how glob patterns can read only parquet files in a folder:
203
203
@@ -491,7 +491,7 @@ df.head()
491
491
>1. Select **Data**from the left-hand menu, then select the **Datastores** tab.
492
492
>1. Select your datastore name, and then **Browse**.
493
493
>1. Find the file/folder you want to read into Pandas, and select the ellipsis (**...**) next to it. Select **Copy URI**from the menu. You can select the **Datastore URI** to copy into your notebook/script.
494
-
> :::image type="content"source="media/how-to-access-data-ci/datastore_uri_copy.png" alt-text="Screenshot highlighting the copy of the datastore URI.":::
494
+
> :::image type="content"source="media/how-to-access-data-interactive/datastore-uri-copy.png" alt-text="Screenshot highlighting the copy of the datastore URI.":::
495
495
496
496
##### [HTTP Server](#tab/http)
497
497
```python
@@ -564,7 +564,7 @@ df.head()
564
564
>1. Select **Data**from the left-hand menu, then select the **Datastores** tab.
565
565
>1. Select your datastore name, and then **Browse**.
566
566
>1. Find the file/folder you want to read into Pandas, and select the ellipsis (**...**) next to it. Select **Copy URI**from the menu. You can select the **Datastore URI** to copy into your notebook/script.
567
-
> :::image type="content"source="media/how-to-access-data-ci/datastore_uri_copy.png" alt-text="Screenshot highlighting the copy of the datastore URI.":::
567
+
> :::image type="content"source="media/how-to-access-data-interactive/datastore-uri-copy.png" alt-text="Screenshot highlighting the copy of the datastore URI.":::
This article shows how to use R on a compute instance in Azure Machine Learning studio, that runs an R kernel in a Jupyter notebook.
19
+
This article shows how to use R in Azure Machine Learning studio on a compute instance that runs an R kernel in a Jupyter notebook.
20
20
21
-
The popular RStudio IDE also works. You can install RStudio or Posit Workbench in a custom container on a compute instance. However, this has limitations in reading and writing to your Azure Machine Learning workspace.
21
+
The popular RStudio IDE also works. You can install RStudio or Posit Workbench in a custom container on a compute instance. However, this has limitations in reading and writing to your Azure Machine Learning workspace.
22
22
23
23
> [!IMPORTANT]
24
-
> The code shown in this article works on an Azure Machine Learning compute instance. The compute instance has an environment and configuration file necessary for the code to run successfully.
24
+
> The code shown in this article works on an Azure Machine Learning compute instance. The compute instance has an environment and configuration file necessary for the code to run successfully.
25
25
26
26
## Prerequisites
27
27
28
28
- If you don't have an Azure subscription, create a free account before you begin. Try the [free or paid version of Azure Machine Learning](https://azure.microsoft.com/free/) today
29
29
- An [Azure Machine Learning workspace and a compute instance](quickstart-create-resources.md)
30
-
- A basic understand of using Jupyter notebooks in Azure Machine Learning studio. See [Model development on a cloud workstation](tutorial-cloud-workstation.md) for more information.
30
+
- A basic understand of using Jupyter notebooks in Azure Machine Learning studio. Visit the [Model development on a cloud workstation](tutorial-cloud-workstation.md) resource for more information.
31
31
32
32
## Run R in a notebook in studio
33
33
34
-
You'll use a notebook in your Azure Machine Learning workspace, on a compute instance.
34
+
You'll use a notebook in your Azure Machine Learning workspace, on a compute instance.
35
35
36
36
1. Sign in to [Azure Machine Learning studio](https://ml.azure.com)
37
37
1. Open your workspace if it isn't already open
@@ -42,7 +42,7 @@ You'll use a notebook in your Azure Machine Learning workspace, on a compute ins
42
42
> If you're not sure how to create and work with notebooks in studio, review [Run Jupyter notebooks in your workspace](how-to-run-jupyter-notebooks.md)
43
43
44
44
1. Select the notebook.
45
-
1. On the notebook toolbar, make sure your compute instance is running. If not, start it now.
45
+
1. On the notebook toolbar, make sure your compute instance is running. If not, start it now.
46
46
1. On the notebook toolbar, switch the kernel to **R**.
47
47
48
48
:::image type="content" source="media/how-to-r-interactive-development/r-kernel.png" alt-text="Screenshot: Switch the notebook kernel to use R." lightbox="media/how-to-r-interactive-development/r-kernel.png":::
@@ -57,7 +57,7 @@ This section describes how to use Python and the `reticulate` package to load yo
57
57
58
58
To install these packages:
59
59
60
-
1. Create a new file on the compute instance, called **setup.sh**.
60
+
1. Create a new file on the compute instance, called **setup.sh**.
>:::imagetype="content"source="media/how-to-access-data-ci/datastore_uri_copy.png"alt-text="Screenshot highlighting the copy of the datastore URI.":::
131
+
>:::imagetype="content"source="media/how-to-r-interactive-development/datastore-uri-copy.png"alt-text="Screenshot highlighting the copy of the datastore URI.":::
@@ -173,7 +173,7 @@ Add `/home/azureuser` to the R library path.
173
173
```
174
174
175
175
> [!TIP]
176
-
> You must update the `.libPaths` in each interactive R script to access user installed libraries. Add this code to the top of each interactive R script or notebook.
176
+
> You must update the `.libPaths` in each interactive R script to access user installed libraries. Add this code to the top of each interactive R script or notebook.
177
177
178
178
Once the libPath is updated, load libraries as usual.
0 commit comments