generated from MicrosoftLearning/mslearn-mlops
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (49 loc) · 1.56 KB
/
mlops-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: ML Ops Workflow
on: [push]
env:
workspace-name: aml-ws-mlops
resource-group: rg-mlops
sub-id: 20671c75-cecd-4a9d-9dfb-98defacfaec2
permissions:
id-token: write
contents: read
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: dev
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./ml/requirements.txt
- name: "Az CLI login"
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Set up Azure Machine Learning
run: |
az extension add -n azure-cli-ml
- name: Upload dataset
run: |
az ml dataset create -f ./ml/data.yaml --workspace-name ${{ env.workspace-name }} --resource-group ${{ env.resource-group }}
- name: Submit training run
run: |
az ml job create --file ./ml/train.yaml --workspace-name ${{ env.workspace-name }} --resource-group ${{ env.resource-group }}
# - name: Register the model
# run: |
# az ml job create --file register_model.yaml
# - name: Deploy the model
# run: |
# az ml job create --file deploy_model.yaml
# - name: Test the deployment
# run: |
# python test_deployment.py