More reasonable model replay tolerance (#33652)

pull/33653/head
Harald Schäfer 7 months ago committed by GitHub
parent 4490608e3c
commit ba7039785c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 28
      selfdrive/test/process_replay/model_replay.py

@ -112,16 +112,24 @@ if __name__ == "__main__":
'driverStateV2.dspExecutionTime' 'driverStateV2.dspExecutionTime'
] ]
if PC: if PC:
ignore += [ # TODO We ignore whole bunch so we can compare important stuff
'modelV2.laneLines.0.t', # like posenet with reasonable tolerance
'modelV2.laneLines.1.t', ignore += ['modelV2.acceleration.x',
'modelV2.laneLines.2.t', 'modelV2.position.x',
'modelV2.laneLines.3.t', 'modelV2.position.xStd',
'modelV2.roadEdges.0.t', 'modelV2.position.y',
'modelV2.roadEdges.1.t', 'modelV2.position.yStd',
] 'modelV2.position.z',
# TODO this tolerance is absurdly large 'modelV2.position.zStd',
tolerance = 2.0 if PC else None 'drivingModelData.path.xCoefficients',]
for i in range(3):
for field in ('x', 'y', 'v', 'a'):
ignore.append(f'modelV2.leadsV3.{i}.{field}')
ignore.append(f'modelV2.leadsV3.{i}.{field}Std')
for i in range(4):
for field in ('x', 'y', 'z', 't'):
ignore.append(f'modelV2.laneLines.{i}.{field}')
tolerance = .2 if PC else None
results: Any = {TEST_ROUTE: {}} results: Any = {TEST_ROUTE: {}}
log_paths: Any = {TEST_ROUTE: {"models": {'ref': BASE_URL + log_fn, 'new': log_fn}}} log_paths: Any = {TEST_ROUTE: {"models": {'ref': BASE_URL + log_fn, 'new': log_fn}}}
results[TEST_ROUTE]["models"] = compare_logs(cmp_log, log_msgs, tolerance=tolerance, ignore_fields=ignore) results[TEST_ROUTE]["models"] = compare_logs(cmp_log, log_msgs, tolerance=tolerance, ignore_fields=ignore)

Loading…
Cancel
Save