Get the script for a big stock file
inventory_optimizer_get_engineUse this when the stock file is big — more than about 200 products or 2,500 sales rows. It returns a ready-to-run Python script. Save the script exactly as given, run it in your sandbox against the user's file, and report what it prints. It only needs numpy. It prints the buying decisions and writes the full detail to inventory_optimizer_result.json. The data never leaves the user's machine on this route. Do not shorten, retype, summarise or rewrite the script, do not replace it with code of your own, and do not do the maths yourself. If you cannot run code, say so rather than working the numbers out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_of | No | ||
| currency | No | USD | |
| items_path | No | Path to items file (CSV/TSV/JSON) inside your sandbox. May be a combined stock+sales file when demand_path is omitted. | |
| demand_path | No | Optional path to demand history (sku, date, quantity). | |
| combined_path | No | Optional single stock+sales file. Loader splits before scoring; when set, overrides separate items/demand paths. | |
| purchase_budget | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | ||
| script | Yes | ||
| currency | No | ||
| language | No | ||
| requires | No | ||
| writes_file | No | ||
| instructions | Yes | ||
| code_integrity | Yes | ||
| engine_version | Yes | ||
| items_path_used | No | ||
| purchase_budget | No | ||
| demand_path_used | No | ||
| data_requirements | No | ||
| combined_path_used | No | ||
| network_access_required | No |