Skip to content

Commit

Permalink
Use run_id and attempt.
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 committed Jun 7, 2024
1 parent 7e2b7ca commit 9dee985
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/torchao.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,14 @@ jobs:
sudo nvidia-smi -ac 1215,1410
nvidia-smi
sudo ldconfig
- name: Check workflow ID env
env:
WORKFLOW_RUN_ID: ${{ github.run_id }}
WORKFLOW_RUN_ATTEMPT: ${{ github.run_attempt }}
run: |
if [ -z "${WORKFLOW_RUN_ID}" ]; then
echo "WORKFLOW_RUN_ID is unset or set to the empty string"
echo ${{ github.run_id }}
exit 1
fi
if [ -z "${WORKFLOW_RUN_ATTEMPT}" ]; then
echo "WORKFLOW_RUN_ATTEMPT is unset or set to the empty string"
echo ${{ github.run_attempt }}
exit 1
fi
- name: Clone and setup conda env
run: |
CONDA_ENV=${BASE_CONDA_ENV} . "${SETUP_SCRIPT}"
conda create --name "${CONDA_ENV}" --clone "${BASE_CONDA_ENV}"
- name: Run the torchao userbenchmark
env:
WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }}
WORKFLOW_RUN_ATTEMPT: ${{ github.event.workflow_run.run_attempt }}
WORKFLOW_RUN_ID: ${{ github.run_id }}
WORKFLOW_RUN_ATTEMPT: ${{ github.run_attempt }}
run: |
. "${SETUP_SCRIPT}"
set -x
Expand All @@ -79,8 +64,8 @@ jobs:
path: benchmark-output/
- name: Copy artifact and upload to scribe and Amazon S3
env:
WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }}
WORKFLOW_RUN_ATTEMPT: ${{ github.event.workflow_run.run_attempt }}
WORKFLOW_RUN_ID: ${{ github.run_id }}
WORKFLOW_RUN_ATTEMPT: ${{ github.run_attempt }}
run: |
. "${SETUP_SCRIPT}"
pushd benchmark
Expand Down

0 comments on commit 9dee985

Please sign in to comment.