-
Notifications
You must be signed in to change notification settings - Fork 23
export HF_TOKEN for CI #462
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -339,12 +339,17 @@ jobs: | |
| - name: Run Examples | ||
| id: examples-tests | ||
| continue-on-error: true | ||
| env: | ||
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | ||
| run: | | ||
| docker exec te-runner bash -c "$(cat <<'EOF' | ||
| docker exec -e HF_TOKEN="$HF_TOKEN" te-runner bash -c "$(cat <<'EOF' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is docker command echoed in the log?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| #!/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')))" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Printing secret value is undesired
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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