Repository navigation
v0.8.0.2
The agent feedback loop: results, background jobs, inspection, cost and history for scripts and AI agents (docs/08_agent_feedback.md). Still based on Google's Colab CLI 0.8.0, and includes everything from 0.8.0.1, whose release had no binaries attached.
Added
- run:
colab run --detachcreates the runtime, starts the script as a background job and returns at once; the runtime is kept untilcolab stop. - history: the CLI learns from earlier runs. A failure that happened before says so in its
--jsonrecord (diagnosis.seen_before), with what fixed it last time (packages installed, files uploaded, a code change).colab history errorslists recurring failures with their fixes;colab history stats [FILE]shows runs, success rate and the usual duration and cost of each file. History is read locally only; older history entries are used too. - inspect:
colab inspect -s NAME [--vars] [--gpu] [--disk] [--packages] [--files PATH] [--json]shows the kernel's variables by type and shape (never their values), GPU memory, disk, memory, and the packages installed since the first inspect. A busy kernel is reported instead of waited for. - cost:
--jsonresults andcolab job status --jsonestimate the compute units used, from the account's hourly rate.--budget CUonexec,runandjob startstops the run when the estimate reaches the budget (exit 5; a job is stopped on the runtime itself).colab usage --json. - job:
colab job start -s NAME -f train.py(or-- CMD) runs long work in the background on the runtime and returns at once;colab execstays usable meanwhile and the job keeps running without a connected client.colab job status|tail|wait|stop|listshow its state, tqdm progress, the metrics a Python job reports withfrom colab_feedback import report, the last output, a stall flag and, for a failed job, a diagnosis with next steps.waitkeeps the runtime alive and exits with the job's own code. - exec, run:
--jsonfor scripts and AI agents: one JSON record per cell and a summary on stdout, other output on stderr. A failed cell's record gives the failing line in your local file or notebook cell, a diagnosis code (missing_module,cuda_oom,no_gpu,disk_full,file_not_found,syntax_error,idle_timeout,session_lost, ...) and thecolabcommands to try next. Exit codes: 1 code error, 3 lost session, 4 timeout;runkeeps the script's own exit code.COLAB_CLI_JSON=1turns it on everywhere;colab exec --json-streamalso streams output as it arrives;--output-dirsets where images are saved.
Fixed
- ssh, job, run (Git Bash on Windows): remote paths in
colab ssh -- CMD,colab job start -- CMDandcolab runscript arguments are no longer rewritten toC:/Program Files/Git/.... - ssh (Linux): killing
colab(even with SIGKILL), or the launcher of the standalone binary, also ends ssh and its proxy.