Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes rosetta tests from overwriting artifacts from upstream tests #282

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/_test_pax.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
description: Extra command line args to pass to test-pax.sh
default: ""
required: false
SUFFIX:
type: string
description: If provided, will append a suffix to the arfiact name. Helpful if re-running this reusable workflow to prevent clobbering of artifacts
default: ""
required: false
outputs:
TEST_STATUS:
description: 'Summary pass/fail value indicating if results from tests are acceptable'
Expand Down Expand Up @@ -64,7 +69,7 @@ jobs:
NODES=$(((TOTAL_TASKS+MAX_GPUS_PER_NODE-1)/MAX_GPUS_PER_NODE))
GPUS_PER_NODE=$((TOTAL_TASKS/NODES))

JOB_NAME=${GITHUB_RUN_ID}-${TEST_CASE_NAME}
JOB_NAME=${GITHUB_RUN_ID}-${TEST_CASE_NAME}${{ inputs.SUFFIX }}
LOG_FILE=/nfs/cluster/${JOB_NAME}.log
MODEL_PATH=/nfs/cluster/${JOB_NAME}
for var in IMAGE TEST_CASE_NAME TOTAL_TASKS NODES GPUS_PER_NODE JOB_NAME LOG_FILE MODEL_PATH; do
Expand Down Expand Up @@ -170,7 +175,7 @@ jobs:
shell: bash -x {0}
run: |
pip install pytest pytest-reportlog tensorboard
for i in ${GITHUB_RUN_ID}-*DP*TP*PP; do
for i in ${GITHUB_RUN_ID}-*DP*TP*PP${{ inputs.SUFFIX }}; do
SUBDIR=$(echo $i | cut -d'-' -f2)
mv $i/$SUBDIR* .
python3 .github/workflows/baselines/summarize_metrics.py $SUBDIR # create result json in baseline format
Expand Down Expand Up @@ -202,7 +207,7 @@ jobs:
ENDPOINT_FILENAME: 'pax-test-status.json'
PUBLISH: false
SCRIPT: |
EXIT_STATUSES="${GITHUB_RUN_ID}-*DP*TP*PP/*-status.json"
EXIT_STATUSES="${GITHUB_RUN_ID}-*DP*TP*PP${{ inputs.SUFFIX }}/*-status.json"
PASSED_TESTS=$(jq -r '. | select ((.state == "COMPLETED") and (.exitcode == "0")) | .state' $EXIT_STATUSES | wc -l)
FAILED_TESTS=$(jq -r '. | select ((.state != "COMPLETED") or (.exitcode != "0")) | .state' $EXIT_STATUSES | wc -l)
TOTAL_TESTS=$(ls $EXIT_STATUSES | wc -l)
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/_test_t5x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
description: Extra gin args to pass to test-t5x.sh
default: ""
required: false
SUFFIX:
type: string
description: If provided, will append a suffix to the arfiact name. Helpful if re-running this reusable workflow to prevent clobbering of artifacts
default: ""
required: false
outputs:
TEST_STATUS:
description: 'Summary pass/fail value indicating if results from tests are acceptable'
Expand Down Expand Up @@ -58,7 +63,7 @@ jobs:
run: |
IMAGE="$(echo ${{inputs.T5X_IMAGE}} | sed 's/\//#/')"
TEST_CASE_NAME=1P${{ matrix.N_GPU }}G
JOB_NAME=${GITHUB_RUN_ID}-${TEST_CASE_NAME}
JOB_NAME=${GITHUB_RUN_ID}-${TEST_CASE_NAME}${{ inputs.SUFFIX }}
LOG_FILE=/nfs/cluster/${JOB_NAME}.log
MODEL_PATH=/nfs/cluster/${JOB_NAME}
BATCH_SIZE=$((${{ inputs.BATCH_SIZE_PER_GPU }} * ${{ matrix.N_GPU }}))
Expand Down Expand Up @@ -277,7 +282,7 @@ jobs:
ENDPOINT_FILENAME: 't5x-test-completion-status.json'
PUBLISH: false
SCRIPT: |
EXIT_STATUSES="${GITHUB_RUN_ID}-*/*-status.json"
EXIT_STATUSES="${GITHUB_RUN_ID}-*[PG]*[GN]${{ inputs.SUFFIX }}/*-status.json"
PASSED_TESTS=$(jq -r '. | select ((.state == "COMPLETED") and (.exitcode == "0")) | .state' $EXIT_STATUSES | wc -l)
FAILED_TESTS=$(jq -r '. | select ((.state != "COMPLETED") or (.exitcode != "0")) | .state' $EXIT_STATUSES | wc -l)
TOTAL_TESTS=$(ls $EXIT_STATUSES | wc -l)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly-rosetta-pax-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
with:
PAX_IMAGE: ${{ needs.build.outputs.DOCKER_TAGS }}
EXTRA_TEST_ARGS: "--enable-te --additional-args \"--fdl.PACKED_INPUT=False\""
SUFFIX: "-rosetta"
secrets: inherit

publish-test:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly-rosetta-t5x-build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:
T5X_IMAGE: ${{ needs.build.outputs.DOCKER_TAGS }}
# Disable packing b/c rosetta-t5x images run with TE by default, and TE does not currently support packing
EXTRA_GIN_ARGS: "--gin.train/utils.DatasetConfig.pack=False --gin.train_eval/utils.DatasetConfig.pack=False"
SUFFIX: "-rosetta"
secrets: inherit

publish-t5x:
Expand Down
Loading