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:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user