Issue:
Evaluation verbs that call eval_df as part of their operation are performing the same invariant testing twice (on the model and dataframe objects). With the current code architecture, this is necessary to ensure proper type and value checking of dataframe and model arguments; since eval verbs will perform operations on the model and/or dataframe object before eventually calling eval_df which also has its own invariants check since it is a function available to the user.
Evaluation verbs with this issue (such as eval_nominal) should be modified so that this duplicate invariant testing does not happen. A potential solution could involve segmenting out the vital code from evaldf and putting it in a helper function that can be called (without invariant tests) or directly in the eval* function itself.
Issue: Evaluation verbs that call eval_df as part of their operation are performing the same invariant testing twice (on the model and dataframe objects). With the current code architecture, this is necessary to ensure proper type and value checking of dataframe and model arguments; since eval verbs will perform operations on the model and/or dataframe object before eventually calling eval_df which also has its own invariants check since it is a function available to the user.
Evaluation verbs with this issue (such as eval_nominal) should be modified so that this duplicate invariant testing does not happen. A potential solution could involve segmenting out the vital code from evaldf and putting it in a helper function that can be called (without invariant tests) or directly in the eval* function itself.