logger¶
xiao_hei_vln.logger
¶
File-based VLM tick logger for post-run debugging and visualization.
Activated by setting XIAO_HEI_VLM_LOG_DIR. When active, every tick
writes one JSON line to a per-question ticks.jsonl, saves the
camera frame as a JPEG, and saves any available point-cloud arrays as
.npy files. A session.json is written once at startup.
Typical on-disk layout::
vlm_logs/
session_20260530_143022/
session.json
q_001_how_many_chairs/
ticks.jsonl
images/
tick_000003.jpg
pointclouds/
tick_000003_registered.npy
tick_000003_terrain_local.npy
q_002_find_the_red_cup/
ticks.jsonl
images/
tick_000007.jpg
VLMLogger
¶
Append-only per-session tick logger with per-question subdirectories.
attach_scene(scene)
¶
Bind a scene object whose .to_dict() is logged per tick.
Once attached, callers can omit the scene kwarg from
:meth:log_tick; the logger pulls a fresh snapshot via
scene.to_dict() for every record. Pass an explicit
scene to log_tick to override on a per-call basis.
Duck-typed — any object exposing a to_dict() -> dict
method works (no import of :class:SceneRepresentation here).
new_question(question_text)
¶
Open a new per-question subdirectory and JSONL file.
write_prediction(question_text, output)
¶
Append a final prediction for offline evaluation.