-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Discussion regarding dvclive.init and it's number of arguments have emerged across multiple issues (i.e. #69, #75, #121, #124), specially those regarding the addition of new features, so I opened this one to concentrate all discussions.
From an user perspective I prefer having as many explicit arguments as needed, as long as they are useful and well documented, rather than "hiding" the arguments under **kwargs** or even a config file. Maybe I'm biased because I feel that using APIs with too many arguments (~8+) is not a real problem if all of them are actually useful, the library uses things like proper naming and types and you are using a modern IDE.
I would need to think about it and consider other perspectives to actually have a strong preference,.
Regardless of the options for extending arguments, I think it could be also worth to take a step back and consider the general interface to check if some of the arugments already existing could be removed/revisited in order to "make room" for new ones:
html
Given that this argument is only used when DVCLive is used alongside DVC. I think it could be removed from dvclive.init and just let it be configured by env.DVCLIVE_HTML.
step/resume
I'm not really sure what would be the indented use case for this argument outside it's interaction with resume. Unless I'm missing some other use case, resume and step could be merged into a single argument resume_from: Optional[int] = None?
summary
How much would this actually be used to disable the summary? Would someone complain if we remove the argument and just always create it?
If we come to the conclusion that users might not really want to have a summary, we could maybe rethink the log/next_step interaction to allow them to skip the summary:
If the user doesn't really want a summary, we could "ask" to always call dvclive.log with a explicit step, otherwise we assume that callingnext_step (either explicitly or implicitly by calling dvclive.log twice without step) means that the user wants a summary.
I know all the above options would imply a significant "shakeup" to the existing API but I think that this kind of discussion has, in the end, the same goal to the one about how to extend the arguments.