You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reduce hit blend to 90/10 to cut noise and sync calibration across layers by reading live params from data/calibration_params.json. Adds a single script to audit/apply priority fixes and confirms no lookahead bias in the streak agent.
New Features
Added apply_priority_fixes.py with --audit and --fix N to apply/verify fixes (includes Marcel wiring, wind bearing support, and a streak audit).
Bug Fixes
Hit XGBoost blend 70/30 → 90/10 in xgb_k_layer (Brier 0.2668 > null 0.25).
calibration_layer reads lambda_bias, swstr_k9_scale, ump_scale from data/calibration_params.json.
generate_pick reads lambda_bias and prop_min_prob_overrides from the same file; keeps MIN_PROB as a global floor with per-prop overrides.
Written for commit a6580f1. Summary will update on new commits.
@jaayslaughter-cpu has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 33 seconds before requesting another review.
You’ve run out of usage credits. Purchase more in the billing tab.
⌛ How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.
We recommend that you space out your commits to avoid hitting the rate limit.
🚦 How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
We reviewed changes in 42b06e0...a6580f1 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
The reason will be displayed to describe this comment to others. Learn more.
Unused variable 'wind_read_pattern'
An unused variable takes up space in the code, and can lead to confusion, and it should be removed. If this variable is necessary, name the variable _ to indicate that it will be unused, or start the name with unused or _unused.
The reason will be displayed to describe this comment to others. Learn more.
Unused variable 'old_hourly'
An unused variable takes up space in the code, and can lead to confusion, and it should be removed. If this variable is necessary, name the variable _ to indicate that it will be unused, or start the name with unused or _unused.
The reason will be displayed to describe this comment to others. Learn more.
Reimport 'json' (imported line 23)
A module or an import name is reimported multiple times. This can be confusing and should be fixed.
Please refer to the occurrence message to see the reimported name and the line number where it was imported for the first time.
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer TIP This summary will be updated as you push new changes.
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces apply_priority_fixes.py, a script to automate several priority fixes across the PropIQ system, including model blend adjustments, Marcel layer integration, and calibration parameter synchronization. Updates were also applied to calibration_layer.py, generate_pick.py, and xgb_k_layer.py. Feedback points out several issues in the automation script: a regex mismatch using the wrong variable name for hit blends, a missing wind speed pattern, and imprecise string replacement logic that causes duplicated comments in the generated code.
The reason will be displayed to describe this comment to others. Learn more.
The regex pattern and the replacement string use the variable name raw_p, but the target file xgb_k_layer.py uses model_prob for the hit blend calculation. This mismatch will cause the script to fail to identify the pattern and, if it did match, it would introduce an undefined variable error.
The reason will be displayed to describe this comment to others. Learn more.
The wind_patterns list is missing the key "wind_speed_mph":, which is used in the current version of tasklets.py (line 1907). This will prevent the script from finding the correct insertion point for the wind bearing data extraction.
The reason will be displayed to describe this comment to others. Learn more.
The string replacement logic here is too broad. By replacing only the variable assignment part, it leaves the original trailing comment # hard floor intact in generate_pick.py, resulting in a messy, duplicated comment. It should target the full line including the original comment.
Suggested change
content=content.replace(
"MIN_PROB: float = 0.30",
"MIN_PROB: float = 0.30 # hard floor — per-prop overrides in _MIN_PROB_GPS"
)
if"MIN_PROB: float = 0.30 # hard floor"incontent:
content=content.replace(
"MIN_PROB: float = 0.30 # hard floor",
"MIN_PROB: float = 0.30 # hard floor — per-prop overrides in _MIN_PROB_GPS"
The reason will be displayed to describe this comment to others. Learn more.
This line contains a messy, duplicated comment (# hard floor) likely caused by an imprecise string replacement in the apply_priority_fixes.py script. It should be cleaned up for better readability.
Suggested change
MIN_PROB: float=0.30# hard floor — per-prop overrides in _MIN_PROB_GPS # hard floor
MIN_PROB: float=0.30# hard floor — per-prop overrides in _MIN_PROB_GPS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Priority Fixes — 3 changes + audit
Fix 1 — Hit blend 70/30 → 90/10 (
xgb_k_layer.py)Hit XGBoost Brier score 0.2668 > null 0.25 — model was adding noise. Reduced to 10% blend.
Fix 4 — Calibration layer sync (
calibration_layer.py)Now reads
data/calibration_params.jsonforlambda_bias=-0.15,swstr_k9_scale,ump_scale.Fix 5 — generate_pick.py calibration sync (
generate_pick.py)Same fix — adds
_MIN_PROB_GPSper-prop override dict from calibration_params.json.Fix 6 — Streak audit: no lookahead bias found ✅
Skipped (already done): Fix 2 (Marcel — PR #566), Fix 3 (wind bearing — already in tasklets.py)
Summary by cubic
Reduce hit blend to 90/10 to cut noise and sync calibration across layers by reading live params from data/calibration_params.json. Adds a single script to audit/apply priority fixes and confirms no lookahead bias in the streak agent.
New Features
apply_priority_fixes.pywith--auditand--fix Nto apply/verify fixes (includes Marcel wiring, wind bearing support, and a streak audit).Bug Fixes
lambda_bias,swstr_k9_scale,ump_scalefrom data/calibration_params.json.lambda_biasandprop_min_prob_overridesfrom the same file; keeps MIN_PROB as a global floor with per-prop overrides.Written for commit a6580f1. Summary will update on new commits.