Download set5/code/run_cls_cell.py from LamTNguyen/repa-representation-probing: direct link, hf CLI and curl.
- Browser
- Download file 937 Bytes
-
https://huggingface.co/datasets/LamTNguyen/repa-representation-probing/resolve/main/set5/code/run_cls_cell.py
- Command line
-
hf download hf://datasets/LamTNguyen/repa-representation-probing/set5/code/run_cls_cell.py
-
curl -L -o run_cls_cell.py https://huggingface.co/datasets/LamTNguyen/repa-representation-probing/resolve/main/set5/code/run_cls_cell.py
937 Bytes
| # Kernel cell (piped to `colab exec`): waits for the detached ImageNet preparation (data5.py val,train) to finish, then | |
| # runs run_pilot_cell.py's logic (pilot.py skips the depth units already marked done on Drive). Keeps the kernel busy. | |
| import subprocess | |
| import time | |
| PREP_LOG = "/content/set5/logs/inet_prep.log" | |
| def prep_running(): | |
| return subprocess.run(["pgrep", "-f", "data5.py val,train"], capture_output=True).returncode == 0 | |
| while prep_running(): | |
| last = subprocess.run(f"tail -n 1 {PREP_LOG}", shell=True, capture_output=True, text=True).stdout.strip() | |
| print(time.strftime("%H:%M:%S"), "[prep]", last[:160], flush=True) | |
| time.sleep(60) | |
| print(time.strftime("%H:%M:%S"), "prep ended:", subprocess.run(f"tail -n 3 {PREP_LOG}", shell=True, capture_output=True, | |
| text=True).stdout, flush=True) | |
| exec(open("/content/set5/code/run_pilot_cell.py").read()) | |