Skip to content

Commit

Permalink
Merge pull request #1 from shah-zeb-naveed/test_feature_branch
Browse files Browse the repository at this point in the history
feat: push dummy change
  • Loading branch information
shah-zeb-naveed authored Mar 14, 2024
2 parents 2429f5b + 210f7a1 commit bc77302
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/auto_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Automaticalyl test linting and unit tests

on:
pull_request:
branches:
- main

permissions:
id-token: write
contents: read

jobs:
checks:
runs-on: ubuntu-latest
environment: dev
steps:
- name: Check out repo
uses: actions/checkout@main
- name: Use Python version 3.8
uses: actions/setup-python@v3
with:
python-version: '3.8'
# - name: Install Flake8
# run: |
# python -m pip install flake8
# - name: Run linting tests
# run: |
# flake8 src/model/
- name: Run unittests
run: |
pip install -r requirements.txt && pytest tests/
47 changes: 47 additions & 0 deletions .github/workflows/prod_and_dev_jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Manually trigger an Azure Machine Learning job

on: [push]

permissions:
id-token: write
contents: read

jobs:
devtrain:
runs-on: ubuntu-latest
environment: dev
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/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

3 changes: 2 additions & 1 deletion .github/workflows/test_login.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Run Azure Login with OpenID Connect and PowerShell
on: [push]
on: workflow_dispatch:
#[push]

permissions:
id-token: write
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ mlflow==1.27.0
pandas==1.4.3
sklearn==0.0
scikit-learn==1.1.1
matplotlib
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 bc77302

Please sign in to comment.