danieldeutsch / sacrerouge

SacreROUGE is a library dedicated to the use and development of text generation evaluation metrics with an emphasis on summarization.
Apache License 2.0
134 stars 11 forks source link

JP: Made subcommands registrable #6

Closed JPeterson462 closed 4 years ago

JPeterson462 commented 4 years ago

I added an optional parameter to Registrable.register() and made Subcommand a subclass of Registrable. Example usage: @Subcommand.register('this-command', 'parent-command')

Subcommand._registry and Subcommand._parents could be used to generate the argparse parser.

danieldeutsch commented 4 years ago

I have to think about this a little more, but my concern is that this is adding functionality to Registrable which is specific to the commands subclasses, whereas this should be generic for any of the subclasses (like Metric).