fix(viz): remote log vars + avbody host param

Chantier 5 review: NameError on MULTIHMR_BACKEND=remote (LOG.info
referenced removed locals) and SMPLXTCPSender host param silently
ignored after the VizConfig migration (env-present check restores the
pre-migration contract).
This commit is contained in:
L'électron rare
2026-07-02 11:40:55 +02:00
parent 91b3923431
commit 8b08282aa5
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -582,7 +582,8 @@ class MultiHMRWorker:
backend = MultiHMRRemoteBackend(
host=_rc.multihmr_remote_host,
port=_rc.multihmr_remote_port)
LOG.info("Multi-HMR remote backend (%s:%d)", host, port)
LOG.info("Multi-HMR remote backend (%s:%d)",
_rc.multihmr_remote_host, _rc.multihmr_remote_port)
else:
from .multihmr_coreml import MultiHMRCoreMLBackend
backend = MultiHMRCoreMLBackend(COREML_MLPACKAGE)
+4 -1
View File
@@ -45,10 +45,13 @@ class SMPLXTCPSender:
def __init__(self, state: State, host: str = "127.0.0.1",
port: int = PORT, target_fps: float = 30.0,
enable_rigging: bool = True) -> None:
import os as _os
from .config import VizConfig as _VizConfig
_cfg = _VizConfig.from_env()
self.state = state
self.host = _cfg.avbody_host
# AVBODY_HOST env wins; otherwise honor the caller-supplied host
# (pre-VizConfig contract: environ.get("AVBODY_HOST", host)).
self.host = _cfg.avbody_host if "AVBODY_HOST" in _os.environ else host
self.port = port
self.period = 1.0 / max(1.0, target_fps)
self._stop = threading.Event()