[Feature Request] Allows registering custom trackers to internal tracker type registry #2734
Labels
enhancement
New feature or request
feature request
Request for a new feature to be added to Accelerate
Currently
accelerate
maintains an internal known tracker registryLOGGER_TYPE_TO_CLASS
, which is used for tracker initializing, filtering, among other things. However, this makes working with custom trackers annoying in user code. One such example is when initializing custom trackers, instead of something likeone has to write:
This is annoying in that users have to write many boilerplate code to manage the init args of both custom trackers and built-in trackers in one place. If the users can register their custom trackers into
LOGGER_TYPE_TO_CLASS
, it will be possible to initialize the custom trackers in the same (and uniform) way as the built-in trackers by:The API for registering custom trackers could be something like:
I have examined the source code, and there seems no obstacle in doing so, as long as the
GeneralTracker
protocol is obeyed by the custom trackers. To make sure of it, it may be beneficial to markGeneralTracker
as an abstract base class, though.The text was updated successfully, but these errors were encountered: