mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-10-01 06:03:43 +08:00
red diff ya know?
This commit is contained in:
@@ -90,12 +90,6 @@ class ModelState(ModelStateBase):
|
||||
elif shape[1] == buffer_history_len: # non20hz
|
||||
self.temporal_idxs_map[key] = np.arange(buffer_history_len)
|
||||
|
||||
# Set buffer and idx attributes for all temporal buffers
|
||||
for key in self.temporal_buffers:
|
||||
setattr(self, f"full_{key}", self.temporal_buffers[key])
|
||||
idxs = self.temporal_idxs_map.get(key, None)
|
||||
setattr(self, f"{key}_idxs", idxs)
|
||||
|
||||
@property
|
||||
def mlsim(self) -> bool:
|
||||
return bool(self.generation is not None and self.generation >= 11)
|
||||
|
||||
@@ -93,8 +93,8 @@ def test_buffer_shapes_and_indices(shapes, mode, apply_patches):
|
||||
state = ModelState(None)
|
||||
constants = DummyModelRunner(shapes).constants # because you can't run the dang thing locally
|
||||
for key in shapes:
|
||||
buf = getattr(state, f"full_{key}", None)
|
||||
idxs = getattr(state, f"{key}_idxs", None)
|
||||
buf = state.temporal_buffers.get(key, None)
|
||||
idxs = state.temporal_idxs_map.get(key, None)
|
||||
# Buffer shape logic
|
||||
if mode == 'split':
|
||||
expected_shape = (1, constants.FULL_HISTORY_BUFFER_LEN, shapes[key][2])
|
||||
|
||||
Reference in New Issue
Block a user