]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
refactor(reforcexy): remove uneeded check at frame stacking
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 15 Sep 2025 00:53:21 +0000 (02:53 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 15 Sep 2025 00:53:21 +0000 (02:53 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
ReforceXY/user_data/freqaimodels/ReforceXY.py

index 838ae51e2fee0524f43f7aafb1ec6ba369ae4412..12c4f3fe15ee36ed16aa0588b07e1c0268594dc5 100644 (file)
@@ -539,14 +539,6 @@ class ReforceXY(BaseReinforcementLearningModel):
                     action_masks_param = {"action_masks": _action_masks(position)}
 
             np_observation = observation.to_numpy(dtype=np.float32)
-            shape = getattr(self, "shape", None)
-            if shape and np_observation.shape != shape:
-                logger.error(
-                    "Frame shape mismatch: got %s expected %s",
-                    np_observation.shape,
-                    shape,
-                )
-                raise ValueError("Frame shape mismatch")
 
             frame_stacking = self.frame_stacking
             if frame_stacking and frame_stacking > 1: