Skip to content

Commit a1b7b0d

Browse files
committed
test: group tensorflow-training suites with tensorflow-inference in test-suites.yml
1 parent 2c2fb65 commit a1b7b0d

5 files changed

Lines changed: 129 additions & 7 deletions

‎.github/config/test-suites.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,21 @@ suites:
6161
code_paths:
6262
- test/tensorflow/integration/inference/**
6363

64+
tensorflow-training/unit:
65+
skip_eligible: true
66+
code_paths:
67+
- test/tensorflow/unit/**
68+
69+
tensorflow-training/single_gpu:
70+
skip_eligible: true
71+
code_paths:
72+
- test/tensorflow/single_gpu/**
73+
74+
tensorflow-training/sagemaker:
75+
skip_eligible: true
76+
code_paths:
77+
- test/tensorflow/integration/training/**
78+
6479
ray/unit:
6580
skip_eligible: true
6681
code_paths:

‎.github/workflows/tensorflow-training.pipeline.yml‎

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
with:
108108
config-file: ${{ inputs.config-file }}
109109
image-uri: ${{ needs.build.outputs.image-uri || '' }}
110-
suites: '["sanity", "telemetry", "efa"]'
110+
suites: '["sanity", "telemetry", "efa", "tensorflow-training/unit", "tensorflow-training/single_gpu", "tensorflow-training/sagemaker"]'
111111

112112
sanity-test:
113113
if: ${{ always() && !cancelled() && inputs.run-sanity-test && needs.build.result != 'failure' && fromJSON(needs.check.outputs.skips || '{}')['sanity'] != true }}
@@ -147,39 +147,56 @@ jobs:
147147
suite-code-hash: ${{ fromJSON(needs.check.outputs.suite-code-hashes || '{}')['telemetry'] || '' }}
148148

149149
unit-test:
150-
if: ${{ always() && !failure() && !cancelled() && inputs.run-unit-test }}
151-
needs: [build]
150+
if: >-
151+
${{ always() && !cancelled() && inputs.run-unit-test &&
152+
needs.build.result != 'failure' &&
153+
fromJSON(needs.check.outputs.skips || '{}')['tensorflow-training/unit'] != true }}
154+
needs: [build, check]
152155
concurrency:
153156
group: ${{ github.workflow }}-unit-test-${{ inputs.config-file }}-${{ github.ref }}
154157
cancel-in-progress: true
155158
uses: ./.github/workflows/tensorflow-training.tests-unit.yml
156159
with:
157160
config-file: ${{ inputs.config-file }}
158161
image-uri: ${{ needs.build.outputs.image-uri || '' }}
162+
image-content-hash: ${{ needs.check.outputs.image-content-hash }}
163+
suite-code-hash: ${{ fromJSON(needs.check.outputs.suite-code-hashes || '{}')['tensorflow-training/unit'] || '' }}
159164

160165
# Single-GPU tests — only for GPU images
161166
single-gpu-test:
162-
if: ${{ always() && !failure() && !cancelled() && inputs.run-single-gpu-test && needs.ci-config.outputs.device-type == 'gpu' }}
163-
needs: [build, ci-config]
167+
if: >-
168+
${{ always() && !cancelled() && inputs.run-single-gpu-test &&
169+
needs.ci-config.outputs.device-type == 'gpu' &&
170+
needs.build.result != 'failure' &&
171+
fromJSON(needs.check.outputs.skips || '{}')['tensorflow-training/single_gpu'] != true }}
172+
needs: [build, ci-config, check]
164173
concurrency:
165174
group: ${{ github.workflow }}-single-gpu-test-${{ inputs.config-file }}-${{ github.ref }}
166175
cancel-in-progress: true
167176
uses: ./.github/workflows/tensorflow-training.tests-single-gpu.yml
168177
with:
169178
config-file: ${{ inputs.config-file }}
170179
image-uri: ${{ needs.build.outputs.image-uri || '' }}
180+
image-content-hash: ${{ needs.check.outputs.image-content-hash }}
181+
suite-code-hash: ${{ fromJSON(needs.check.outputs.suite-code-hashes || '{}')['tensorflow-training/single_gpu'] || '' }}
171182

172183
# SageMaker integration tests — only for sagemaker images (TF DLC is SM-only)
173184
sagemaker-test:
174-
if: ${{ always() && !failure() && !cancelled() && inputs.run-sagemaker-test && needs.ci-config.outputs.customer-type == 'sagemaker' }}
175-
needs: [build, ci-config]
185+
if: >-
186+
${{ always() && !cancelled() && inputs.run-sagemaker-test &&
187+
needs.ci-config.outputs.customer-type == 'sagemaker' &&
188+
needs.build.result != 'failure' &&
189+
fromJSON(needs.check.outputs.skips || '{}')['tensorflow-training/sagemaker'] != true }}
190+
needs: [build, ci-config, check]
176191
concurrency:
177192
group: ${{ github.workflow }}-sagemaker-test-${{ inputs.config-file }}-${{ github.ref }}
178193
cancel-in-progress: true
179194
uses: ./.github/workflows/tensorflow-training.tests-sagemaker.yml
180195
with:
181196
config-file: ${{ inputs.config-file }}
182197
image-uri: ${{ needs.build.outputs.image-uri || '' }}
198+
image-content-hash: ${{ needs.check.outputs.image-content-hash }}
199+
suite-code-hash: ${{ fromJSON(needs.check.outputs.suite-code-hashes || '{}')['tensorflow-training/sagemaker'] || '' }}
183200

184201
# EFA tests — only for GPU EC2 images (2-node p4d NCCL+EFA all_reduce_perf)
185202
efa-test:

‎.github/workflows/tensorflow-training.tests-sagemaker.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ on:
1212
required: false
1313
type: string
1414
default: ""
15+
image-content-hash:
16+
required: false
17+
type: string
18+
default: ""
19+
suite-code-hash:
20+
required: false
21+
type: string
22+
default: ""
1523

1624
permissions:
1725
contents: read
@@ -88,3 +96,23 @@ jobs:
8896
-v \
8997
--image-uri "${{ needs.preflight.outputs.image-uri }}"
9098
fi
99+
100+
# Record a PASS row in the ci-images-table if the test passed.
101+
record-test-pass:
102+
if: >-
103+
${{ always() && !cancelled() && !failure() &&
104+
inputs.image-content-hash != '' && inputs.suite-code-hash != '' &&
105+
needs.sagemaker-test.result == 'success' }}
106+
needs: [sagemaker-test]
107+
runs-on:
108+
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
109+
fleet:default-runner
110+
buildspec-override:true
111+
steps:
112+
- uses: actions/checkout@v6
113+
- uses: ./.github/actions/record-test-pass
114+
with:
115+
suite: tensorflow-training/sagemaker
116+
image-content-hash: ${{ inputs.image-content-hash }}
117+
suite-code-hash: ${{ inputs.suite-code-hash }}
118+
ci-images-table-account-id: ${{ vars.CI_IMAGES_TABLE_ACCOUNT_ID }}

‎.github/workflows/tensorflow-training.tests-single-gpu.yml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ on:
1212
required: false
1313
type: string
1414
default: ""
15+
image-content-hash:
16+
required: false
17+
type: string
18+
default: ""
19+
suite-code-hash:
20+
required: false
21+
type: string
22+
default: ""
1523

1624
permissions:
1725
contents: read
@@ -22,6 +30,8 @@ jobs:
2230
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
2331
fleet:x86-g6xl-runner
2432
buildspec-override:true
33+
outputs:
34+
image-exists: ${{ steps.check.outputs.exists }}
2535
steps:
2636
- uses: actions/checkout@v6
2737

@@ -73,3 +83,24 @@ jobs:
7383
${CONTAINER_ID} \
7484
pytest /workdir/test/tensorflow/single_gpu/ -v
7585
docker kill ${CONTAINER_ID}
86+
87+
# Record a PASS row in the ci-images-table if the test passed.
88+
record-test-pass:
89+
if: >-
90+
${{ always() && !cancelled() && !failure() &&
91+
inputs.image-content-hash != '' && inputs.suite-code-hash != '' &&
92+
needs.single-gpu-test.result == 'success' &&
93+
needs.single-gpu-test.outputs.image-exists == 'true' }}
94+
needs: [single-gpu-test]
95+
runs-on:
96+
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
97+
fleet:default-runner
98+
buildspec-override:true
99+
steps:
100+
- uses: actions/checkout@v6
101+
- uses: ./.github/actions/record-test-pass
102+
with:
103+
suite: tensorflow-training/single_gpu
104+
image-content-hash: ${{ inputs.image-content-hash }}
105+
suite-code-hash: ${{ inputs.suite-code-hash }}
106+
ci-images-table-account-id: ${{ vars.CI_IMAGES_TABLE_ACCOUNT_ID }}

‎.github/workflows/tensorflow-training.tests-unit.yml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ on:
1212
required: false
1313
type: string
1414
default: ""
15+
image-content-hash:
16+
required: false
17+
type: string
18+
default: ""
19+
suite-code-hash:
20+
required: false
21+
type: string
22+
default: ""
1523

1624
permissions:
1725
contents: read
@@ -22,6 +30,8 @@ jobs:
2230
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
2331
fleet:default-runner
2432
buildspec-override:true
33+
outputs:
34+
image-exists: ${{ steps.check.outputs.exists }}
2535
steps:
2636
- uses: actions/checkout@v6
2737

@@ -72,3 +82,24 @@ jobs:
7282
${CONTAINER_ID} \
7383
pytest /workdir/test/tensorflow/unit/ -v
7484
docker kill ${CONTAINER_ID}
85+
86+
# Record a PASS row in the ci-images-table if the test passed.
87+
record-test-pass:
88+
if: >-
89+
${{ always() && !cancelled() && !failure() &&
90+
inputs.image-content-hash != '' && inputs.suite-code-hash != '' &&
91+
needs.unit-test.result == 'success' &&
92+
needs.unit-test.outputs.image-exists == 'true' }}
93+
needs: [unit-test]
94+
runs-on:
95+
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
96+
fleet:default-runner
97+
buildspec-override:true
98+
steps:
99+
- uses: actions/checkout@v6
100+
- uses: ./.github/actions/record-test-pass
101+
with:
102+
suite: tensorflow-training/unit
103+
image-content-hash: ${{ inputs.image-content-hash }}
104+
suite-code-hash: ${{ inputs.suite-code-hash }}
105+
ci-images-table-account-id: ${{ vars.CI_IMAGES_TABLE_ACCOUNT_ID }}

0 commit comments

Comments
 (0)