Skip to content

Commit

Permalink
Merge pull request #1732 from microsoft/azureml_groups_opt
Browse files Browse the repository at this point in the history
Azureml groups optimization
  • Loading branch information
pradnyeshjoshi committed Jun 20, 2022
2 parents 9d26f04 + b0ac79b commit db22152
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 89 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/azureml-cpu-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,28 @@ env:
PYTEST_EXIT_CODE: "pytest_exit_code.log"

jobs:
nightly-tests:

get-test-groups:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Get test group names
id: get_test_groups
run: |
test_groups_str=$(python -c 'from tests.ci.azureml_tests.test_groups import unit_test_groups; print([t for t in unit_test_groups.keys() if "cpu" in t])')
echo ::set-output name=test_groups::$test_groups_str
outputs:
test_groups: ${{steps.get_test_groups.outputs.test_groups}}

nightly-cpu-tests:
needs: get-test-groups
name: ${{ join(matrix.*, ', ') }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['"python=3.7"']
test-group: ['"group_cpu_001"', '"group_cpu_002"', '"group_cpu_003"']
test-group: ${{ fromJSON(needs.get-test-groups.outputs.test_groups) }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/azureml-gpu-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,28 @@ env:
PYTEST_EXIT_CODE: "pytest_exit_code.log"

jobs:
nightly-tests:

get-test-groups:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Get test group names
id: get_test_groups
run: |
test_groups_str=$(python -c 'from tests.ci.azureml_tests.test_groups import unit_test_groups; print([t for t in unit_test_groups.keys() if "gpu" in t])')
echo ::set-output name=test_groups::$test_groups_str
outputs:
test_groups: ${{steps.get_test_groups.outputs.test_groups}}

nightly-gpu-tests:
needs: get-test-groups
name: ${{ join(matrix.*, ', ') }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['"python=3.7"']
test-group: ['"group_gpu_001"', '"group_gpu_002"', '"group_gpu_003"', '"group_gpu_004"', '"group_gpu_005"', '"group_gpu_006"', '"group_gpu_007"', '"group_gpu_008"', '"group_gpu_009"', '"group_gpu_010"']
test-group: ${{ fromJSON(needs.get-test-groups.outputs.test_groups) }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/azureml-spark-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,28 @@ env:
PYTEST_EXIT_CODE: "pytest_exit_code.log"

jobs:
nightly-tests:

get-test-groups:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Get test group names
id: get_test_groups
run: |
test_groups_str=$(python -c 'from tests.ci.azureml_tests.test_groups import unit_test_groups; print([t for t in unit_test_groups.keys() if "spark" in t])')
echo ::set-output name=test_groups::$test_groups_str
outputs:
test_groups: ${{steps.get_test_groups.outputs.test_groups}}

nightly-spark-tests:
needs: get-test-groups
name: ${{ join(matrix.*, ', ') }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['"python=3.7"']
test-group: ['"group_spark_001"']
test-group: ${{ fromJSON(needs.get-test-groups.outputs.test_groups) }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/azureml-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,29 @@ env:
PYTEST_EXIT_CODE: "pytest_exit_code.log"

jobs:

get-test-groups:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Get test group names
id: get_test_groups
run: |
test_groups_str=$(python -c 'from tests.ci.azureml_tests.test_groups import unit_test_groups; print(list(unit_test_groups.keys()))')
echo ::set-output name=test_groups::$test_groups_str
outputs:
test_groups: ${{steps.get_test_groups.outputs.test_groups}}

unit-tests:
needs: get-test-groups
name: ${{ join(matrix.*, ', ') }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['"python=3.7"']
test-group: ['"group_cpu_001"', '"group_notebooks_cpu_001"', '"group_notebooks_cpu_002"', '"group_pyspark_001"', '"group_pyspark_002"', '"group_notebooks_pyspark_001"', '"group_notebooks_pyspark_002"', '"group_notebooks_pyspark_003"', '"group_gpu_001"', '"group_gpu_002"', '"group_gpu_003"', '"group_notebooks_gpu_001"', '"group_notebooks_gpu_002"', '"group_notebooks_gpu_003"']
test-group: ${{ fromJSON(needs.get-test-groups.outputs.test_groups) }}

steps:
- name: Check out repository code
uses: actions/checkout@v2
Expand Down
Loading

0 comments on commit db22152

Please sign in to comment.