]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
chore: comments cleanup
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 14 Oct 2025 15:49:11 +0000 (17:49 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 14 Oct 2025 15:49:11 +0000 (17:49 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
ReforceXY/reward_space_analysis/reward_space_analysis.py
ReforceXY/reward_space_analysis/test_reward_space_analysis.py

index c7752c81dbbccd5b0a8224c42b323418120129d8..a5af37026be4cacbafe9e82916d85be61c12edeb 100644 (file)
@@ -2871,7 +2871,7 @@ def write_complete_statistical_analysis(
                 invariance_status = "❌ Non-canonical"
                 invariance_note = f"Total shaping = {total_shaping:.6f} (non-zero)"
 
-            # Summarize PBRS invariance (added explicit section)
+            # Summarize PBRS invariance
             f.write("**PBRS Invariance Summary:**\n\n")
             f.write("| Field | Value |\n")
             f.write("|-------|-------|\n")
@@ -3643,10 +3643,7 @@ def _compute_bi_component(
     transform_dur_key: str,
     non_finite_key: str,
 ) -> float:
-    """Generic helper for (pnl, duration) bi-component transforms.
-
-    Consolidates duplicated logic across hold potential & additives.
-    """
+    """Generic helper for (pnl, duration) bi-component transforms."""
     scale = _get_float_param(params, scale_key, 1.0)
     gain = _get_float_param(params, gain_key, 1.0)
     transform_pnl = _get_str_param(params, transform_pnl_key, "tanh")
index fadece40a7881f7a8586f1138b170010f7d98f26..0f8c6aeb7f7729e577fe1d46941f667372691a11 100644 (file)
@@ -72,7 +72,6 @@ except ImportError as e:
     sys.exit(1)
 
 
-# --- Helper factories (DRY for contexts and params) ---
 def base_params(**overrides) -> dict:
     """Return a fresh copy of DEFAULT_MODEL_REWARD_PARAMETERS with overrides applied.
 
@@ -1883,7 +1882,6 @@ class TestBoundaryConditions(RewardSpaceTestBase):
 
     def test_different_exit_attenuation_modes(self):
         """Test different exit attenuation modes (legacy, sqrt, linear, power, half_life)."""
-        # Use canonical constant (includes legacy) instead of hardcoded literals
         modes = ATTENUATION_MODES_WITH_LEGACY
 
         for mode in modes:
@@ -2681,7 +2679,6 @@ class TestRewardRobustness(RewardSpaceTestBase):
         """Exit factor must not be negative when pnl >= 0 (invariant clamp)."""
 
         params = self.DEFAULT_PARAMS.copy()
-        # Try multiple modes / extreme params
         # All canonical modes + legacy + synthetic plateau variant
         modes = list(ATTENUATION_MODES_WITH_LEGACY) + ["plateau_linear"]
         base_factor = self.TEST_BASE_FACTOR
@@ -3294,8 +3291,6 @@ class TestPBRSIntegration(RewardSpaceTestBase):
                 f"Missing PBRS parameter: {param}",
             )
 
-    # --- End of structural PBRS tests (legacy sum test removed) ---
-
     def test_pbrs_progressive_release_decay_clamped_zero_current(self):
         """progressive_release with decay>1 clamps to 1 (full release to 0).