How to use AI Core Toolkit using Visual Studio CodeLicenseThis package is provided under the terms of the SAP Developer License Agreement IntroductionThe SAP AI Core toolkit for visual studio code makes a connection to your SAP AI Core instance directly from VS Code. It allows you to develop solutions for your use case, and leverage AI capabilities through SAP AI Core, in one developer tool. The toolkit is available through the extensions marketplace in VS code. Install the toolkit by completing the following steps:
If you already have an SAP AI Core instance, and are familiar with SAP AI Core, you can connect by entering your service key, git, docker and storage credentials in the relevant fields of the extension. Adding GitHubHere we will be adding our GitHub repository to AI core. Step 1: Select Ai core connection > Go inside admin operations > right click on GitHub repository and click on create git repository. Step 2: A pop up will open enter the values as follows You created the token from from Github.com you can reffer to here to learn how create Git Token Step 3: Fill the details GitHub URL, Name for GitHub, Username, password/token and press enter. This would mark as Completion of adding GitHub. Creating an applicationHere we are adding an application from the GitHub repository we added to AI core. Step 1: Select Ai core connection > Go inside admin operations > right click on Applications and click on Register Application. A Pop up will open Step 2: Fill the details like application Name, GitHub URL, For following this tutorial enter Git version as HEAD (you can choose any specific commit too for the same repository If you are using Head make sure its in CAPS) also enter the path to Argo templates and press enter. This would mark as Completion of registering an application. Please follow screenshots below Connecting docker secrets to AI coreStep 1 : Select Ai core connection > Go inside admin operations > right click on Docker Credentials and click on create docker credentials. Step 2 : A pop up will open Step 3: Fill the details Docker hub URL, Username, password and Set docker as name the secret and press enter. And Docker credentials would be created. Enter the your docker secret secret creds that we created in the previous step Creating object store credentialsObject store credentials are required to access the data stored inside S3 bucket. Step 1: Select Ai core connection > Go inside ML operations > right click on Object store creds and click on register Object store creds Step 2: enter all the bucket details like Bucket access id, secret name and region and path to the dataset. Object store secret should be default You can follow the Steps below. Enter your Bucket Name Enter your AWS Access Key ID Enter your AWS Access Secret Key Creating an ArtifactStep 1: Select Ai core connection > Go inside ML operations > > Go inside ML Scenarios > Name of the Scenario you created > right click on Artifacts and click on Create Artifact. Step 2: Enter the artifact name for reference, choose type as dataset and enter the artifact URL as : AI://<object_credStore_name>/Path_to_dataset, and the description for your reference. In our case it would be ai://default/data A pop-up will appear on the screen enter the values as per the screenshots below. Choose dataset. Creating a ConfigurationStep 1: Select Ai core connection > Go ML operations > select Resource groups and choose the resource group. Step 2: Go inside ML Scenarios and you would be able to see all the Scenarios that are available in the Git repository. Step 3: Go inside the Scenario and click and right click on Create training configuration. Step 4: A pop up will appear on the top of screen Enter all the required details as per the Argo template and press enter It will create the Configuration that we will use to run the training. Running TrainingGo inside training configurations and choose the created Configuration and right click on Execution and click on Start execution to start the training. Step 2: Expand the execution to see the code status of execution. Step 3 : Right click on the execution id to perform operations related to execution we are choosing check execution logs to see the status of our training. Step 4: A pop up appears at the bottom of VS code where you will be able to see execution logs of the extension. DeploymentAs soon as training ends the second part would be to deploy the model. So, we will be again creating a deployment configuration using the same steps as we used for creating the configuration for training but this time we would refer these steps under serving configurations. Choose the values in pop-up as shown below Then we will choose the created configuration and right click on deployments and click on start deployment to deploy the model. Once the deployment starts, we would be able to see the Deployment deployment URL by Right click on view Deployment details. To get the deployment URL. A Output will open at bottom of VS code showing Deployment details. For users who are not yet familiar with SAP AI Core, there is a dedicated starter tutorial that guides you through a use case with SAP AI Core, using the VS Code extension. For more information, see https://developers.sap.com//tutorials/ai-core-vs-code-toolkit.html. For those who are brand new to SAP AI Core, it is recommended that you start provision your account using this tutorial Use Boosters for Free Tier Use of SAP AI Core and SAP AI Launchpad | Tutorials for SAP Developers and then continue with your first use case with VS Code https://developers.sap.com//tutorials/ai-core-vs-code-toolkit.html You can view the documentation for SAP AI Core here https://help.sap.com/docs/sap-ai-core. |