问题 / #3613

#3613 [TUI] `strata launch` worked then, after a tune had been saved for this PC, every later launch failed

open · @richgoldberg · 4 评论 · 去 GitHub 看

BenchmarksSetup & installAMD / HIPLinux

说明

`strata launch` worked, then after a tune had been saved for this PC every later launch stopped at **Model › "Saving the model's settings"** with:

```
The model could not be installed. Run it again: finished steps are skipped.
```

Pressing `r` repeats it. The TUI shows no reason. Running the same setup step by hand shows it:

```
=== Step 7: writing the start script ===
  [ok] KV streaming on: ...
Traceback (most recent call last):
  File "...\Strata\terminal\0.1.46.3\setup.py", line 8919, in <module>
    sys.exit(main())
  File "...\Strata\terminal\0.1.46.3\setup.py", line 8864, in main
    import calibrate as CAL
ModuleNotFoundError: No module named 'calibrate'
```

**Cause:** the Terminal bundle does not ship `tools/calibrate.py`. `setup.py` imports it whenever `setup_calibration()` finds a saved calibration for this PC and model. Before the first tune nothing is saved and setup passes; once a tune has been saved, every launch fails. `packaging/package_terminal.py` leaves `calibrate` out of `INSTALLER_TOOLS`, and `main` still does today, so v0.2.2 most likely has the same problem. The Linux bundle uses the same list, so this may be what #3467 is seeing (same message, no reason shown).

**Workaround:** copy `tools/calibrate.py` from the commit in the bundle's `COMMIT` file (here `9de04cd`) into `<Strata>\terminal\<build>\tools\`, then launch again. With that file in place setup ends `[ok] the settings tuned for this PC earlier are used` and the model starts.

**Suggested fix:** add `"calibrate"` to `INSTALLER_TOOLS`. Two smaller things would also help:
- The launcher only shows a setup error when setup prints a line starting with `[X]`. A Python traceback is never shown, so the TUI says only "could not be installed". Showing the last traceback line would have made this a one-minute fix.
- A static check of the bundle found other `tools/` files that `setup.py` refers to but the bundle lacks: `image/qimage.py` (`--images`), `strata_bench.py` (the benchmark question at the end of interactive setup), `strata_inspect.py` (`--inspect`) and `nvfp4_local_pack.py` (NVFP4 models). `hip/dll_closure.py` is also missing but setup carries on without it. I did not run into these, so they are unconfirmed, but they would fail the same way.

本站相关内容

相关页面的快捷入口。