Load live FLM trial validation before the driving loop

This commit is contained in:
firestar5683
2026-10-30 19:51:36 -05:00
parent 64eba05e62
commit 24b3d17c58
3 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -137,11 +137,11 @@ class Controls:
from openpilot.starpilot.flm.live_trial_store import load_confirmed_history
self.global_learning = GlobalRuntime(self.CP, self.CI, self.LaC, confirmed_live_history=load_confirmed_history(self.params))
# Load optional capture code before publishing the first control command.
# Load optional capture and live-trial code before the first control command.
# Engagement must not compile/import replay and feedback modules in the loop.
if self.global_learning.descriptor is not None:
try:
for module in ('controller_replay', 'physical_input_observation', 'feedback_wire'):
for module in ('controller_replay', 'physical_input_observation', 'feedback_wire', 'live_trial_wire', 'live_tracking_response'):
importlib.import_module('openpilot.starpilot.flm.' + module)
except Exception:
self._discard_global_learning()
@@ -18,6 +18,8 @@ identity = sys.argv[1]
cp = interfaces[identity].get_non_essential_params(identity)
with controls_for(cp, 'standard', True) as controls:
before = set(sys.modules)
assert {'openpilot.starpilot.flm.' + name for name in
('live_trial_wire', 'live_tracking_response')} <= before, 'cold trial dependency left for active Controls'
for tick in range(30):
command, state = frame(controls, 400_000_000_000 + tick * 10_000_000, tick)
controls.publish(command, state)
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "3859ba9b1e2e03ab97c992fb59a88cb029558b0d3374fcf72fa4949260cd0b53", "schema_version": 1}
{"protected_inventory_sha256": "0cd90e4360c4ac51d61657f8ab32b534523b33df9481485c739f8c79fdb2c878", "schema_version": 1}