trace_script
Run an unchanged Python script with tracing enabled to record calculations and source coordinates, returning a tape ID for inspection or replay at new inputs.
Instructions
Run a Python script with tracing on and keep the record (tape) it leaves. The script needs no changes: it runs in its own directory with AADC_TRACE=1, so every calculation through aadc types or an AADC-built library such as aadc-quantlib-tracing is recorded with its source coordinates. Returns tape_id, the script's stdout and stderr, the engine's census (frozen branch sites, outputs) and stats. A script that records itself and ends with f.save_tape() writes to AADC_TRACE_OUT; mark its first line with 'mode=explicit'. outputs: optional AADC_TRACE_OUTPUTS entries, e.g. ['value=123.45'] or ['pricer.py:42'], to name the program's results on the tape. python: another interpreter to run under (the one where the user's packages live). This runs the user's own code on the user's own machine; it is not a sandbox.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| path | Yes | ||
| python | No | ||
| outputs | No | ||
| workdir | No | ||
| timeout_s | No |