fix: restore DS_RD_SETTING auto-recovery thresholds after merge phase (#1431)#1433
Open
utsab345 wants to merge 1 commit into
Open
fix: restore DS_RD_SETTING auto-recovery thresholds after merge phase (#1431)#1433utsab345 wants to merge 1 commit into
utsab345 wants to merge 1 commit into
Conversation
Wrap the four merge-phase ExpGen call sites with a context manager (_disable_auto_recovery) that saves and restores DS_RD_SETTING.coding_fail_reanalyze_threshold and DS_RD_SETTING.consecutive_errors, so the auto-recovery logic in DataScienceRDLoop.record remains reachable after merge phase ends.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #1431 by ensuring temporary merge-phase overrides of
DS_RD_SETTING.coding_fail_reanalyze_thresholdandDS_RD_SETTING.consecutive_errorsare always restored after merge generation completes.What changed
DS_RD_SETTINGvalues usingtry/finally, ensuring restoration even if an exception occurs.Why
Previously, merge-phase execution permanently modified the process-wide
DS_RD_SETTINGsingleton:coding_fail_reanalyze_thresholdconsecutive_errorsBecause these values were never restored, the auto-recovery logic in
DataScienceRDLoop.record()became effectively disabled for the remainder of the process, causing failed coding iterations to continue retrying indefinitely instead of triggering the intended restart/reanalysis behavior.This change scopes the override to the duration of merge-phase execution only and restores the original behavior immediately afterward.
Testing
python -m py_compilepassed for the modified modules.test_import_modules) passed, including 299 subtests, confirming the modified modules import correctly.The 29 failing tests are pre-existing and unrelated to this change (API keys, Docker, Kaggle authentication, etc.).
Branch
fix/merge-phase-auto-recovery-restoreCommit
d211204Closes #1431.
📚 Documentation preview 📚: https://RDAgent--1433.org.readthedocs.build/en/1433/