Closed AntonioCarta closed 5 months ago
Hmm, this is not exactly what I imagined but I like the idea. So this would mean getting rid of the whole "plugin" system ?
Yes, I understand that it's not what you meant. I wrote it so that we can see both in a practical example and discuss them.
So this would mean getting rid of the whole "plugin" system ?
Not necessarily. We can keep them. But the idea is that users should be able to integrate Avalanche components without having to use avalanche strategies/plugins. Plugins are more powerful so they are still useful for as to develop more complex methods, and to integrate some things that don't fit a simple pre_update/post_update scheme (e.g. many metrics and loggers).
@AlbinSou to continue the discussion that we had on Monday, this is a pseudocode of what I imagined a "standalone" Avalanche strategy would be like. The idea is that the whole training loop must fit in a single file. Components (optimizer, dataloaders, losses, models) are all independent and composable. Components are updatable object that receive the strategy state and current experience only at predefined points. This mitigates the issue that many have with Avalanche strategies, that is having to navigate the template hierarchy to understand the training loop.
If we go in this direction, it is important to do it in a manner that is cheap to maintain without ending up with broken code over the next few releases (like it happened with many examples).
Some things will not be easily definable as simple "updatable" objects. This is fine, it just means that they will be more integrated in their training loop.
Let me know what you think. Of course we don't need to convert what we already have, this would be mostly to support usage of Avalanche together with other frameworks. For example, this would make it possible to use Avalanche in Lightning.