Sync scripts to dataset volume
Browse files
scripts/__pycache__/smoke_l4.cpython-312.pyc
ADDED
|
Binary file (33.3 kB). View file
|
|
|
scripts/bootstrap_l4.sh
CHANGED
|
@@ -11,11 +11,11 @@ CORE=/tmp/venv_core
|
|
| 11 |
ALIGN=/tmp/venv_aligntune
|
| 12 |
|
| 13 |
if ! command -v uv >/dev/null 2>&1; then
|
| 14 |
-
pip install -q uv
|
| 15 |
fi
|
| 16 |
|
| 17 |
-
uv venv --system-site-packages "$CORE"
|
| 18 |
-
|
| 19 |
"transformers>=5.15,<5.22" \
|
| 20 |
"trl>=0.12,<1.15" \
|
| 21 |
"peft>=0.18,<1" \
|
|
@@ -33,8 +33,8 @@ uv pip install --python "$CORE/bin/python" \
|
|
| 33 |
"safetune==0.1.18" \
|
| 34 |
"auditkit==1.1.11"
|
| 35 |
|
| 36 |
-
uv venv --system-site-packages "$ALIGN"
|
| 37 |
-
|
| 38 |
"torchvision==0.28.0" \
|
| 39 |
"transformers>=5.15,<5.22" \
|
| 40 |
"peft>=0.18,<1" \
|
|
|
|
| 11 |
ALIGN=/tmp/venv_aligntune
|
| 12 |
|
| 13 |
if ! command -v uv >/dev/null 2>&1; then
|
| 14 |
+
pip install -q --break-system-packages uv
|
| 15 |
fi
|
| 16 |
|
| 17 |
+
uv venv --system-site-packages --seed "$CORE"
|
| 18 |
+
"$CORE/bin/pip" install --no-cache-dir \
|
| 19 |
"transformers>=5.15,<5.22" \
|
| 20 |
"trl>=0.12,<1.15" \
|
| 21 |
"peft>=0.18,<1" \
|
|
|
|
| 33 |
"safetune==0.1.18" \
|
| 34 |
"auditkit==1.1.11"
|
| 35 |
|
| 36 |
+
uv venv --system-site-packages --seed "$ALIGN"
|
| 37 |
+
"$ALIGN/bin/pip" install --no-cache-dir \
|
| 38 |
"torchvision==0.28.0" \
|
| 39 |
"transformers>=5.15,<5.22" \
|
| 40 |
"peft>=0.18,<1" \
|
scripts/run_l4_job.sh
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# Launch the Hour-1 L4 smoke test.
|
| 3 |
+
#
|
| 4 |
+
# Pre-baked image (preferred, requires the GHCR image to be public or HF Jobs
|
| 5 |
+
# to have registry credentials):
|
| 6 |
+
# USE_PREBAKED=1 bash scripts/run_l4_job.sh
|
| 7 |
+
#
|
| 8 |
+
# Fallback: stock PyTorch image + on-job bootstrap (installs the same two
|
| 9 |
+
# environments in /tmp). Costs ~$0.05 extra L4 time.
|
| 10 |
+
set -euo pipefail
|
| 11 |
+
|
| 12 |
+
if [[ "${USE_PREBAKED:-0}" == "1" ]]; then
|
| 13 |
+
IMAGE="ghcr.io/divyanshu-kumar14/zombie-weights-l4:latest"
|
| 14 |
+
CMD=(/opt/venv_core/bin/python /opt/zombie-weights/scripts/smoke_l4.py)
|
| 15 |
+
else
|
| 16 |
+
IMAGE="pytorch/pytorch:2.13.0-cuda12.6-cudnn9-runtime"
|
| 17 |
+
CMD=(bash /code/scripts/bootstrap_l4.sh)
|
| 18 |
+
fi
|
| 19 |
+
|
| 20 |
+
hf jobs run \
|
| 21 |
+
--flavor l4x1 \
|
| 22 |
+
--timeout 3600 \
|
| 23 |
+
--name "zw-smoke-$(date +%H%M)" \
|
| 24 |
+
-s HF_TOKEN \
|
| 25 |
+
-v hf://datasets/tony0014/zombie-weights-code:/code:ro \
|
| 26 |
+
"$IMAGE" "${CMD[@]}"
|