[GH-ISSUE #4941] [Other] setup.py: machine-readable progress (--output jsonl) for a non-interactive model install #2272

Open
opened 2026-11-04 01:58:05 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @mikhashev on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4941

Area

[Other] (anything else, including setup and installation)

What do you want to do?

We run Strata as a supervised local engine inside another desktop app, on Strata v0.2.9 (Control 0.1.55, commit c62d5e3a). The app installs Control by its pinned archive and the engine with strata update --output jsonl; that part runs today and its jsonl progress works well for us.

The next step is installing the model for a user who has none, by the path setup.py describes for Strata Control (STRATA_CONTROL_INSTALL=1):

python setup.py --yes --no-start --family F --model M --data-dir D

with STRATA_INSTALL_DIR and STRATA_SETTINGS_FILE pointing into the app's own folder. This is the one install step with no machine-readable output, so the app would have to show download progress and errors to the user by parsing human text.

Would you accept an --output jsonl option for setup.py, in the style of strata update --output jsonl and strata models move --output jsonl? One JSON object per line on stdout, the human text unchanged on stderr or suppressed. Roughly:

  • {"schema_version": 1, "event": "step", "n": 3, "title": "…"}
  • {"schema_version": 1, "event": "progress", "file": "…", "done_bytes": …, "total_bytes": …}
  • {"schema_version": 1, "event": "warning", "message": "…"}
  • {"schema_version": 1, "event": "error", "message": "…", "hint": "…"}, before the existing non-zero exit
  • {"schema_version": 1, "event": "done", "run_config": "<absolute path to strata-<tag>.json>"}

Names and fields are only a suggestion; whatever matches your existing jsonl events is better. Exit codes can stay as they are.

A structured free-space refusal, {"schema_version": 1, "event": "error", "kind": "no_space", "free_bytes": …, "needed_bytes": …}, would also spare us parsing the refusal text.

What do you do today instead?

Nothing yet for the model step: users install the model by hand. Our plan without this option is to read the plain-text output, as tools/strata_mcp.py and strata_control/progress_words.py already do: the === Step N: … === headings, the [ok] / [!] / [X] lines and the \r-overwritten label: 1.20 / 5.04 GB (24%) line. That would work with v0.2.9, but any change of wording would break the parser silently. For the updater we already parse its exit-6 free-space message the same way.

What this is based on: reading setup.py, strata_cli/update_cmd.py and the two parsers above at c62d5e3a. We have not run setup.py from our app yet.

Happy to test a branch against our integration. Thank you for Strata.

Originally created by @mikhashev on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4941 ### Area [Other] (anything else, including setup and installation) ### What do you want to do? We run Strata as a supervised local engine inside another desktop app, on Strata v0.2.9 (Control 0.1.55, commit c62d5e3a). The app installs Control by its pinned archive and the engine with `strata update --output jsonl`; that part runs today and its jsonl progress works well for us. The next step is installing the model for a user who has none, by the path `setup.py` describes for Strata Control (`STRATA_CONTROL_INSTALL=1`): ``` python setup.py --yes --no-start --family F --model M --data-dir D ``` with `STRATA_INSTALL_DIR` and `STRATA_SETTINGS_FILE` pointing into the app's own folder. This is the one install step with no machine-readable output, so the app would have to show download progress and errors to the user by parsing human text. Would you accept an `--output jsonl` option for `setup.py`, in the style of `strata update --output jsonl` and `strata models move --output jsonl`? One JSON object per line on stdout, the human text unchanged on stderr or suppressed. Roughly: - `{"schema_version": 1, "event": "step", "n": 3, "title": "…"}` - `{"schema_version": 1, "event": "progress", "file": "…", "done_bytes": …, "total_bytes": …}` - `{"schema_version": 1, "event": "warning", "message": "…"}` - `{"schema_version": 1, "event": "error", "message": "…", "hint": "…"}`, before the existing non-zero exit - `{"schema_version": 1, "event": "done", "run_config": "<absolute path to strata-<tag>.json>"}` Names and fields are only a suggestion; whatever matches your existing jsonl events is better. Exit codes can stay as they are. A structured free-space refusal, `{"schema_version": 1, "event": "error", "kind": "no_space", "free_bytes": …, "needed_bytes": …}`, would also spare us parsing the refusal text. ### What do you do today instead? Nothing yet for the model step: users install the model by hand. Our plan without this option is to read the plain-text output, as `tools/strata_mcp.py` and `strata_control/progress_words.py` already do: the `=== Step N: … ===` headings, the `[ok]` / `[!]` / `[X]` lines and the `\r`-overwritten `label: 1.20 / 5.04 GB (24%)` line. That would work with v0.2.9, but any change of wording would break the parser silently. For the updater we already parse its exit-6 free-space message the same way. What this is based on: reading `setup.py`, `strata_cli/update_cmd.py` and the two parsers above at c62d5e3a. We have not run `setup.py` from our app yet. Happy to test a branch against our integration. Thank you for Strata.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2272
No description provided.