recommenders
recommenders copied to clipboard
[FEATURE] Simplify AzureML test workflows
Description
After a quick look of the azureml_*.yml
files under .github/workflows, I find the 4 azureml_*.yml
files are almost the same except some parameters, such as cpu
, gpu
, etc.
name: azureml-cpu-nightly
env:
# Parameters
EXP_NAME: nightly_cpu_tests
jobs:
nightly-cpu-tests:
# Shared Steps
steps:
- xxx
- yyy
- zzz
name: azureml-gpu-nightly
env:
# Parameters
EXP_NAME: nightly_gpu_tests
jobs:
nightly-gpu-tests:
# Shared Steps
steps:
- xxx
- yyy
- zzz
To make them easier to read and maintain, reusing workflows could be considered. In other words, an extra reusable workflow file can be created to hold the common steps shared by the 4 azureml_*.yml
files, and the 4 azureml_*.yml
files only contains different parameters and a call to the reusable workflow.
name: Reusable Workflow
on:
workflow_call:
inputs:
# Parameters
EXP_NAME:
required: true
type: string
jobs:
test:
# Shared Steps
steps:
- xxx
- yyy
- zzz
name: azureml-cpu-nightly
jobs:
nightly-cpu-tests:
# Call reusable workflow
uses: Reusable Workflow
with:
# Parameters
EXP_NAME: nightly_cpu_tests
name: azureml-gpu-nightly
jobs:
nightly-gpu-tests:
# Call reusable workflow
uses: Reusable Workflow
with:
# Parameters
EXP_NAME: nightly_gpu_tests
Expected behavior with the suggested feature
Other Comments
@pradnyeshjoshi what's your view on this idea?
@pradnyeshjoshi what's your view on this idea?
@miguelgfierro yes I agree with Simon, it makes sense to consolidate these workflows.
Closing this issue: PR #1773 merged.