NNLC: bump max similarity for higher accuracy (#704)

Update helpers.py

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
This commit is contained in:
royjr
2025-03-23 16:04:12 -04:00
committed by GitHub
parent a307a08591
commit 96d73fe2b3
@@ -46,10 +46,10 @@ def get_nn_model_path(CP: structs.CarParams) -> tuple[str, str, bool]:
exact_match = max_similarity >= 0.99
if car_fingerprint not in model_path or 0.0 <= max_similarity < 0.8:
if car_fingerprint not in model_path or 0.0 <= max_similarity < 0.9:
nn_candidate = car_fingerprint
model_path, max_similarity = check_nn_path(nn_candidate)
if 0.0 <= max_similarity < 0.8:
if 0.0 <= max_similarity < 0.9:
with open(TORQUE_NN_MODEL_SUBSTITUTE_PATH, 'rb') as f:
sub = tomllib.load(f)
sub_candidate = sub.get(car_fingerprint, car_fingerprint)