From 956277110d545af2c4f7caf6dbd5e6f93ac817c3 Mon Sep 17 00:00:00 2001 From: 1okko <15377594951@189.cn> Date: Wed, 21 Oct 2026 09:00:39 +0800 Subject: [PATCH] test: treat missing NNLC model data as no match (stage 3j) --- openpilot/sunnypilot/selfdrive/controls/lib/nnlc/helpers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openpilot/sunnypilot/selfdrive/controls/lib/nnlc/helpers.py b/openpilot/sunnypilot/selfdrive/controls/lib/nnlc/helpers.py index a5d56b1ff..b19fd2149 100644 --- a/openpilot/sunnypilot/selfdrive/controls/lib/nnlc/helpers.py +++ b/openpilot/sunnypilot/selfdrive/controls/lib/nnlc/helpers.py @@ -21,6 +21,10 @@ def similarity(s1: str, s2: str) -> float: def get_nn_model_path(CP: structs.CarParams) -> tuple[str, str, bool]: + # this fork does not ship the NNLC torque model data; treat it as no model match + if not os.path.isdir(TORQUE_NN_MODEL_PATH): + return "", "MOCK", False + car_fingerprint = CP.carFingerprint eps_fw = str(next((fw.fwVersion for fw in CP.carFw if fw.ecu == "eps"), ""))