[Feature Request] Allow user defined events to be added to Engine
See original GitHub issueThis one is more of a long shot. Today ignite provides two nested loops (epochs and batchs) with a custom callback callback function.
In some case however it requires more than two loops. For instance, in truncated backpropagation through time, one iterates over, epochs, then batches, then over time.
Another example I’m thinking about (without adding loops) is for someone working on optimization. Such a person may want to add an event between the loss.backward()
and optim.step()
and then swap different handles in their work without having to care bout the rest of the training loop.
One can have workarounds for both these examples, but I think it is valuable to have some way to let the user add some more loops and more events. I believe being very modular will let researchers more easily separate their code between what they are working on, and what is left untouched.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
@alykhantejani I’d be happy to try something 😃
Well, why do we need events in the first place? They allow for modular and reusable code. Custom events would let contrib code present the same type of API as core ignite.
Ideally I was imagining a user interface like this: