[Callbacks] Rename propagate_callbacks into propagate_callback_context#33420
Merged
ogrisel merged 1 commit intoscikit-learn:callbacksfrom Mar 2, 2026
Merged
Conversation
jeremiedbb
commented
Feb 27, 2026
Comment on lines
+388
to
+394
| # We store the parent context in the sub-estimator to be able to merge the task | ||
| # trees of the sub-estimator and the meta-estimator. We want to link the task | ||
| # trees even if there is no callback to propagate, as the sub-estimators might | ||
| # have non auto-propagated callbacks, which would need to have access to the | ||
| # whole tree. | ||
| sub_estimator._parent_callback_ctx = self | ||
|
|
Member
Author
There was a problem hiding this comment.
this move is just a nitpick to have the definition of callbacks_to_propagate next to where it's used
ogrisel
approved these changes
Mar 2, 2026
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.
to be more explicit about what this method does because it propagates the context and the callbacks.
Extracted from #33340 because we decided to not couple propagate_callback_context and clone.
ping @lesteve @StefanieSenger