|
| 1 | +# Actions train a model on Azure Machine Learning |
| 2 | +<<<<<<< HEAD:.github/workflows/train.yml |
| 3 | +name: aml-train |
| 4 | +on: [pull_request] |
| 5 | + |
| 6 | +======= |
| 7 | +name: aml-train-deploy-workflow |
| 8 | +on: push |
| 9 | +>>>>>>> simple_template:.github/workflows/train_deploy.yml |
| 10 | +jobs: |
| 11 | + train: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 15 | + - name: Check Out Repository |
| 16 | + id: checkout_repository |
| 17 | + uses: actions/checkout@v2 |
| 18 | + |
| 19 | + # Connect or Create the Azure Machine Learning Workspace |
| 20 | + - name: Connect/Create Azure Machine Learning Workspace |
| 21 | + id: aml_workspace |
| 22 | + uses: Azure/aml-workspace@master |
| 23 | + with: |
| 24 | + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} |
| 25 | + |
| 26 | + # Connect or Create a Compute Target in Azure Machine Learning |
| 27 | + - name: Connect/Create Azure Machine Learning Compute Target |
| 28 | + id: aml_compute_training |
| 29 | + uses: Azure/aml-compute@master |
| 30 | + with: |
| 31 | + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} |
| 32 | + |
| 33 | + # Submit a training run to the Azure Machine Learning |
| 34 | + - name: Submit training run |
| 35 | + id: aml_run |
| 36 | + uses: Azure/aml-run@master |
| 37 | + with: |
| 38 | + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} |
| 39 | + |
| 40 | +<<<<<<< HEAD:.github/workflows/train.yml |
| 41 | + - name: comment PR |
| 42 | + uses: unsplash/comment-on-pr@master |
| 43 | + env: |
| 44 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 45 | + with: |
| 46 | + msg: "${{ steps.aml_run.outputs.run_metrics }}" |
| 47 | + |
| 48 | +======= |
| 49 | +>>>>>>> simple_template:.github/workflows/train_deploy.yml |
| 50 | + # Register model in Azure Machine Learning model registry |
| 51 | + - name: Register model |
| 52 | + id: aml_registermodel |
| 53 | + uses: Azure/aml-registermodel@master |
| 54 | + with: |
| 55 | + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} |
| 56 | + run_id: ${{ steps.aml_run.outputs.run_id }} |
| 57 | + experiment_name: ${{ steps.aml_run.outputs.experiment_name }} |
| 58 | + |
| 59 | + # Deploy model in Azure Machine Learning to ACI |
| 60 | + - name: Deploy model |
| 61 | + id: aml_deploy |
| 62 | + uses: Azure/aml-deploy@master |
| 63 | + with: |
| 64 | +<<<<<<< HEAD:.github/workflows/train.yml |
| 65 | + msg: "${{ steps.aml_registermodel.outputs.model_id }}" |
| 66 | + |
| 67 | + # - uses: actions/upload-artifact@v1 |
| 68 | + # with: |
| 69 | + # name: ${{ steps.aml_run.outputs.model }} |
| 70 | + # path: SpatialSimOutputs |
| 71 | + |
| 72 | +======= |
| 73 | + azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} |
| 74 | + model_name: ${{ steps.aml_registermodel.outputs.model_name }} |
| 75 | + model_version: ${{ steps.aml_registermodel.outputs.model_version }} |
| 76 | +>>>>>>> simple_template:.github/workflows/train_deploy.yml |
0 commit comments