Skip to content
Merged
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
7 changes: 6 additions & 1 deletion .github/workflows/rocm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,17 @@ jobs:
- name: Run Examples
id: examples-tests
continue-on-error: true
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the token is not accessible, will it just get empty string or throw an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be an empty string: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-secrets#using-secrets-in-a-workflow

If a secret has not been set, the return value of an expression referencing the secret (such as ${{ secrets.SuperSecret }} in the example) will be an empty string.

run: |
docker exec te-runner bash -c "$(cat <<'EOF'
docker exec -e HF_TOKEN="$HF_TOKEN" te-runner bash -c "$(cat <<'EOF'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is docker command echoed in the log?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker command itself is part of the log, but the token value is not echoed: https://productionresultssa19.blob.core.windows.net/actions-results/c226dddb-5f82-4c0d-b1fc-9d6a13e6dded/workflow-job-run-6aa7f3d9-cf79-5c75-a431-db178093cdd2/logs/job/job-logs.txt?rsct=text%2Fplain&se=2026-02-26T19%3A28%3A52Z&sig=WcVcyZzjaFHyOKzn1edEqhyTyP8uodx7xJChWN2gcWI%3D&ske=2026-02-26T22%3A41%3A33Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2026-02-26T18%3A41%3A33Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-11-05&sp=r&spr=https&sr=b&st=2026-02-26T19%3A18%3A47Z&sv=2025-11-05

2026-02-26T16:55:04.8279218Z ##[group]Run docker exec -e HF_TOKEN="$HF_TOKEN" te-runner bash -c "$(cat <<'EOF'
2026-02-26T16:55:04.8279548Z �[36;1mdocker exec -e HF_TOKEN="$HF_TOKEN" te-runner bash -c "$(cat <<'EOF'�[0m
2026-02-26T16:55:04.8279734Z �[36;1m#!/usr/bin/bash�[0m
2026-02-26T16:55:04.8279852Z �[36;1mset -ex -o pipefail�[0m
2026-02-26T16:55:04.8279987Z �[36;1mulimit -c 0 # Disable core dumps�[0m
2026-02-26T16:55:04.8280127Z �[36;1m�[0m
2026-02-26T16:55:04.8280235Z �[36;1m# Check whether the HF_TOKEN is present�[0m
2026-02-26T16:55:04.8280446Z �[36;1mpython -c "import os; print('HF_TOKEN set:', bool(os.environ.get('HF_TOKEN')))"�[0m
2026-02-26T16:55:04.8280639Z �[36;1m�[0m
2026-02-26T16:55:04.8280748Z �[36;1mcd /workspace/examples/pytorch/mnist�[0m
2026-02-26T16:55:04.8281011Z �[36;1mpython main.py 2>&1 | tee /workspace/examples.log�[0m
2026-02-26T16:55:04.8281210Z �[36;1mpython main.py --use-te 2>&1 | tee -a /workspace/examples.log�[0m
2026-02-26T16:55:04.8281444Z �[36;1mpython main.py --use-fp8 2>&1 | tee -a /workspace/examples.log�[0m
2026-02-26T16:55:04.8281608Z �[36;1m�[0m
2026-02-26T16:55:04.8281704Z �[36;1mcd /workspace/examples/jax/mnist�[0m
2026-02-26T16:55:04.8281845Z �[36;1mpip3 install -r requirements.txt�[0m
2026-02-26T16:55:04.8282030Z �[36;1mpython test_single_gpu_mnist.py 2>&1 | tee -a /workspace/examples.log�[0m
2026-02-26T16:55:04.8282281Z �[36;1mpython test_single_gpu_mnist.py --use-te 2>&1 | tee -a /workspace/examples.log�[0m
2026-02-26T16:55:04.8282546Z �[36;1mpython test_single_gpu_mnist.py --use-fp8 2>&1 | tee -a /workspace/examples.log�[0m
2026-02-26T16:55:04.8282739Z �[36;1m�[0m
2026-02-26T16:55:04.8282841Z �[36;1mcd /workspace/examples/jax/encoder�[0m
2026-02-26T16:55:04.8282978Z �[36;1mpip3 install -r requirements.txt�[0m
2026-02-26T16:55:04.8283166Z �[36;1mpython test_single_gpu_encoder.py 2>&1 | tee -a /workspace/examples.log�[0m
2026-02-26T16:55:04.8283425Z �[36;1mpython test_single_gpu_encoder.py --use-fp8 2>&1 | tee -a /workspace/examples.log�[0m
2026-02-26T16:55:04.8283620Z �[36;1mEOF�[0m
2026-02-26T16:55:04.8283709Z �[36;1m)"�[0m
2026-02-26T16:55:04.8289538Z shell: /usr/bin/bash -e {0}
2026-02-26T16:55:04.8289656Z env:
2026-02-26T16:55:04.8289744Z   TEST_LEVEL: 1
2026-02-26T16:55:04.8290157Z   HF_TOKEN: ***
2026-02-26T16:55:04.8290256Z ##[endgroup]
2026-02-26T16:55:04.8837538Z + ulimit -c 0
2026-02-26T16:55:04.8837782Z + python -c 'import os; print('\''HF_TOKEN set:'\'', bool(os.environ.get('\''HF_TOKEN'\'')))'
2026-02-26T16:55:04.8917423Z HF_TOKEN set: True

#!/usr/bin/bash
set -ex -o pipefail
ulimit -c 0 # Disable core dumps

# Check whether the HF_TOKEN is present
python -c "import os; print('HF_TOKEN set:', bool(os.environ.get('HF_TOKEN')))"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Printing secret value is undesired

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not printing the value, just true/false.


cd /workspace/examples/pytorch/mnist
python main.py 2>&1 | tee /workspace/examples.log
python main.py --use-te 2>&1 | tee -a /workspace/examples.log
Expand Down