API design feedback - get_drise_saliency_map
ksachdeva opened this issue · 2 comments
Hi,
I believe that the api get_drise_saliency_map
can be improved. Here are some suggestions -
-
It is a good idea to move
Optional
arguments after the required arguments. For e.g.model
is an optional argument but it is specifeid beforenumclasses
(a required argument). -
Majority of the arguments of this api are not following snake_casing. Only
model
andmax_figures
are named as per the convention. -
It would be a good idea to define a NamedTuple and use it for the return values. It helps with readability and intellisense.
-
If
model
is None then you use FastRCNN model underneath that has 87 classes. However you do require the user to passnumclasses
. You can either make numclasses optional with default value of 87 or ignore it if model is None.
Thank you for the great suggestions! I agree with all of these API improvements. I don't have bandwidth to make these changes just now but I think we will try to make them in some near term future. If you wish to send a PR to make these changes sooner please feel free to do so - contributions are welcome.