generated from Azure/aml-template
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (53 loc) · 1.93 KB
/
train.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
# Actions train a model on Azure Machine Learning
name: aml-train
on: [pull_request]
jobs:
train:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check Out Repository
id: checkout_repository
uses: actions/checkout@v2
# Connect or Create the Azure Machine Learning Workspace
- name: Connect/Create Azure Machine Learning Workspace
id: aml_workspace
uses: Azure/aml-workspace@v1
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
# Connect or Create a Compute Target in Azure Machine Learning
- name: Connect/Create Azure Machine Learning Compute Target
id: aml_compute_training
uses: Azure/aml-compute@v1
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
# Submit a training run to the Azure Machine Learning
- name: Submit training run
id: aml_run
uses: Azure/aml-run@v1
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
- name: comment PR
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: "${{ steps.aml_run.outputs.run_metrics }}"
# Register model in Azure Machine Learning model registry
- name: Register model
id: aml_registermodel
uses: Azure/aml-registermodel@v1
with:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
run_id: ${{ steps.aml_run.outputs.run_id }}
experiment_name: ${{ steps.aml_run.outputs.experiment_name }}
- name: comment PR
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: "${{ steps.aml_registermodel.outputs.model_id }}"
# - uses: actions/upload-artifact@v1
# with:
# name: ${{ steps.aml_run.outputs.model }}
# path: SpatialSimOutputs