Sources¶
Use these sources to check the operational references when a version-sensitive behavior matters. Facts marked as observed were reported from Colab runs on the dates shown; they have no published trace here and were not repeated during the instruction review. They do not establish a failure rate, lifetime, or teardown guarantee for a new runtime.
colab CLI¶
- googlecolab/google-colab-cli and google-colab-cli on PyPI: the
colabcommand, its subcommands, and thecolab exec --timeoutdefault of 30 seconds, also shown bycolab exec --help. - Installed Colab CLI 0.7.4 help and source checked on 2026-10-09:
colab versionis a subcommand;colab status -s NAMEprints[NAME] ENDPOINT | ... | Status: IDLEorStatus: BUSY (<running>);colab execwrites and clears the localrunningfield around execution; andcolab stop -s NAMEresolves the stored session by name before unassigning its endpoint. Eachstatuscommand callssync_sessions(), which can write a stale local snapshot back withStateStore.add(); the watchdog therefore uses the launcher-ownedcolab execchild PID for busy/idle and uses status only to confirm the named endpoint. A hard-killed client can leave a staleBUSYmarker becauseexec'sfinallyblock does not run.colab newreceives the assignment and endpoint beforeStateStore.add()writes local state; the launcher's temporarysitecustomizehook records the full session just before that write so the watchdog can recover it if the write fails. If the CLI exits after server assignment but before the hook records the endpoint, the watchdog cannot safely stop it;colab sessionsshows unrecorded assignments as[?], andcolab stopcannot resolve them by name. The job must sync checkpoints to durable storage. - Google Developers Blog: Introducing the Google Colab CLI: describes CLI provisioning, remote execution, artifact recovery, and cleanup in one workflow.
- googlecolab/google-colab-cli#147: sessions were pruned as lost when the runtime-proxy token expired after about an hour while the VM stayed assigned, producing orphaned assignments. Fixed by googlecolab/google-colab-cli#149, released in 0.7.4.
- googlecolab/google-colab-cli#144 and the maintainer comment in googlecolab/google-colab-cli#160: without background execution, the backend keeps a runtime by kernel activity and live connections, and the client keep-alive ping does not extend it.
- googlecolab/google-colab-cli#82: a long
colab exectimeout that is exceeded can spin a local CPU core indefinitely. - colab_cli/client.py:
Client.list_assignments()andClient.unassign(endpoint)access assignments for the account. Local CLI records do not prove ownership of every account assignment; the sweeper compares them with those assignments. - With jupyter-kernel-client 0.8.0 installed, google-colab-cli 0.7.2 kernel commands fail with
AttributeError: module 'jupyter_kernel_client' has no attribute 'JupyterSubprotocol': observed. - A live smoke test of
scripts/colab-job.shon a CPU runtime with colab CLI 0.7.4 and a fine-grained token for one Hub repository: the first upload, a 20-second sync loop, the final upload, and self-release worked,list_assignments()was empty about 20 seconds after release, and the wrapper's output from a!line sent withcolab exec -freached the local client. Afterwards the local session record and the sweeper lease remained untilcolab sessionsprintedPruned 1 stale local session(s).: observed. - On 2026-10-03 with Colab CLI 0.7.4, a separate post-wrapper
colab execcall to list Hub artifacts failed because/content/hf-tokenhad been consumed before the job started. The listing succeeded after uploading a fresh restricted token file from a temporary local file, deleting the local copy, and removing the VM copy afterward: observed. colab execcalls failed with read timeouts or hung before reaching the kernel during an A100 run: observed. No sample size or repeatable failure-rate measurement is available here.colab runsignal handling and websocket teardown: observed behavior of the CLI, reported with the task that produced this skill.
Colab runtime¶
- Colab FAQ: runtimes have a maximum lifetime, background execution is a Pro+ feature, and the usage limits are not published and vary.
- google/colab/runtime.py:
google.colab.runtime.unassign()posts tohttp://${TBE_RUNTIME_ADDR}/unassign, which the job wrapper's self-release reproduces. TBE_RUNTIME_ADDRis set in a kernel started through colab CLI 0.7.4 (172.28.0.1:8011on a CPU runtime): observed.colab drivemounton a fresh session printed a new OAuth consent URL (redirecting to/tun/m/authorize-for-drive-credentials-ephem) and waited for Enter; without a human it did not mount: observed.- Colab presets
UV_SYSTEM_PYTHON=true,UV_INSTALL_DIR=/usr/local/bin,PYTHONPATH=/env/python, and emptyUV_CONSTRAINTandUV_BUILD_CONSTRAINT;uv run pytestfell back to the system pytest when the project environment lacked it: observed. - With Colab CLI 0.7.4, a project uv environment lacking
matplotlib_inlineinheritedMPLBACKEND=module://matplotlib_inline.backend_inlineand raisedValueErrorduring a matplotlib import through Lightning on 2026-10-02 (CPU) and 2026-10-04 (A100): observed. - On 2026-10-02 (CPU), setting
MPLBACKEND=Aggwas followed by a regenerated run that completed: observed. - On 2026-10-04 (A100), unsetting
MPLBACKENDwas followed by a run that passed package import, the training loop, and the original validation/evaluate smoke: observed. - The A100 runtime was an A100-SXM4-40GB with driver 580.82.07 and CUDA 13.0 on Ubuntu 24.04, with 12 vCPUs, 83 GB of RAM, and about 194 GB free under
/content; the firstuv syncwith torch took about 40 seconds: observed. - CUDA 12 NVIDIA wheels from a TensorFlow install overwrote
libnccl.so.2of CUDA 13 torch in the same environment: observed.
Hugging Face Hub¶
- Upload files to the Hub: upload methods and their different retry, background, and commit behavior. The wrapper uses
hf upload; do not assume every upload method has the same behavior. - HfApi reference:
HfApi.delete_folderandHfApi.super_squash_history. - Storage limits: private storage is 100 GB on a free account and 1 TB on PRO, super-squash is destructive and reaches the quota within 36 hours, and overwritten LFS files keep using storage until history is rewritten.
hf upload --helpandhf download --help(huggingface_hub 2.1.1):--repo-type,--private,--quiet,--include, and--local-dir.
uv¶
- uv installation: the official installer.
- uv environment variables:
UV_SYSTEM_PYTHONmakes uv use the system interpreter.
Lightning¶
- ModelCheckpoint:
save_lastandtrain_time_interval. - checkpoint_connector.py:
ckpt_path="last"resumes from the newest last checkpoint and, when none exists, warns and starts without one.
Instruction design¶
- Rethinking skills and prompts for GPT-6 Astra: use a precise description, load operational details only when needed, retain concrete constraints, and define completion without imposing a fixed itinerary. The entrypoint applies these principles while the runtime-specific procedures remain in references.