Skip to content
This repository was archived by the owner on Aug 2, 2024. It is now read-only.

Commit dc79bfb

Browse files
thomasp-msjfomhoverthomasp-msgarg-amit
authored
Thomas/third release (#163)
* refactor components to use dpv2 + remove unnecessary environments * working dpv2 pipeline * refactor scripts with right inputs and outputs * fix code path * implement fake outputs * fix paths * fix imports * fix args of aggregation script * add note, fix component args * add chekcpoint arg * linting * linting * remove sdkv2 folder * add argparse to submit script * add docstring * add docstring * linting * linting * add staging branch to build * rollback changes to build, leave it for another PR * remove logging lien * remove custom uuid * linting * add docstring to custom path function * polish docstring * rename model_silo_X to input_silo_X * rename output * rename agg output * Improve auto-provisioning resources (#35) (#36) * docker file stub * move docker file, implement feedback * login before setting subscription * login before setting subscription * use default k8s version * pin latest version since default won't work * remove executionpolicy part, other small updates * clarify to change job file _in docker filesystem_ * login before setting subscription * formatting * \ -> / * install azureml-core in docker file * propagate changes to section 7 * fix dataset creation command Co-authored-by: thomasp-ms <[email protected]> Co-authored-by: thomasp-ms <[email protected]> * Refactor folder structure (#37) * `plan` -> `docs` * 'plan' -> 'docs' * 'automated_provisioning' -> 'mlops' * 'fl_arc_k8s' -> 'examples' Co-authored-by: thomasp-ms <[email protected]> * auto provisioning - vanilla internal silos (#41) * split internal and external provisioning * adjust directories after internal/external split * introduce overall mlops readme * first stab * remove useless comment and my alias Co-authored-by: thomasp-ms <[email protected]> * Perform real FL training on the MNIST dataset Added component files customized for MNIST dataset. Set the setup for 3 silo having their own compute and datastore. git config --global user.email "[email protected]" * refine components and add logs * maintain consistency b/w config files * add requirement and env files * add requirement and env files * rmv redundant dependencies, rename conda envs * Correct epoch default value * point data asset instead of underlying URI * beef up orchestrator cluster (#46) Co-authored-by: thomasp-ms <[email protected]> * Provision CPUs for silos (instead of GPUs) (#47) * beef up orchestrator cluster * gpu -> cpu Co-authored-by: thomasp-ms <[email protected]> * add preprocessing comp description, fix typo and correct default datastore name * add integration validation test - build * update readme file * Move logger to the maion if block, add pytorch channel in the conda env yaml and move readme to the docs folder * code reformatting using black * add documentation to run an FL experiment * add more intuitive path for aggr output dir * Merge changes * add more intuitive agg output dir path * reformat using black * add iteration2 branch for PR build testing * reformat date and pass kwargs instead in the getUniqueIdentifier fn * working submit * working factory submit * linting * move component path * add soft validation * add soft validation * Add basic tests on config * linting * working bicep deployment for vanilla demo * proper orchestrator script, double containers * fix name * docstring * docstring * rollback to using only 1 container * align naming convention * instructions * working submit * set up permission model * working orch perms * wonky perms assignment * working role assignments * remove old perm model * working except silo2orch * fix typo * working submit with config * add sku as param * use R/W for now * fix submit to align with bicep provisioning demo * linting * remove dataset files * fix docstring on permission model * write draft docs with homepage, align structure, remove requirements, ensure demo documented * rollback change to req * change factory to use custom model type during validation * linting * Display metrics at the pipeline level (#68) * Fix optional input yaml and mlflow log bugs (#59) * refactor components to use dpv2 + remove unnecessary environments * working dpv2 pipeline * refactor scripts with right inputs and outputs * fix code path * implement fake outputs * fix paths * fix imports * fix args of aggregation script * add note, fix component args * add chekcpoint arg * linting * linting * remove sdkv2 folder * add argparse to submit script * add docstring * add docstring * linting * linting * add staging branch to build * rollback changes to build, leave it for another PR * remove logging lien * remove custom uuid * linting * add docstring to custom path function * polish docstring * rename model_silo_X to input_silo_X * rename output * rename agg output * Improve auto-provisioning resources (#35) (#36) * docker file stub * move docker file, implement feedback * login before setting subscription * login before setting subscription * use default k8s version * pin latest version since default won't work * remove executionpolicy part, other small updates * clarify to change job file _in docker filesystem_ * login before setting subscription * formatting * \ -> / * install azureml-core in docker file * propagate changes to section 7 * fix dataset creation command Co-authored-by: thomasp-ms <[email protected]> Co-authored-by: thomasp-ms <[email protected]> * Refactor folder structure (#37) * `plan` -> `docs` * 'plan' -> 'docs' * 'automated_provisioning' -> 'mlops' * 'fl_arc_k8s' -> 'examples' Co-authored-by: thomasp-ms <[email protected]> * auto provisioning - vanilla internal silos (#41) * split internal and external provisioning * adjust directories after internal/external split * introduce overall mlops readme * first stab * remove useless comment and my alias Co-authored-by: thomasp-ms <[email protected]> * Perform real FL training on the MNIST dataset Added component files customized for MNIST dataset. Set the setup for 3 silo having their own compute and datastore. git config --global user.email "[email protected]" * refine components and add logs * maintain consistency b/w config files * add requirement and env files * add requirement and env files * rmv redundant dependencies, rename conda envs * Correct epoch default value * point data asset instead of underlying URI * beef up orchestrator cluster (#46) Co-authored-by: thomasp-ms <[email protected]> * Provision CPUs for silos (instead of GPUs) (#47) * beef up orchestrator cluster * gpu -> cpu Co-authored-by: thomasp-ms <[email protected]> * add preprocessing comp description, fix typo and correct default datastore name * add integration validation test - build * update readme file * Move logger to the maion if block, add pytorch channel in the conda env yaml and move readme to the docs folder * code reformatting using black * add documentation to run an FL experiment * add more intuitive path for aggr output dir * Merge changes * Accomodate optional input chnages and switch from mlflow autologging to manual logging * code style * change optional inputs syntax Co-authored-by: Jeff Omhover <[email protected]> Co-authored-by: Jeff Omhover <[email protected]> Co-authored-by: Thomas <[email protected]> Co-authored-by: thomasp-ms <[email protected]> * Make changes to display all metrics at the pipeline level * Log preprocessing metadata in mlflow * linting * Pass client as an arg * Fix typo, rmv name from silo config, metric naming convention, and add metric identifier in the preprocessing component Co-authored-by: Jeff Omhover <[email protected]> Co-authored-by: Jeff Omhover <[email protected]> Co-authored-by: Thomas <[email protected]> Co-authored-by: thomasp-ms <[email protected]> * Remove redundant files from the mlops directory (#69) * Remove internal & external dir as provisioning is taken care by bicep * keep mnist data files * rename demo script (#71) Co-authored-by: Jeff Omhover <[email protected]> * Unified documentation (#72) * WIP: unifying docs * Remove redundant doc file. We can always revisit if needed * FL concepts will be covered in the glossary doc * Remove internal and external silos docs as the code will be re-written in bicep * provide comprehensive documentation * rename file * refine docs * refine docs and rename fl_cross_silo_basic to fl_cross_silo_native * simplify sandbox script * simplify script, ensure it works * align config of native submit * align naming conventions between scripts, reinject rbac role * create test job for quickly debugging provisioning issues * fix tests * linting * move permissions to storage * align config with bicep scrits * Document the metrics panel of the pipeline overview in the quickstart (#76) * WIP: unifying docs * Remove redundant doc file. We can always revisit if needed * FL concepts will be covered in the glossary doc * Remove internal and external silos docs as the code will be re-written in bicep * provide comprehensive documentation * rename file * refine docs * refine docs and rename fl_cross_silo_basic to fl_cross_silo_native * document the metrics/pipeline panel in the quickstart * linting * add docstrings and disclaimers * Add instructions on how to create a custom graph (#78) * WIP: unifying docs * Remove redundant doc file. We can always revisit if needed * FL concepts will be covered in the glossary doc * Remove internal and external silos docs as the code will be re-written in bicep * provide comprehensive documentation * rename file * refine docs * refine docs and rename fl_cross_silo_basic to fl_cross_silo_native * document the metrics/pipeline panel in the quickstart * add instructions on how to create a custom graph * do better comments * Refine native code (#82) * fix silo name * log only one datapoint per iteration for an aggregated metrics * Align terminology for iteration/round/num_rounds * linting * use storage blob data contibutor * add demoBaseName to guid name of role deployment (#85) Co-authored-by: thomasp-ms <[email protected]> * use id list, add listkeys builtin * rename and dissociate orchestrator in resource + orchestrator * separate orchestrator script * draft sandbox setup * make silo script distinct * Update orchestrator_open.bicep * Update internal_blob_open.bicep * remove comments * align hello world example with new naming conventions * ensure uai assignments are created AFTER storage is created * linting * enforce precedence * merge from secure branch * use different regions, limit size of account * reduce to 3 regions, add keys to guid * substring * align config * do not use model * Add msi version of scripts * sandbox main can switch between uai and msi * fix name * linting * linting * implement ignore param, hotfix model with startswith * Address my own comments on Jeff's PR (#96) * remove magic number * little improvements on some comments * remove unused files * put dash replacement next to length check * don't necessarily assume USER AI * UAI -> XAI * revert previous UAI -> XAI changes * move length check next to dash replacement * typo * try movind the dependsOn's * RAGRS -> LRS * revert dependsON changes * revert another small change in a comment Co-authored-by: thomasp-ms <[email protected]> * align config of both submit scripts * Make distinction between on-off and repeatable provisioning scripts (#99) * clarify the role needed * remove "custom role" line * adjust locations * use existing rg if not Owner of the sub * clarify "Secure" setup * add usage instructions in docstring * explain what scripts are one-off (vs repeatable) Co-authored-by: thomasp-ms <[email protected]> * Align round/iteration terminology with the native code (#103) * rename parameter in config file * keep iterations instead of rounds * round -> iteration Co-authored-by: thomasp-ms <[email protected]> * get all goodies from secureprovisioning branch wip * get all goodies from secureprovisioning branch wip * get all goodies from secureprovisioning branch wip * align both submits to work * add optional test * rename native to literal * add getting started in readme, introduce emojis * change person * remove emojs * Propose rewriting of readme to highlight motivation first (#110) * propose rewriting of readme to highlight motivation first * minor edit Co-authored-by: Jeff Omhover <[email protected]> * Update README.md * Update quickstart to mention rg clean-up * Update quickstart.md * Update quickstart.md * Update quickstart.md * Build bicep scripts as ARM template, add Azure Buttons to quickstart (#120) * Update quickstart to lower header (hotfix) (#117) * add arm templates, add button in quickstart * switch to releasebranchlink Co-authored-by: Jeff Omhover <[email protected]> * Add subscription id, resource group and workspace name as CLI args (#122) * add more cli args * code style * code style * update quickstart doc * update readme * Initiate provisioning "cookbook" with list of provisioning scenarios + example (#123) Co-authored-by: Jeff Omhover <[email protected]> * Continuous Integration Tests (#119) * take values of subscription id, rs grp, ws name, etc from github secrets and submit a native pipeline * change path * Test azure creds in the github workflow * reformatting * add pipeline validation and testing workflow * add permissions * add permissions * check only certain dir to trigger workflows * add soft validation for any iteration branch PR * add provisioning script test * testing * create rg * create rg * change compute for testing * change demoname * delete old rg * change demoname * add demobasename and aml ws name as github secrets * random demo base name * auto generate random base name * random demo base name * adjust random num length * add vnet sandbox test * rmv dependency b/w jobs * submit various pipelines * change execution graph path * add cli args in the factory code * change compute for testing * ignore validation - factory * create custom action * correct path * correct path * add shell in the github action * create github actions and take required values as input params * add shell * add wait condition * add logs * linting * correct rg name * add azure ml extension * handle ml extension installation error. * add release branch test cases * add script to delete run history * cronjob test * cronjob test * checkout branch * test run history deletion script * test run history deletion script * test run history deletion script * azure login * date format change * remove double quotes * date format change * archive run history script tested * Add vnet-based provisioning options to cookbook (#128) Co-authored-by: Jeff Omhover <[email protected]> * Make deployment name unique in our github actions (#135) * set unique name for deployments * add attempt to deployment name Co-authored-by: Jeff Omhover <[email protected]> * Refactor compute/storage scripts to be independent (#132) Co-authored-by: Jeff Omhover <[email protected]> * Provide motivation in provisioning docs for using service endpoints (#136) * add motivation for service endpoints * add link Co-authored-by: Jeff Omhover <[email protected]> * Refresh provisioning arm buttons with latest from bicep (#139) * align names of directories * rebuild all arm Co-authored-by: Jeff Omhover <[email protected]> * Update silo_vnet_newstorage.md (#141) * Add Bicep build vs ARM template diff test (#140) * Add diff test for bicep vs arm * Debug * Debug * fix syntax error * redirect build output to stdout * coorect path * trigger arm template test when pushing changes to main branch from release* branch * remove redundant logs * Add "open aks with cc" provision tutorial and bicep scripts (#138) * implement bicep scripts to provision open aks with cc * add aks cc tutorial * build arm and add in branch * add button Co-authored-by: Jeff Omhover <[email protected]> * Provide script + tutorial to attach pair with an existing storage (#142) * provision datastore with existing storage * add arm for existing storage, add docs * add link in readme Co-authored-by: Jeff Omhover <[email protected]> * add latest arm templates to diff build (#145) Co-authored-by: Jeff Omhover <[email protected]> * Implements provisioning script for a confidential compute VM jumpbox inside a vnet (debug) (#146) * add jumpbox script with tutorial * add template to diff build Co-authored-by: Jeff Omhover <[email protected]> * Update jumpbox_cc.md (#147) * update tutorials for silos to integrate feedback (#149) Co-authored-by: Jeff Omhover <[email protected]> * Implement option to turn orchestrator storage fully private (behind PLE) (#150) Co-authored-by: Jeff Omhover <[email protected]> * Tutorial on how to adapt native and factory code to write FL experiments. (#100) * WIP: add general information about the factory code * moving factory-tutorial to another file * add scenarios * add instructions on how to adapt literal code * rename file * add general info and fix typos * Jeff's feedback * Apply code clean-up to provision scripts before bug bash (#148) Co-authored-by: Jeff Omhover <[email protected]> * Instructions for provisioning external silos (#101) * very first stab, far from done * non-secure native job using the on-prem k8s * use on-prem silos in example factory job * Revert "very first stab, far from done" This reverts commit e00d882. * Revert "use on-prem silos in example factory job" This reverts commit e2ef884. * Revert "non-secure native job using the on-prem k8s" This reverts commit 923e5f3. * restore doc stub * Make Git ignore resources for test jobs * fix gitignore * typo in comment * steps A through D * 2 typos * move to subdir * fix workspace creation * add orchestrator part, role, and timeline * last commit before PR * adjust to new open_azureml_workspace.bicep * first wave after Jeff's comments * address jeff's comments * typo * light trims Co-authored-by: thomasp-ms <[email protected]> * Implement feedback from bugbash (#158) * fix fl_pairs path * Add comments in config yaml Co-authored-by: Jeff Omhover <[email protected]> * Add silo/training subgraph for a better UX (#131) * WIP: refactor components to accomodate subgraph changes * integrate subgraphs * integrate subgraphs to the factory components * add workaround as a subgraph comp does not support optional inputs * change azure-ai-ml version * make required changes to support subgraphs in the factory code * change running_checkpoint's initial data path * correct running_checkpoint path * linting * add optional inputs in the subgraph component * revert subgraph literal changes * revert subgraph literal changes * update version * add comments * add subgraph for silos * add preprocessing/training/evaluation as one subgraph (silo subgraph) * build subgraphs with/without preprocessing * pass silo subgraph as an argument to the pipeline fn * add silo/training subgraph * revert libraries import statements * add azure identity dependency * change iteration name to iteration number * define pipelineoutputbase component * rmv older iteration!=1 condition * rmv redundant logs * test without validation * pipeline job status check via sdk * pipeline job status check via sdk * handle credentialunavailableerror exception * reformatting * rmv cli status check code from sdk * fix typo * test token new policy * test token new policy * reformat * status check using cli * check job status after every 100 sec. * linting * revise version * load_component's params change * change classes names as per a new version * handle nonetype * Jfomhover/subgraphminimal (#156) Co-authored-by: Jeff Omhover <[email protected]> * remove subprocess Co-authored-by: Jeff Omhover <[email protected]> Co-authored-by: Jeff Omhover <[email protected]> * move lnks from release branch to main (#160) Co-authored-by: Jeff Omhover <[email protected]> * changelog * address comments * October release changelog (#161) * changelog * address comments Co-authored-by: thomasp-ms <[email protected]> Co-authored-by: Jeff Omhover <[email protected]> Co-authored-by: Jeff Omhover <[email protected]> Co-authored-by: thomasp-ms <[email protected]> Co-authored-by: unknown <[email protected]>
1 parent 7e76b07 commit dc79bfb

File tree

64 files changed

+14657
-1081
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+14657
-1081
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Bicep to ARM template diff
2+
description: Bicep build to ARM template diff
3+
inputs:
4+
source-file-path:
5+
description: Bicep script path
6+
required: true
7+
target-file-path:
8+
description: Arm template file path
9+
required: true
10+
11+
runs:
12+
using: composite
13+
steps:
14+
- name: Build bicep into arm
15+
shell: bash
16+
run: az bicep build --file ${{ inputs.source-file-path }} --stdout | jq -S . > source.json
17+
18+
- name: Refactor ARM template file
19+
shell: bash
20+
run: jq -S . ${{ inputs.target-file-path }} > target.json
21+
22+
23+
- name: Source and Target file diff
24+
shell: bash
25+
run: |
26+
if cmp -s ./source.json ./target.json; then
27+
printf 'Rebuilding bicep "%s" produces exact match with target file "%s"\n' ${{ inputs.source-file-path }} ${{ inputs.target-file-path }}
28+
else
29+
printf 'Diff between "%s" build and "%s":\n' ${{ inputs.source-file-path }} ${{ inputs.target-file-path }}
30+
diff source.json target.json
31+
exit 1
32+
fi
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Provision resources
2+
description: Provision resources to perform an FL experiment
3+
inputs:
4+
client-id:
5+
description: Client ID of the service principal
6+
required: true
7+
tenant-id:
8+
description: Tenant ID of the service principal
9+
required: true
10+
subscription-id:
11+
description: Subscription to use for resources
12+
required: true
13+
resource-group:
14+
description: Resource group
15+
required: true
16+
deployment-file-path:
17+
description: File path of the deployment
18+
required: true
19+
deployment-name:
20+
description: Name for the azure deployment (unique)
21+
required: true
22+
demo-base-name:
23+
description: Demo base name (it should be unique)
24+
required: true
25+
region:
26+
description: Region of the resource group
27+
required: false
28+
default: 'westus'
29+
30+
runs:
31+
using: composite
32+
steps:
33+
- name: Azure login
34+
uses: azure/login@v1
35+
with:
36+
client-id: ${{ inputs.client-id }}
37+
tenant-id: ${{ inputs.tenant-id }}
38+
subscription-id: ${{ inputs.subscription-id }}
39+
40+
- name: Delete the resource group created by the provisioning script
41+
shell: bash
42+
run: az group delete --name ${{ inputs.resource-group }} --yes || echo No resource group named ${{ inputs.resource-group }} is found.
43+
44+
- name: Create a new resource group
45+
shell: bash
46+
run: az group create --name ${{ inputs.resource-group }} --location ${{ inputs.region }}
47+
48+
- name: Deploy the demo resources in your resource group
49+
shell: bash
50+
run: az deployment group create --template-file ${{ inputs.deployment-file-path }} --resource-group ${{ inputs.resource-group }} --parameters demoBaseName=${{ inputs.demo-base-name }} --name ${{ inputs.deployment-name }}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Submit example factory pipeline
2+
description: Submit example factory pipeline in AML
3+
inputs:
4+
client-id:
5+
description: Client ID of the service principal
6+
required: true
7+
tenant-id:
8+
description: Tenant ID of the service principal
9+
required: true
10+
subscription-id:
11+
description: Subscription to use for resources
12+
required: true
13+
resource-group:
14+
description: Resource group of the AML workspace
15+
required: true
16+
workspace-name:
17+
description: Workspace name
18+
required: true
19+
example:
20+
description: Example pipline to run
21+
required: true
22+
23+
runs:
24+
using: composite
25+
steps:
26+
- name: Setup python
27+
uses: actions/[email protected]
28+
with:
29+
python-version: 3.8
30+
31+
- name: Azure login
32+
uses: azure/login@v1
33+
with:
34+
client-id: ${{ inputs.client-id }}
35+
tenant-id: ${{ inputs.tenant-id }}
36+
subscription-id: ${{ inputs.subscription-id }}
37+
38+
- name: Install azure ml latest extension
39+
shell: bash
40+
run: |
41+
az extension remove -n azure-cli-ml || echo "azure-cli-ml extension is not installed."
42+
az extension remove -n ml || echo "ml extension is not installed."
43+
az extension add -n ml -y
44+
45+
- name: Install python dependencies
46+
shell: bash
47+
run: pip install -r examples/pipelines/fl_cross_silo_factory/requirements.txt
48+
49+
- name: Submit fl_cross_silo_factory pipeline
50+
shell: bash
51+
run: python examples/pipelines/fl_cross_silo_factory/submit.py --subscription_id ${{ inputs.subscription-id }} --resource_group ${{ inputs.resource-group }} --workspace_name ${{ inputs.workspace-name }} --example ${{ inputs.example }} --submit --ignore_validation --wait
52+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Submit example literal pipeline
2+
description: Submit example literal pipeline in AML
3+
inputs:
4+
client-id:
5+
description: Client ID of the service principal
6+
required: true
7+
tenant-id:
8+
description: Tenant ID of the service principal
9+
required: true
10+
subscription-id:
11+
description: Subscription to use for resources
12+
required: true
13+
resource-group:
14+
description: Resource group of the AML workspace
15+
required: true
16+
workspace-name:
17+
description: Workspace name
18+
required: true
19+
example:
20+
description: Example pipline to run
21+
required: true
22+
23+
runs:
24+
using: composite
25+
steps:
26+
- name: Setup python
27+
uses: actions/[email protected]
28+
with:
29+
python-version: 3.8
30+
31+
- name: Azure login
32+
uses: azure/login@v1
33+
with:
34+
client-id: ${{ inputs.client-id }}
35+
tenant-id: ${{ inputs.tenant-id }}
36+
subscription-id: ${{ inputs.subscription-id }}
37+
38+
- name: Install azure ml latest extension
39+
shell: bash
40+
run: |
41+
az extension remove -n azure-cli-ml || echo "azure-cli-ml extension is not installed."
42+
az extension remove -n ml || echo "ml extension is not installed."
43+
az extension add -n ml -y
44+
45+
- name: Install python dependencies
46+
shell: bash
47+
run: pip install -r examples/pipelines/fl_cross_silo_literal/requirements.txt
48+
49+
- name: Submit fl_cross_silo_literal pipeline
50+
shell: bash
51+
run: python examples/pipelines/fl_cross_silo_literal/submit.py --subscription_id ${{ inputs.subscription-id }} --resource_group ${{ inputs.resource-group }} --workspace_name ${{ inputs.workspace-name }} --example ${{ inputs.example }} --submit --wait
52+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
job_name_with_created_date=$(az ml job list -g $1 -w $2 | jq ".[] | .name, .creation_context.created_at")
4+
echo $job_name_with_created_date
5+
job_name=""
6+
i=1
7+
for item in $job_name_with_created_date; do
8+
item=`sed -e 's/^"//' -e 's/"$//' <<< "$item"`
9+
if [[ $i%2 -eq 1 ]]; then
10+
job_name=$item
11+
i=$((i+1))
12+
continue
13+
fi
14+
15+
num_of_days=$((($(date +%s) - $(date -d $item +%s)) / (60 * 60 * 24) ))
16+
echo Job name: $job_name, Number of days: $num_of_days
17+
18+
# Archive jobs that are older than 60 days
19+
if [[ $num_of_days -gt 60 ]]; then
20+
az ml job archive -g $1 -w $2 -n $job_name
21+
else
22+
echo "Number of days are less than 60."
23+
fi
24+
i=$((i+1))
25+
done
26+
27+

.github/workflows/python.yaml renamed to .github/workflows/build-test.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
name: python
1+
name: Pipeline-validation
22

33
on:
44
push:
55
branches:
6-
- main
6+
- "*"
77
pull_request:
88
branches:
9-
- main
10-
- release-sdkv2-iteration-02
9+
- "*"
1110

1211
jobs:
1312
build:
1413
runs-on: ubuntu-latest
1514
steps:
16-
1715
- uses: actions/checkout@v2
1816

1917
- uses: actions/[email protected]
@@ -24,7 +22,7 @@ jobs:
2422

2523
- run: black --check .
2624
if: github.base_ref
27-
25+
2826
- name: Intall python dependencies
2927
run: pip install -r examples/pipelines/fl_cross_silo_literal/requirements.txt
3028

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Delete run history
2+
on:
3+
schedule:
4+
- cron: "0 0 * * *"
5+
6+
jobs:
7+
delete-history:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Azure login
13+
uses: azure/login@v1
14+
with:
15+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
16+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
17+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
18+
19+
- name: Install azure ml latest extension
20+
shell: bash
21+
run: |
22+
az extension remove -n azure-cli-ml || echo "azure-cli-ml extension is not installed."
23+
az extension remove -n ml || echo "ml extension is not installed."
24+
az extension add -n ml -y
25+
26+
- name: Delete run history
27+
shell: bash
28+
run: ./.github/scripts/delete-run-history.sh ${{ secrets.RESOURCE_GROUP }} ${{ secrets.AML_WORKSPACE_NAME }}

0 commit comments

Comments
 (0)