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
Azure Machine Learning provides a shared file system for all users in a workspace. The best way to clone a Git repository into this file share is to create a compute instance and [open a terminal](./how-to-access-terminal.md). In the terminal, you have access to a full Git client and can clone and work with Git by using the Git CLI. For more information about the Git CLI, see [Git CLI](https://git-scm.com/docs/gitcli).
31
+
Azure Machine Learning provides a shared file system for all users in a workspace. The best way to clone a Git repository into this file share is to create a compute instance and [open a terminal](./how-to-access-terminal.md). In the terminal, you have access to a full Git client and can clone and work with Git by using the Git CLI. For more information, see [Git CLI](https://git-scm.com/docs/gitcli).
32
32
33
-
You can clone any Git repository you can authenticate to, such as GitHub, Azure Repos, or BitBucket repos. It's best to clone the repository into your user directory, so that other users don't collide directly on your working branch.
33
+
You can clone any Git repository you can authenticate to, such as a GitHub, Azure Repos, or BitBucket repo. It's best to clone the repository into your user directory, so that other users don't collide directly on your working branch.
34
34
35
-
There are some differences between cloning to the local file system of the compute instance or cloning to the shared file system, mounted as the *~/cloudfiles/code/* directory. In general, cloning to the local file system provides better performance than cloning to the mounted file system. However, if you delete and recreate the compute instance, the local file system is lost, while the mounted shared file system remains.
35
+
There are some differences between cloning to the local file system of the compute instance or cloning to the shared file system, mounted as the *~/cloudfiles/code/* directory. In general, cloning to the local file system provides better performance than cloning to the mounted file system. However, if you delete and recreate the compute instance, the local file system is lost, while the mounted shared file system is kept.
36
36
37
37
## Clone a Git repository with SSH
38
38
39
-
You can clone a repo by using Secure Shell (SSH) protocol. The following sections describe how to clone a repo by using SSH. To use SSH, you need to authenticate your Git account with SSH by using an SSH key.
39
+
You can clone a repo by using Secure Shell (SSH) protocol. To use SSH, you need to authenticate your Git account with SSH by using an SSH key.
40
40
41
41
### Generate and save a new SSH key
42
42
43
-
In the Azure Machine Learning studio **Notebook** page, open a terminal window and run the following command, substituting your email address.
43
+
To generate a new SSH key, go to the Azure Machine Learning studio **Notebook** page, open a terminal, and run the following command, substituting your email address.
1.SSH might display the server's SSH fingerprint and ask you to verify it, as in the following example.
100
+
SSH might display the server's SSH fingerprint and ask you to verify it, as in the following example.
103
101
104
-
```bash
105
-
The authenticity of host 'github.com (000.00.000.0)' can't be established.
106
-
ECDSA key fingerprint is SHA256:0000000000000000000/00000000/00000000.
107
-
Are you sure you want to continue connecting (yes/no/[fingerprint])?
108
-
```
102
+
```bash
103
+
The authenticity of host 'github.com (000.00.000.0)' can't be established.
104
+
ECDSA key fingerprint is SHA256:0000000000000000000/00000000/00000000.
105
+
Are you sure you want to continue connecting (yes/no/[fingerprint])?
106
+
```
109
107
110
-
SSH displays this fingerprint when it connects to an unknown host to protect you from [man-in-the-middle attacks](/previous-versions/windows/it-pro/windows-2000-server/cc959354(v=technet.10)#man-in-the-middle-attack). You should verify that the displayed fingerprint matches one of the fingerprints in the SSH public keys page, and then respond *yes*.
108
+
SSH displays this fingerprint when it connects to an unknown host to protect you from [man-in-the-middle attacks](/previous-versions/windows/it-pro/windows-2000-server/cc959354(v=technet.10)#man-in-the-middle-attack). You should verify that the fingerprint matches one of the fingerprints in the SSH public keys page. Once you accept the host's fingerprint, SSH doesn't prompt you again unless the fingerprint changes.
111
109
112
-
1. SSH displays a response like the following example:
110
+
SSH displays a response like the following example:
113
111
114
112
```bash
115
-
Warning: Permanently added 'github.com,000.00.000.0' (ECDSA) to the list of known hosts.
116
-
Enter passphrase for key '/home/azureuser/.ssh/id_ed25519':
113
+
Cloning into 'azureml-example'...
114
+
Warning: Permanently added 'github.com,000.00.000.0' (ECDSA) to the list of known hosts.
115
+
Enter passphrase for key '/home/azureuser/.ssh/id_ed25519':
117
116
```
118
-
1. Enter your passphrase. Git clones the repo and sets up the origin remote to connect with SSH for future Git commands. Once you accept the host's fingerprint, SSH doesn't prompt you again unless the fingerprint changes.
117
+
After you enter your passphrase, Git clones the repo and sets up the origin remote to connect with SSH for future Git commands.
119
118
120
119
## Track code that comes from Git repositories
121
120
122
-
When you submit a training job from the Python SDK or Machine Learning CLI, the files needed to train the model are uploaded to your workspace. If the `git` command is available on your development environment, the upload process checks if the source files are stored in a Git repository, and if so, uploads any Git repository information as part of the training job.
121
+
When you submit a training job from the Python SDK or Machine Learning CLI, the files needed to train the model are uploaded to your workspace. If the `git` command is available on your development environment, the upload process checks if the source files are stored in a Git repository.
123
122
124
-
The following information is sent for jobs that use an estimator, machine learning pipeline, or script run. The information is stored in the following training job properties:
123
+
If so, the process uploads Git repository, branch, and current commit information as part of the training job. The information is stored in the following training job properties for jobs that use an estimator, machine learning pipeline, or script run.
125
124
126
125
| Property | Git command used to get the value | Description |
127
126
| ----- | ----- | ----- |
@@ -137,20 +136,7 @@ If the `git` command isn't available on your development environment, or your tr
137
136
138
137
## View Git information
139
138
140
-
The Git information is stored in the properties for a training job. You can view this information by using the Azure portal, Python SDK, or Azure CLI.
141
-
142
-
### Azure portal
143
-
144
-
In your Azure Machine Learning workspace in Azure Machine Learning studio:
145
-
146
-
1. Select the **Jobs** page.
147
-
1. Select an experiment.
148
-
1. Select a job from the **Display name** column.
149
-
1. Select **Outputs + logs** from the top menu.
150
-
1. Expand **logs** > **azureml**.
151
-
1. Select the link that begins with **###_azure**.
152
-
153
-
The logged information contains JSON code similar to the following example:
139
+
The Git information is stored in the properties for a training job. The logged information contains JSON code similar to the following example:
154
140
155
141
```json
156
142
"properties": {
@@ -169,6 +155,19 @@ The logged information contains JSON code similar to the following example:
169
155
}
170
156
```
171
157
158
+
You can view this information by using the Azure portal, Python SDK, or Azure CLI.
159
+
160
+
### Azure portal
161
+
162
+
In your Azure Machine Learning workspace in Azure Machine Learning studio:
163
+
164
+
1. Select the **Jobs** page.
165
+
1. Select an experiment.
166
+
1. Select a job from the **Display name** column.
167
+
1. Select **Outputs + logs** from the top menu.
168
+
1. Expand **logs** > **azureml**.
169
+
1. Select the link that begins with **###_azure**.
170
+
172
171
### Python SDK V2
173
172
174
173
After you submit a training run, a [Job](/python/api/azure-ai-ml/azure.ai.ml.entities.job) object is returned. The `properties` attribute of this object contains the logged Git information. For example, you can run the following command to retrieve the commit hash:
0 commit comments