How to Run the Example Notebook
The generated integrated development environment (IDE) provides you with an example notebook that you can run to get started and also use as a template.
To run the notebook example using AI platform, compute for Azure ML workloads, follow these steps:
This tutorial is based on the VS Code Server development environment.
-
Set up a development environment and connect the notebook. Go to How to set up a notebook for details.
-
In the web browser tab of the notebook environment, from the file explorer or file browser on the left side menu, find and open the example notebook:
example-notebook.ipynb.
File explorer -
Select the kernel.
- On the top right, click Select Kernel.
- Select Python Environments....
Select Kernel -
Click the Run Cell ▶︎ button next to each cell. Go through the entire process of jobs, pipelines, and deployments.
Run cells -
Before the last step (TEST deploy model serving), you must obtain the URL and Authorization token for the CURL command.
- From Azure AI Machine Learning Studio, go to Equinor > unified-amlws-dev > Endpoints.
- For this example, we'll choose the ai-platform-endpoint0814994576 endpoint.
- Go to the Consume tab and get the REST endpoint and Authentication values to use for the URL and Authorization token of the CURL command used to test deployed model serving.
Endpoint URL and authorization token -
From the VS Code web-based IDE, open a terminal window:
- Click the hamburger icon con the top-left.
- Select Terminal > New Terminal.
Open terminal in IDE -
In the new terminal window, to test the model deployment, use the following CURL command to send a test payload to the REST endpoint and check the inference response:
- Copy and paste the CURL command below.
- Replace URL and token placeholders with the data obtained previously.
- Press Enter to run the command.
curl -k -X POST https://PLACEHOLDER \
-H "Authorization: Bearer PLACEHOLDER" \
-H "Content-Type: application/json" \
-d '{
"data": [[2027]]
}'
CURL command in terminal -
You should see a response in the terminal.