get_code
Retrieve the Python script and required packages for a forecasting plan, cross-validation strategy, backtest, forecast, or comparison, including a specified candidate.
Instructions
Return the Python script of an object and the packages it needs: the one that ran, or that would run for a plan (a profile has none). For a run that failed, use get_failure.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"object_id": "<object_id>"
},
"name": "get_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| candidate | No | For a comparison, the candidate whose script to return. Null for the best one. | |
| object_id | Yes | Id of a plan (its forecasting script), a cross-validation strategy (the code that builds it), a backtest, a forecast or a comparison (the script that ran). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| code | Yes | ||
| kind | Yes | ||
| files | No | ||
| candidate | No | ||
| requirements | No | ||
| code_truncated | No |