recommenders icon indicating copy to clipboard operation
recommenders copied to clipboard

[FEATURE] Simplify AzureML test workflows

Open simonzhaoms opened this issue 2 years ago • 2 comments

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

simonzhaoms avatar Jun 29 '22 02:06 simonzhaoms

@pradnyeshjoshi what's your view on this idea?

miguelgfierro avatar Jul 01 '22 08:07 miguelgfierro

@pradnyeshjoshi what's your view on this idea?

@miguelgfierro yes I agree with Simon, it makes sense to consolidate these workflows.

pradnyeshjoshi avatar Jul 01 '22 17:07 pradnyeshjoshi

Closing this issue: PR #1773 merged.

pradnyeshjoshi avatar Sep 20 '22 19:09 pradnyeshjoshi