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:
+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