Skip to content

Commit 875b117

Browse files
committed
Add GPU verification step to release workflow for enhanced training environment checks #42
1 parent 206ccc4 commit 875b117

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,34 @@ jobs:
6161
token: ${{ steps.app-token.outputs.token }}
6262
path: private-dataset
6363

64+
- name: Verify training GPU
65+
run: |
66+
echo "Python:"
67+
which python
68+
69+
echo "CUDA_VISIBLE_DEVICES:"
70+
echo "${CUDA_VISIBLE_DEVICES:-<not set>}"
71+
72+
nvidia-smi
73+
74+
python - <<'PY'
75+
import torch
76+
import transformers
77+
import accelerate
78+
79+
print("PyTorch:", torch.__version__)
80+
print("Transformers:", transformers.__version__)
81+
print("Accelerate:", accelerate.__version__)
82+
print("CUDA available:", torch.cuda.is_available())
83+
print("CUDA runtime:", torch.version.cuda)
84+
print("GPU count:", torch.cuda.device_count())
85+
86+
if torch.cuda.is_available():
87+
print("GPU:", torch.cuda.get_device_name(0))
88+
89+
assert torch.cuda.is_available(), "CUDA unavailable inside GitHub Actions"
90+
PY
91+
6492
- name: Train model
6593
run: |
6694
MAXLEN=${{ matrix.max_length }}

0 commit comments

Comments
 (0)