From c22f58dae371128ab1fd546b06742e2a0108dc7e Mon Sep 17 00:00:00 2001 From: discountchubbs Date: Sat, 1 Aug 2026 15:15:54 -0700 Subject: [PATCH] lint be crazy now, man i've been away a while --- openpilot/sunnypilot/modeld_v2/compile_modeld.py | 4 ++-- openpilot/sunnypilot/modeld_v2/parse_model_outputs_split.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openpilot/sunnypilot/modeld_v2/compile_modeld.py b/openpilot/sunnypilot/modeld_v2/compile_modeld.py index 456fa224df..006ea6352b 100755 --- a/openpilot/sunnypilot/modeld_v2/compile_modeld.py +++ b/openpilot/sunnypilot/modeld_v2/compile_modeld.py @@ -179,11 +179,11 @@ def compile_and_warmup(nv12: NV12Frame, model_size: tuple[int, int], prepare_onl queues, npy_arrays = generate_queues_and_npy(all_shapes, frame_skip, Device.DEFAULT) for i in range(3): - np.random.default_rng(seed=(42 + i)) + rng = np.random.default_rng(42 + i) frame = Tensor.randint(nv12.size, low=0, high=256, dtype=dtypes.uint8, device=WARP_DEV).realize() big_frame = Tensor.randint(nv12.size, low=0, high=256, dtype=dtypes.uint8, device=WARP_DEV).realize() for arr in npy_arrays.values(): - arr[:] = np.random.randn(*arr.shape).astype(arr.dtype) + arr[:] = rng.standard_normal(arr.shape).astype(arr.dtype) Device.default.synchronize() start_time = time.perf_counter() diff --git a/openpilot/sunnypilot/modeld_v2/parse_model_outputs_split.py b/openpilot/sunnypilot/modeld_v2/parse_model_outputs_split.py index f0e13735eb..3db47aee42 100644 --- a/openpilot/sunnypilot/modeld_v2/parse_model_outputs_split.py +++ b/openpilot/sunnypilot/modeld_v2/parse_model_outputs_split.py @@ -65,6 +65,7 @@ class Parser: weights[fidx] = weights[fidx][idxs] pred_mu[fidx] = pred_mu[fidx][idxs] pred_std[fidx] = pred_std[fidx][idxs] + assert out_shape is not None full_shape = tuple([raw.shape[0], in_N] + list(out_shape)) outs[name + '_weights'] = weights outs[name + '_hypotheses'] = pred_mu.reshape(full_shape)