Skip to content

Commit

Permalink
feat: add prod and dev jobs workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shah-zeb-naveed committed Mar 14, 2024
1 parent fd02958 commit 210f7a1
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/prod_and_dev_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:
contents: read

jobs:
train:
devtrain:
runs-on: ubuntu-latest
environment: dev
steps:
Expand All @@ -24,5 +24,24 @@ jobs:
- name: Set defaults
run: az configure --defaults group=testshahzeb && az configure --defaults workspace=mlshah
- name: Run command
run: az ml job create --file src/job.yml
run: az ml job create --file src/job.yml --stream
prodtrain:
needs: devtrain
runs-on: ubuntu-latest
environment: prod
steps:
- name: Check out repo
uses: actions/checkout@main
- name: Install az ml extension
run: az extension add -n ml -y
- name: Azure 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 defaults
run: az configure --defaults group=testshahzeb && az configure --defaults workspace=mlshah
- name: Run command
run: az ml job create --file src/prod_job.yml --stream

22 changes: 22 additions & 0 deletions src/prod_job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
code: model
command: |
echo "Hello, world!"
ls -la
python train.py --training_data ${{inputs.training_data}} --reg_rate ${{inputs.reg_rate}}
inputs:
training_data:
type: uri_folder
path: azureml:diabetes-prod-folder:1
reg_rate: 0.01
environment: azureml:AzureML-sklearn-0.24-ubuntu18.04-py37-cpu@latest
compute: azureml:shahcluster # maybe local needs docker
experiment_name: DummyExperiment
description: |
# Azure Machine Learning "hello world" job
This is a "hello world" job running in the cloud via Azure Machine Learning!
## Description
Markdown is supported in the studio for job descriptions! You can edit the description there or via CLI.

0 comments on commit 210f7a1

Please sign in to comment.