When the secret is present, base_train --run=smoke-$run_number gets logged to wandb (project=nanochat). Without the secret it falls back to dummy / DummyWandb, so local runs stay offline.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"sessionId":"4a346071-a4e3-48a9-a27b-18664473b257","pid":2237975,"procStart":"181416636","acquiredAt":1778014993773}
|
||||
@@ -19,4 +19,7 @@ jobs:
|
||||
- name: nvidia-smi
|
||||
run: nvidia-smi --query-gpu=name,memory.free,memory.used --format=csv
|
||||
- name: smoke
|
||||
env:
|
||||
WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }}
|
||||
CI_RUN_TAG: smoke-${{ github.run_number }}
|
||||
run: bash scripts/smoke.sh
|
||||
|
||||
+8
-1
@@ -16,6 +16,13 @@ export OMP_NUM_THREADS=1
|
||||
|
||||
mkdir -p "$CACHE_ROOT" "$NANOCHAT_BASE_DIR"
|
||||
|
||||
# wandb: real run if WANDB_API_KEY is set, otherwise fall back to dummy (DummyWandb).
|
||||
if [ -n "${WANDB_API_KEY:-}" ]; then
|
||||
RUN_TAG=${CI_RUN_TAG:-smoke-$(date +%Y%m%d-%H%M%S)}
|
||||
else
|
||||
RUN_TAG=dummy
|
||||
fi
|
||||
|
||||
if [ ! -d "$NANOCHAT_DIR" ]; then
|
||||
echo "Cloning nanochat into $NANOCHAT_DIR"
|
||||
git clone https://github.com/karpathy/nanochat.git "$NANOCHAT_DIR" \
|
||||
@@ -60,6 +67,6 @@ time python -m scripts.base_train \
|
||||
--core-metric-every=-1 \
|
||||
--sample-every=25 \
|
||||
--num-iterations=50 \
|
||||
--run=dummy
|
||||
--run="$RUN_TAG"
|
||||
|
||||
echo "=== smoke done ==="
|
||||
|
||||
Reference in New Issue
Block a user