From 1b256f62041f2b04c7f91d9e2e9e5919f4fa2b7a Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Tue, 7 Jan 2025 16:18:17 -0500 Subject: [PATCH] remove this for now --- selfdrive/modeld/modeld.py | 2 +- selfdrive/modeld/parse_model_outputs.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/selfdrive/modeld/modeld.py b/selfdrive/modeld/modeld.py index f24d03203e..07a3920470 100755 --- a/selfdrive/modeld/modeld.py +++ b/selfdrive/modeld/modeld.py @@ -106,7 +106,7 @@ class ModelState: # Run model inference self.output = self.model_runner.run_model() - outputs = self.parser.parse_outputs(self.model_runner.slice_outputs(self.output), self.numpy_inputs.keys()) + outputs = self.parser.parse_outputs(self.model_runner.slice_outputs(self.output)) if self.is_20hz: self.full_features_20Hz[:-1] = self.full_features_20Hz[1:] diff --git a/selfdrive/modeld/parse_model_outputs.py b/selfdrive/modeld/parse_model_outputs.py index b445ca16e1..8d8ee96243 100644 --- a/selfdrive/modeld/parse_model_outputs.py +++ b/selfdrive/modeld/parse_model_outputs.py @@ -84,7 +84,7 @@ class Parser: outs[name] = pred_mu_final.reshape(final_shape) outs[name + '_stds'] = pred_std_final.reshape(final_shape) - def parse_outputs(self, outs: dict[str, np.ndarray], input_keys: [str]) -> dict[str, np.ndarray]: + def parse_outputs(self, outs: dict[str, np.ndarray]) -> dict[str, np.ndarray]: """ Parse the model outputs into a dictionary of numpy arrays. The input_keys are used to determine how the output should be parsed. """ self.parse_mdn('plan', outs, in_N=ModelConstants.PLAN_MHP_N, out_N=ModelConstants.PLAN_MHP_SELECTION, out_shape=(ModelConstants.IDX_N,ModelConstants.PLAN_WIDTH)) @@ -97,7 +97,7 @@ class Parser: out_shape=(ModelConstants.LEAD_TRAJ_LEN,ModelConstants.LEAD_WIDTH)) if 'lat_planner_solution' in outs: self.parse_mdn('lat_planner_solution', outs, in_N=0, out_N=0, out_shape=(ModelConstants.IDX_N,ModelConstants.LAT_PLANNER_SOLUTION_WIDTH)) - if 'desired_curvature' in outs and "prev_desired_curv" in input_keys: + if 'desired_curvature' in outs: self.parse_mdn('desired_curvature', outs, in_N=0, out_N=0, out_shape=(ModelConstants.DESIRED_CURV_WIDTH,)) for k in ['lead_prob', 'lane_lines_prob', 'meta']: self.parse_binary_crossentropy(k, outs)