colab_execute
Execute Python code on a Google Colab GPU runtime (T4 or L4) and receive structured JSON with cell output, errors, and stderr. Allocates GPU on demand without local hardware.
Instructions
Execute Python code on a Google Colab GPU runtime.
Allocates a T4 or L4 GPU, runs the code, and returns structured JSON with per-cell output, errors, and stderr.
Args: code: Python code to execute on the Colab GPU runtime. accelerator: GPU type — "T4" (free-tier) or "L4" (premium). Default: "T4". timeout: Max execution time in seconds. Default: 300.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| accelerator | No | T4 | |
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |