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
- How to check and debug execution logs for errors.
20
20
21
-
All the required files and instructions are specified in the step for you to easily complete the tutorial.
22
-
23
-
By the end of the tutorial you will have your AI code in form of a Docker image, connected to your AI workflow. You will also know how to use Docker images together with AI core and how to debug your code if the **Execution** goes to an unexpected state. This tutorial is a precursor to the set up of data pipelines and models generation.
21
+
By the end of the tutorial you will have your AI code in form of a Docker image, connected to your AI workflow. You will also know how to use Docker images together with AI core and how to debug your code if the **Execution** goes to an unexpected state. This tutorial is a precursor to the set up of data pipelines and model generation.
24
22
25
23
You may still complete this tutorial if you are not familiar with the Python programming language.
26
24
@@ -38,7 +36,7 @@ Click on the profile button (your profile name) and then select **Account Settin
38
36
39
37
!
40
38
41
-
Select **Security** from the navigation bar and then click **New Access Token**.
39
+
Select **Security** from the navigation bar and click **New Access Token**.
42
40
43
41
!
44
42
@@ -112,7 +110,7 @@ The code builds a model using the [California Housing Dataset](https://scikit-le
112
110
113
111
[ACCORDION-BEGIN [Step 4: ](Transform your AI code into a Docker image)]
114
112
115
-
In the same directory, create a file named `Dockerfile`**(no extension to be added after the filename)**. This file stores instructions for Docker to build an image. Your Docker image is a Linux distribution, therefore commands in this `Dockerfile` are similar to Linux commands with verbs for Docker as the suffix. Paste the following content into the file: *** tell them that they cannot change it***
113
+
In the same directory, create a file named `Dockerfile`with has **no extension**. This file stores instructions for Docker to build an image. Your Docker image is a Linux distribution, therefore commands in this `Dockerfile` are similar to Linux commands with verbs for Docker as the suffix. Paste the following content **exactly** as it is, into the file:
116
114
117
115
```TEXT
118
116
# Specify which base layers (default dependencies) to use
@@ -136,7 +134,7 @@ RUN chgrp -R 65534 /app && \
136
134
137
135
!
138
136
139
-
You may notice that you did not specify the command to run the script `main.py` in the `Dockerfile`. This command will be written into the AI workflow and is covered later in this tutorial.***customer must write exactly this***
137
+
You may notice that you did not specify the command to run the script `main.py` in the `Dockerfile`. This command will be written into the AI workflow and is covered later in this tutorial.
140
138
141
139
Open your terminal and navigate to your `hello-aicore-code` directory. You will use the terminal to build your Docker image.
142
140
@@ -148,7 +146,7 @@ Copy and edit the following command to build your docker image. The command foll
> **INFORMATION** In the command, `-t` indicates that there is a tag name, which is your choice of descriptive name, followed by a colon and custom version in any format, here `01`. The `.` (dot) at the end instructs Docker to look for the filename `Dockerfile` in the present directory.
149
+
> **INFORMATION** In the command, `-t` indicates that there is a tag name, followed by a colon and version. The name is your descriptive string, and the version can be in any format, here `house-price` and `01`, respectively. The `.` (dot) at the end instructs Docker to look for the filename `Dockerfile` in the present directory.
152
150
153
151
The result of this command should be:
154
152
@@ -159,15 +157,15 @@ The result of this command should be:
159
157
160
158
[ACCORDION-BEGIN [Step 5: ](Connect your local system to a Docker account)]
161
159
162
-
Login to your Docker account from your terminal. This step is required only once, it will store you Docker account credentials in your local Docker Desktop.
160
+
Login to your Docker account from your terminal. This is a one time step that stores your Docker account credentials in your local Docker Desktop.
163
161
164
162
> **INFORMATION** If you are using your organization docker registry (hosting) please use the command in the format `docker login <URL_YOUR_ORGANIZATIONS_DOCKER_REGISTRY>`
165
163
166
164
```BASH
167
165
docker login docker.io
168
166
```
169
167
170
-
Copy and paste, your generated Docker Access Token to use as your password. For security reasons you will not see anything getting printed on the screen when you type or paste the password.
168
+
Copy and paste your generated Docker Access Token to use as your password. For security reasons, your input will not be printed on the screen.
[ACCORDION-BEGIN [Step 7: ](Store your Docker credentials in SAP AI Core as a Docker registry secret)]
190
188
191
-
This step is required once. Storing the credentials enables SAP AI Core to pull (download) your Docker images from a **private** Docker repository. Use of a private Docker image prevents others from seeing your content.
189
+
This step is required once. Storing Docker credentials enables SAP AI Core to pull (download) your Docker images from a **private** Docker repository. Use of a private Docker image prevents others from seeing your content.
192
190
193
191
> **WARNING** SAP AI Core does not verify your docker credentials, please ensure that you are storing the correct credentials.
194
192
195
193
[OPTION BEGIN [SAP AI Launchpad]]
196
194
197
-
Select your SAP AI Core connection under **Workspaces** app.
195
+
Select your SAP AI Core connection under the **Workspaces** app.
Observe what the changes difference between the `hello.yaml` (created in the prerequisite tutorial) and `code-pipeline.yaml`.
297
+
Observe the difference between the `hello.yaml` (created in the prerequisite tutorial) and `code-pipeline.yaml`.
300
298
301
299
!
302
300
303
301
1.`imagePullSecrets`: A key that specifies which credentials will be used to access the Docker registry. The value `credstutorialrepo` specifies the Docker registry secret that you created previously to store Docker information in SAP AI Core.
304
-
2.`image`: A key that specifies which code to use in workflow and which command (to run `main.py`) to execute within the Docker image.
302
+
2.`image`: A key that specifies which code to use in the workflow and which commands to execute within the Docker image.
305
303
306
304
[DONE]
307
305
[ACCORDION-END]
@@ -312,11 +310,11 @@ Observe what the changes difference between the `hello.yaml` (created in the pre
312
310
313
311
[OPTION BEGIN [SAP AI Launchpad]]
314
312
315
-
Click though **Workspaces** > **Applications** > **<yourSAPAICoreconnection>** in SAP AI Launchpad.
313
+
Click **Workspaces** > **Applications** > **your SAP AI Core connection** in SAP AI Launchpad.
316
314
317
315
Navigate to your application. Check the status of your workflow. SAP AI Core will automatically sync this workflow, this can take up to three minutes.
318
316
319
-
> **WARNING** If you don't see the YAML workflow file in your Applications, even after 5 minutes, it is possible that another user (with whom you have shared SAP AI Core instance) has used the same workflow name. Check that **each** of your workflows have unique executable ID, even if they are from separate users or GitHub repositories.
317
+
> **WARNING** If you don't see the YAML workflow file in your Applications, even after 5 minutes, it is possible that another user of your SAP AI Core instance has used the same workflow name. Check that **each** of your workflows have unique executable ID, even if they are from separate users or GitHub repositories.
320
318
321
319
!
322
320
@@ -328,7 +326,7 @@ Under scenarios, you will also see a scenario named `Code (Tutorial)`.
328
326
329
327
[OPTION BEGIN [Postman]]
330
328
331
-
Click though **Collections** > GET Returns the `ArgoCD` application status.
329
+
Click **Collections** > GET Returns the `ArgoCD` application status.
332
330
333
331
!
334
332
@@ -345,7 +343,7 @@ Click though **Collections** > GET Returns the `ArgoCD` application status.
345
343
...
346
344
```
347
345
348
-
List all available scenarios by clicking through **Collections** > **Scenarios** > GET get list of scenarios.
346
+
List all available scenarios by clicking **Collections** > **Scenarios** > GET get list of scenarios.
349
347
350
348
!
351
349
@@ -382,7 +380,7 @@ Your output should contain the following snippet:
Please don't panic when this execution goes from **UNKOWN** to **RUNNING** then to the **DEAD** state. Resolving this is covered in next step.
556
+
The execution will go from **UNKOWN** to **RUNNING** then to the **DEAD** state. Resolving this is covered in next step.
555
557
556
558
[DONE]
557
559
[ACCORDION-END]
@@ -567,7 +569,7 @@ In the **Overview** tab in the **Status details** section, you will find the mos
567
569
568
570
> **INFORMATION**: In the rare case that you observe the status: `Task currently un-schedulable due to lack of resource`, wait for a few minutes, it will automatically resolve itself and your execution will continue to run.
569
571
570
-
Click **Logs** tab to see stack trace generated from your code.
572
+
Click the **Logs** tab to see the stack trace generated from your code.
571
573
572
574
!
573
575
@@ -586,7 +588,7 @@ Use your execution ID to get the logs from SAP AI Core. You should see a stack t
586
588
587
589
[OPTION BEGIN [SAP AI Core SDK]]
588
590
589
-
To query execution logs, paste and edit the snippet below, using your execution ID. You should see a stack trace of errors.
591
+
To query the execution logs, paste and edit the snippet below, using your execution ID. You should see a stack trace of errors.
590
592
591
593
```PYTHON
592
594
# get execution logs
@@ -640,14 +642,14 @@ Locate your workflow (YAML file) in GitHub. Click on the **Pencil Icon** to edit
640
642
641
643
!
642
644
643
-
Update your workflow, by adding the new `02` tag to the `ai.sap.com/version` and the Docker image name.
645
+
Update your workflow by adding the new `02` tag to the `ai.sap.com/version` and the Docker image name.
644
646
645
647
!
646
648
647
649
Click **Commit Changes** after editing.
648
650
649
651
> ### Why update the version each time you make changes to your workflow?
650
-
> The executable version is denoted by `ai.sap.com/version`. SAP AI Core syncs you workflows every three minutes and the version number is easy observable. You will easily see when your changes have synced. An alternative method of checking is to check that the latest **REVISION** number from GitHub is reflected in AI Core.
652
+
> The executable version is denoted by `ai.sap.com/version`. SAP AI Core syncs you workflows every three minutes and the version number is easily observable. You can be confident that your changes have synced. An alternative method of checking is to check that the latest **REVISION** number from GitHub is reflected in AI Core.
651
653
652
654
[DONE]
653
655
[ACCORDION-END]
@@ -657,7 +659,7 @@ Click **Commit Changes** after editing.
657
659
658
660
[OPTION BEGIN [SAP AI Launchpad]]
659
661
660
-
Go to SAP AI Launchpad. Click through **ML Operations** > **Configuration**.
662
+
Go to SAP AI Launchpad. Click **ML Operations** > **Configuration**.
661
663
662
664
Look at the **Scenario** version in the configuration named `code-workflow-1`. If it shows `Version 2.0`, it has synced successfully, if not, please wait for ~ 3 minutes and refresh the page.
0 commit comments