Adding new pruners #148
Unanswered
eldarkurtic
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hey @eldarkurtic, my preferred implementation would be abstracting out the common code between the GMPruningModdifier and the new one into a parent class. GM does stand for GradualMagnitude; however, we have considered renaming this to make it more apparent. Would definitely be good to know what the additional arguments are and how much overlap is there. Could me, you, and @bfineran sync up on this to discuss the planned changes? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
What would be the preferred way to add a new gradual pruner in the existing codebase? I have two options/suggestions, and they both have some pros and cons.
New pruner specification: it's a gradual pruner, it has all properties and methods that current
GMPruningModifier
, it has some additional properties related specifically to that type of pruning.PruningModifier
class with its own definitions of properties and methods. Cons: all code from theGMPruningModifier
would be duplicated.GMPruningModifier
class. Triggered by using a specificmask_type
and feeding the additional properties from the YAML throughkwargs
of the__init__
method. Cons: maybe not the clearest solution to parse the additional properties fromkwargs
; I assume thatGM
stands forGradualMagnitude
which might not be the best naming for the new pruner that is not a magnitude pruner.Option to discuss: rebrand the current
GMPruningModifier
to be a base class for all (future) gradual pruning modifiers. Classes that would inherit from it could be:MagnitudePruningModifier
,New1PruningModifier
,New2PruningModifier
...Beta Was this translation helpful? Give feedback.
All reactions