Skip to content

Commit a3c0196

Browse files
committed
changes
1 parent 9e586bf commit a3c0196

File tree

1 file changed

+38
-39
lines changed

1 file changed

+38
-39
lines changed

articles/machine-learning/concept-train-model-git-integration.md

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ When you submit an Azure Machine Learning training job that has source files fro
2828
<a name="#clone-git-repositories-into-your-workspace-file-system"></a>
2929
## Git repositories in a workspace file system
3030

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 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).
3232

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.
3434

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.
3636

3737
## Clone a Git repository with SSH
3838

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.
4040

4141
### Generate and save a new SSH key
4242

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.
4444

4545
```bash
4646
ssh-keygen -t ed25519 -C "[email protected]"
@@ -75,7 +75,7 @@ cat ~/.ssh/id_ed25519.pub
7575
Copy the output.
7676

7777
> [!TIP]
78-
> To copy and paste in the terminal window, use these keyboard shortcuts depending on your operating system:
78+
> To copy and paste in the terminal window, use these keyboard shortcuts, depending on your operating system:
7979
>
8080
> - Windows: Ctrl+C or Ctrl+Insert to copy, Ctrl+V or Ctrl+Shift+V to paste.
8181
> - MacOS: Cmd+C to copy and Cmd+V to paste.
@@ -91,37 +91,36 @@ Add the SSH key to your Git account by using the following instructions, dependi
9191

9292
### Clone the Git repository with SSH
9393

94-
1. Copy the SSH Git clone URL from the Git repo you want to clone.
94+
To clone a Git repo, copy the SSH Git clone URL from the repo. In your terminal, run the `git clone` command using the SSH Git clone URL. For example:
9595

96-
1. Run the following `git clone` command, using your SSH Git clone URL. For example:
97-
98-
```bash
99-
git clone [email protected]:GitUser/azureml-example.git
100-
```
96+
```bash
97+
git clone [email protected]:GitUser/azureml-example.git
98+
```
10199

102-
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.
103101

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+
```
109107
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.
111109
112-
1. SSH displays a response like the following example:
110+
SSH displays a response like the following example:
113111
114112
```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':
117116
```
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.
119118
120119
## Track code that comes from Git repositories
121120
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.
123122
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.
125124
126125
| Property | Git command used to get the value | Description |
127126
| ----- | ----- | ----- |
@@ -137,20 +136,7 @@ If the `git` command isn't available on your development environment, or your tr
137136
138137
## View Git information
139138
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:
154140
155141
```json
156142
"properties": {
@@ -169,6 +155,19 @@ The logged information contains JSON code similar to the following example:
169155
}
170156
```
171157
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+
172171
### Python SDK V2
173172
174173
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

Comments
 (0)