You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.
Currently many functions in Zeno pass in a ZenoOptions, such as distill functions and metrics. This has the advantage of conciseness in the function definition.
However, there are also disadvantages in that it can be unclear which parts of the ZenoOptions object are necessary and sufficient for the processing in any individual function. For instance, in distill functions, it is most likely that only data_column, label_column, and output_column are necessary, but in order to call the function it is still necessary to create a ZenoOptions object and set its various parameters (such as model_path, which is irrelevant). It might be a good idea to consider modifying the API a bit to explicitly pass in only the necessary arguments.
The text was updated successfully, but these errors were encountered:
That's OK, but it doesn't entirely solve the problem, as it doesn't make clear which arguments are actually required when using any of the functions. For instance, when calling a metric you could set data_column, label_column, and output_column as None, despite the fact that they are necessary. Sure, these things could be caught at runtime, but runtime errors take more developer time than those that can be caught by static analysis, so in general making the requirements explicit in the programming interface can be better.
Anyway, this is just a suggestion to consider!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently many functions in Zeno pass in a
ZenoOptions
, such as distill functions and metrics. This has the advantage of conciseness in the function definition.However, there are also disadvantages in that it can be unclear which parts of the ZenoOptions object are necessary and sufficient for the processing in any individual function. For instance, in distill functions, it is most likely that only
data_column
,label_column
, andoutput_column
are necessary, but in order to call the function it is still necessary to create aZenoOptions
object and set its various parameters (such asmodel_path
, which is irrelevant). It might be a good idea to consider modifying the API a bit to explicitly pass in only the necessary arguments.The text was updated successfully, but these errors were encountered: