[RFC] Thoughts on on_init_start
and on_init_end
hooks
#10677
-
These hooks are called when trainer initialization begins and ends, before the model has been set, essentially allowing the user to modify the Trainer constructor. Should we be giving the user this much control over Trainer constructor? Are there scenarios where this is needed? Or can we deprecate these hooks? cc @ananthsub |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@carmocca @tchaton @awaelchli do you know how these hooks are used? Have you seen any examples of these being used by the community? These hooks go way way back, but I can't think of when they'd be needed given the user "owns" the Trainer initialization. It's also unclear when it seems a lot more straightforward to write this: trainer = Trainer(...)
run_all_my_fancy_logic_now(trainer)
# use the trainer here Let's discuss in #10894 |
Beta Was this translation helpful? Give feedback.
@carmocca @tchaton @awaelchli do you know how these hooks are used? Have you seen any examples of these being used by the community? These hooks go way way back, but I can't think of when they'd be needed given the user "owns" the Trainer initialization. It's also unclear when
on_init_start
actually happens: does that mean callbacks should be the first thing initialized?it seems a lot more straightforward to write this:
Let's discuss in #10894