-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Description
From #28760 (comment) and #28760 (comment).
related to #27676
The current implementation requires that estimators used in meta-estimators can only have callbacks if the meta-estimator supports callbacks.
It may be a too strong requirement, or at least we need to define it properly, for user code.
A typical problematic use case is when several clones of an estimator are fitted in parallel in a user defined function (like a custom cross validation).
It implies in particular that we settle on the expected behavior of clone w.r.t callbacks.
An "easy" first step would be that clone discards the callbacks. Afterall callbacks are not constructor parameters strictly. With that callbacks would just be disabled for estimators used in non-callback-aware code. (it would be silent though)
Then we can investigate whether a second step where we don't impose that estimators within a meta estimator (or function that behaves like a meta-estimator) have their CallbackContext tree merged with the one of the parent estimator.
In such situations, the callbacks may not provide their full capabilities. For instance progress bars could not be displayed in a single rich live object with bars inserted dynamically and intuitive layout, but would pop one below the other.
ping @FrancoisPgm