Simplify Objective
class args and docstrings
#879
Labels
hackathon
Stuff to work on during hackathon
interface
New feature or request to make the code more usable or compatibility with another code
low priority
Nice to have, but not needed right away
objectives
Adding or improving objective functions
We have an ever growing number of objectives, with pretty much all of the init methods being something like this
And each of the args is documented separately in each class. This means that if we want to add a new property generic to all objectives (like we did with
loss_function
,normalize
,deriv_mode
, etc) we have to add it to ALL of the init methods and docstringsA cleaner method that requires less duplication could be something like
Doing this in combination with something like https://github.com/AntoineD/docstring-inheritance would allow us to reduce the amount of redundant docstrings in the code while still having all the args documented to the user in an IDE or docs page. We could also get fancy and override the subclass
__signature__
attribute to include the extra args from the parent class.The text was updated successfully, but these errors were encountered: