fix(constraints): consider numeric/datetime extreme value clipping#700
fix(constraints): consider numeric/datetime extreme value clipping#700
Conversation
There was a problem hiding this comment.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on January 17
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| high = df[self.high_column] | ||
| both_valid = low.notna() & high.notna() | ||
| violations = both_valid & (high < low) | ||
| df.loc[violations, self.high_column] = low[violations] |
There was a problem hiding this comment.
Clipping can be undone by constraint correction
Medium Severity
The _clip_to_training_bounds method clips high_column values to training bounds, then at lines 190-195 sets high = low if the clipping caused a constraint violation. When low_column values exceed the training max for high_column, this correction pushes high back outside the training bounds, effectively undoing the clipping. This can cause test assertions expecting values within bounds to fail in edge cases where the model generates extreme low_column values.
Note
Imposes training-bound clipping for Inequality constraints and wires workspace context through constraint translation and generation.
workspace_dirplumbed throughConstraintTranslatorand_create_constraint_handlertoInequalityHandlerInequalityHandlerto cliphigh_columnto training stats min/max viaWorkspace.tgt_statsfor both numeric and datetime; add helpers_extract_min_max_from_statsand_clip_to_training_boundsworkspace_dirand post-process synthetic parquet with the updated translatorELAPSED_TIMEandARRIVAL_TIME, relax strict mean-time check (commented) and require most time deltas within 2–3 hoursWritten by Cursor Bugbot for commit 8b41828. This will update automatically on new commits. Configure here.