Skip to content

Commit 539bf62

Browse files
authored
Adding automated tests and README for SDK v2 tutorials (Azure#1903)
* Adding test for AML in a day * Update tutorials-azureml-in-a-day-azureml-in-a-day.yml * Update tutorials-azureml-in-a-day-azureml-in-a-day.yml * Update tutorials-azureml-in-a-day-azureml-in-a-day.yml * Update azureml-in-a-day.ipynb * Adding tests for more tutorials * Update azureml-in-a-day.ipynb * Adding README files * Update readme.py * Update azureml-in-a-day.ipynb * Added Description to all files * Update README.md * Update readme.py
1 parent 50eee83 commit 539bf62

12 files changed

+909
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# This code is autogenerated.
2+
# Code is generated by running custom script: python3 readme.py
3+
# Any manual changes to this file may cause incorrect behavior.
4+
# Any manual changes will be overwritten if the code is regenerated.
5+
6+
name: tutorials-azureml-getting-started-azureml-getting-started-studio
7+
# This file is created by tutorials/readme.py.
8+
# Please do not edit directly.
9+
on:
10+
workflow_dispatch:
11+
schedule:
12+
- cron: "0 */8 * * *"
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- tutorials/azureml-getting-started/**
18+
- .github/workflows/tutorials-azureml-getting-started-azureml-getting-started-studio.yml
19+
- sdk/python/dev-requirements.txt
20+
- infra/**
21+
- sdk/python/setup.sh
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24+
cancel-in-progress: true
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: check out repo
30+
uses: actions/checkout@v2
31+
- name: setup python
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: "3.8"
35+
- name: pip install notebook reqs
36+
run: pip install -r sdk/python/dev-requirements.txt
37+
- name: pip install mlflow reqs
38+
run: pip install -r sdk/python/mlflow-requirements.txt
39+
- name: azure login
40+
uses: azure/login@v1
41+
with:
42+
creds: ${{secrets.AZUREML_CREDENTIALS}}
43+
- name: bootstrap resources
44+
run: |
45+
echo '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}';
46+
bash bootstrap.sh
47+
working-directory: infra
48+
continue-on-error: false
49+
- name: setup SDK
50+
run: |
51+
source "${{ github.workspace }}/infra/sdk_helpers.sh";
52+
source "${{ github.workspace }}/infra/init_environment.sh";
53+
bash setup.sh
54+
working-directory: sdk/python
55+
continue-on-error: true
56+
- name: setup-cli
57+
run: |
58+
source "${{ github.workspace }}/infra/sdk_helpers.sh";
59+
source "${{ github.workspace }}/infra/init_environment.sh";
60+
bash setup.sh
61+
working-directory: cli
62+
continue-on-error: true
63+
- name: run azureml-getting-started/azureml-getting-started-studio.ipynb
64+
run: |
65+
source "${{ github.workspace }}/infra/sdk_helpers.sh";
66+
source "${{ github.workspace }}/infra/init_environment.sh";
67+
bash "${{ github.workspace }}/infra/sdk_helpers.sh" generate_workspace_config "../../.azureml/config.json";
68+
bash "${{ github.workspace }}/infra/sdk_helpers.sh" replace_template_values "azureml-getting-started-studio.ipynb";
69+
[ -f "../../.azureml/config" ] && cat "../../.azureml/config";
70+
papermill -k python azureml-getting-started-studio.ipynb azureml-getting-started-studio.output.ipynb
71+
working-directory: tutorials/azureml-getting-started
72+
- name: upload notebook's working folder as an artifact
73+
if: ${{ always() }}
74+
uses: actions/upload-artifact@v2
75+
with:
76+
name: azureml-getting-started-studio
77+
path: tutorials/azureml-getting-started
78+
79+
- name: Send IcM on failure
80+
if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }}
81+
uses: ./.github/actions/generate-icm
82+
with:
83+
host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }}
84+
connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }}
85+
certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }}
86+
private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }}
87+
args: |
88+
incident:
89+
Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'azureml-getting-started/azureml-getting-started-studio.ipynb'"
90+
Summary: |
91+
Notebook 'azureml-getting-started/azureml-getting-started-studio.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
92+
Severity: 4
93+
RoutingId: "github://azureml-examples"
94+
Status: Active
95+
Source:
96+
IncidentId: "azureml-getting-started/azureml-getting-started-studio.ipynb[${{ github.ref_name }}]"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# This code is autogenerated.
2+
# Code is generated by running custom script: python3 readme.py
3+
# Any manual changes to this file may cause incorrect behavior.
4+
# Any manual changes will be overwritten if the code is regenerated.
5+
6+
name: tutorials-azureml-in-a-day-azureml-in-a-day
7+
# This file is created by tutorials/readme.py.
8+
# Please do not edit directly.
9+
on:
10+
workflow_dispatch:
11+
schedule:
12+
- cron: "0 */8 * * *"
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- tutorials/azureml-in-a-day/**
18+
- .github/workflows/tutorials-azureml-in-a-day-azureml-in-a-day.yml
19+
- sdk/python/dev-requirements.txt
20+
- infra/**
21+
- sdk/python/setup.sh
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24+
cancel-in-progress: true
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: check out repo
30+
uses: actions/checkout@v2
31+
- name: setup python
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: "3.8"
35+
- name: pip install notebook reqs
36+
run: pip install -r sdk/python/dev-requirements.txt
37+
- name: pip install mlflow reqs
38+
run: pip install -r sdk/python/mlflow-requirements.txt
39+
- name: azure login
40+
uses: azure/login@v1
41+
with:
42+
creds: ${{secrets.AZUREML_CREDENTIALS}}
43+
- name: bootstrap resources
44+
run: |
45+
echo '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}';
46+
bash bootstrap.sh
47+
working-directory: infra
48+
continue-on-error: false
49+
- name: setup SDK
50+
run: |
51+
source "${{ github.workspace }}/infra/sdk_helpers.sh";
52+
source "${{ github.workspace }}/infra/init_environment.sh";
53+
bash setup.sh
54+
working-directory: sdk/python
55+
continue-on-error: true
56+
- name: setup-cli
57+
run: |
58+
source "${{ github.workspace }}/infra/sdk_helpers.sh";
59+
source "${{ github.workspace }}/infra/init_environment.sh";
60+
bash setup.sh
61+
working-directory: cli
62+
continue-on-error: true
63+
- name: run azureml-in-a-day/azureml-in-a-day.ipynb
64+
run: |
65+
source "${{ github.workspace }}/infra/sdk_helpers.sh";
66+
source "${{ github.workspace }}/infra/init_environment.sh";
67+
bash "${{ github.workspace }}/infra/sdk_helpers.sh" generate_workspace_config "../../.azureml/config.json";
68+
bash "${{ github.workspace }}/infra/sdk_helpers.sh" replace_template_values "azureml-in-a-day.ipynb";
69+
[ -f "../../.azureml/config" ] && cat "../../.azureml/config";
70+
papermill -k python azureml-in-a-day.ipynb azureml-in-a-day.output.ipynb
71+
working-directory: tutorials/azureml-in-a-day
72+
- name: upload notebook's working folder as an artifact
73+
if: ${{ always() }}
74+
uses: actions/upload-artifact@v2
75+
with:
76+
name: azureml-in-a-day
77+
path: tutorials/azureml-in-a-day
78+
79+
- name: Send IcM on failure
80+
if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }}
81+
uses: ./.github/actions/generate-icm
82+
with:
83+
host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }}
84+
connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }}
85+
certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }}
86+
private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }}
87+
args: |
88+
incident:
89+
Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'azureml-in-a-day/azureml-in-a-day.ipynb'"
90+
Summary: |
91+
Notebook 'azureml-in-a-day/azureml-in-a-day.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
92+
Severity: 4
93+
RoutingId: "github://azureml-examples"
94+
Status: Active
95+
Source:
96+
IncidentId: "azureml-in-a-day/azureml-in-a-day.ipynb[${{ github.ref_name }}]"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# This code is autogenerated.
2+
# Code is generated by running custom script: python3 readme.py
3+
# Any manual changes to this file may cause incorrect behavior.
4+
# Any manual changes will be overwritten if the code is regenerated.
5+
6+
name: tutorials-e2e-distributed-pytorch-image-e2e-object-classification-distributed-pytorch
7+
# This file is created by tutorials/readme.py.
8+
# Please do not edit directly.
9+
on:
10+
workflow_dispatch:
11+
schedule:
12+
- cron: "0 */8 * * *"
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- tutorials/e2e-distributed-pytorch-image/**
18+
- .github/workflows/tutorials-e2e-distributed-pytorch-image-e2e-object-classification-distributed-pytorch.yml
19+
- sdk/python/dev-requirements.txt
20+
- infra/**
21+
- sdk/python/setup.sh
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24+
cancel-in-progress: true
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: check out repo
30+
uses: actions/checkout@v2
31+
- name: setup python
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: "3.8"
35+
- name: pip install notebook reqs
36+
run: pip install -r sdk/python/dev-requirements.txt
37+
- name: pip install mlflow reqs
38+
run: pip install -r sdk/python/mlflow-requirements.txt
39+
- name: azure login
40+
uses: azure/login@v1
41+
with:
42+
creds: ${{secrets.AZUREML_CREDENTIALS}}
43+
- name: bootstrap resources
44+
run: |
45+
echo '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}';
46+
bash bootstrap.sh
47+
working-directory: infra
48+
continue-on-error: false
49+
- name: setup SDK
50+
run: |
51+
source "${{ github.workspace }}/infra/sdk_helpers.sh";
52+
source "${{ github.workspace }}/infra/init_environment.sh";
53+
bash setup.sh
54+
working-directory: sdk/python
55+
continue-on-error: true
56+
- name: setup-cli
57+
run: |
58+
source "${{ github.workspace }}/infra/sdk_helpers.sh";
59+
source "${{ github.workspace }}/infra/init_environment.sh";
60+
bash setup.sh
61+
working-directory: cli
62+
continue-on-error: true
63+
- name: run e2e-distributed-pytorch-image/e2e-object-classification-distributed-pytorch.ipynb
64+
run: |
65+
source "${{ github.workspace }}/infra/sdk_helpers.sh";
66+
source "${{ github.workspace }}/infra/init_environment.sh";
67+
bash "${{ github.workspace }}/infra/sdk_helpers.sh" generate_workspace_config "../../.azureml/config.json";
68+
bash "${{ github.workspace }}/infra/sdk_helpers.sh" replace_template_values "e2e-object-classification-distributed-pytorch.ipynb";
69+
[ -f "../../.azureml/config" ] && cat "../../.azureml/config";
70+
papermill -k python e2e-object-classification-distributed-pytorch.ipynb e2e-object-classification-distributed-pytorch.output.ipynb
71+
working-directory: tutorials/e2e-distributed-pytorch-image
72+
- name: upload notebook's working folder as an artifact
73+
if: ${{ always() }}
74+
uses: actions/upload-artifact@v2
75+
with:
76+
name: e2e-object-classification-distributed-pytorch
77+
path: tutorials/e2e-distributed-pytorch-image
78+
79+
- name: Send IcM on failure
80+
if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }}
81+
uses: ./.github/actions/generate-icm
82+
with:
83+
host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }}
84+
connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }}
85+
certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }}
86+
private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }}
87+
args: |
88+
incident:
89+
Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'e2e-distributed-pytorch-image/e2e-object-classification-distributed-pytorch.ipynb'"
90+
Summary: |
91+
Notebook 'e2e-distributed-pytorch-image/e2e-object-classification-distributed-pytorch.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
92+
Severity: 4
93+
RoutingId: "github://azureml-examples"
94+
Status: Active
95+
Source:
96+
IncidentId: "e2e-distributed-pytorch-image/e2e-object-classification-distributed-pytorch.ipynb[${{ github.ref_name }}]"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# This code is autogenerated.
2+
# Code is generated by running custom script: python3 readme.py
3+
# Any manual changes to this file may cause incorrect behavior.
4+
# Any manual changes will be overwritten if the code is regenerated.
5+
6+
name: tutorials-e2e-ds-experience-e2e-ml-workflow
7+
# This file is created by tutorials/readme.py.
8+
# Please do not edit directly.
9+
on:
10+
workflow_dispatch:
11+
schedule:
12+
- cron: "0 */8 * * *"
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- tutorials/e2e-ds-experience/**
18+
- .github/workflows/tutorials-e2e-ds-experience-e2e-ml-workflow.yml
19+
- sdk/python/dev-requirements.txt
20+
- infra/**
21+
- sdk/python/setup.sh
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24+
cancel-in-progress: true
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: check out repo
30+
uses: actions/checkout@v2
31+
- name: setup python
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: "3.8"
35+
- name: pip install notebook reqs
36+
run: pip install -r sdk/python/dev-requirements.txt
37+
- name: pip install mlflow reqs
38+
run: pip install -r sdk/python/mlflow-requirements.txt
39+
- name: azure login
40+
uses: azure/login@v1
41+
with:
42+
creds: ${{secrets.AZUREML_CREDENTIALS}}
43+
- name: bootstrap resources
44+
run: |
45+
echo '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}';
46+
bash bootstrap.sh
47+
working-directory: infra
48+
continue-on-error: false
49+
- name: setup SDK
50+
run: |
51+
source "${{ github.workspace }}/infra/sdk_helpers.sh";
52+
source "${{ github.workspace }}/infra/init_environment.sh";
53+
bash setup.sh
54+
working-directory: sdk/python
55+
continue-on-error: true
56+
- name: setup-cli
57+
run: |
58+
source "${{ github.workspace }}/infra/sdk_helpers.sh";
59+
source "${{ github.workspace }}/infra/init_environment.sh";
60+
bash setup.sh
61+
working-directory: cli
62+
continue-on-error: true
63+
- name: run e2e-ds-experience/e2e-ml-workflow.ipynb
64+
run: |
65+
source "${{ github.workspace }}/infra/sdk_helpers.sh";
66+
source "${{ github.workspace }}/infra/init_environment.sh";
67+
bash "${{ github.workspace }}/infra/sdk_helpers.sh" generate_workspace_config "../../.azureml/config.json";
68+
bash "${{ github.workspace }}/infra/sdk_helpers.sh" replace_template_values "e2e-ml-workflow.ipynb";
69+
[ -f "../../.azureml/config" ] && cat "../../.azureml/config";
70+
papermill -k python e2e-ml-workflow.ipynb e2e-ml-workflow.output.ipynb
71+
working-directory: tutorials/e2e-ds-experience
72+
- name: upload notebook's working folder as an artifact
73+
if: ${{ always() }}
74+
uses: actions/upload-artifact@v2
75+
with:
76+
name: e2e-ml-workflow
77+
path: tutorials/e2e-ds-experience
78+
79+
- name: Send IcM on failure
80+
if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }}
81+
uses: ./.github/actions/generate-icm
82+
with:
83+
host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }}
84+
connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }}
85+
certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }}
86+
private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }}
87+
args: |
88+
incident:
89+
Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'e2e-ds-experience/e2e-ml-workflow.ipynb'"
90+
Summary: |
91+
Notebook 'e2e-ds-experience/e2e-ml-workflow.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
92+
Severity: 4
93+
RoutingId: "github://azureml-examples"
94+
Status: Active
95+
Source:
96+
IncidentId: "e2e-ds-experience/e2e-ml-workflow.ipynb[${{ github.ref_name }}]"

0 commit comments

Comments
 (0)