Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

tuning: the engine and worker a tuning sweep starts end with the sweep, however it ends

Niko1221e09733aa9df4
diff --git a/strata_control/tune_api.py b/strata_control/tune_api.py
index a15d65758..4952b0295 100644
--- a/strata_control/tune_api.py
+++ b/strata_control/tune_api.py
@@ -81,8 +81,9 @@ class ApiHarness:
self._log = tempfile.NamedTemporaryFile(prefix="strata-api-harness-", suffix=".log",
delete=False)
try:
- self._proc = subprocess.Popen(self._argv(), cwd=str(self.serve_dir), env=self.env,
- stdout=self._log, stderr=subprocess.STDOUT)
+ from serve import lifeline # the worker (and the engine under it) end with this process
+ self._proc = lifeline.popen(self._argv(), "worker", cwd=str(self.serve_dir), env=self.env,
+ stdout=self._log, stderr=subprocess.STDOUT)
except OSError as e:
raise MeasurementError(f"the worker could not be started: {e}") from e
diff --git a/strata_control/tune_engine.py b/strata_control/tune_engine.py
index e39cfe195..447e8bab5 100644
--- a/strata_control/tune_engine.py
+++ b/strata_control/tune_engine.py
@@ -430,8 +430,9 @@ class EngineHarness:
raise MeasurementError(f"the engine binary is not at {self.engine}")
started = time.monotonic()
try:
- self._proc = subprocess.Popen(
- self._argv(), cwd=str(self.cwd), env=self.env,
+ from serve import lifeline # the engine ends with this process, however this process ends
+ self._proc = lifeline.popen(
+ self._argv(), "engine", cwd=str(self.cwd), env=self.env,
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
text=True, bufsize=1)
except OSError as e: