Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParamSet$check respects defaults #275

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

mb706
Copy link
Contributor

@mb706 mb706 commented Apr 16, 2020

closes #265
TODO: still missing tests

@jakob-r
Copy link
Sponsor Member

jakob-r commented Apr 16, 2020

One thing came to my mind.
How would you deal with the following situation

A, default=TRUE
B, default=TRUE, requires A==FALSE
C, requires B=TRUE

Now I should not be able to set C to some value, right? You can also say that is a corner case and we should not care about such recursion and allow a false postive here.

Currently we allow defaults for "inactive" params. However I am not aware if we actually have params that depend on such params like in the example.

@mb706
Copy link
Contributor Author

mb706 commented Apr 16, 2020

I guess we could say its an edge case and we'd like to be more permissive rather than too restrictive, but (you know me) I'll make a solution that does it right.

@jakob-r
Copy link
Sponsor Member

jakob-r commented Apr 16, 2020

I just want to avoid complex code to solve such edge cases. If the requirement points on a param that is not set and has a requirement itself that is not fulfilled by the param_vals I would just stop and say infeasible. Because in such cases it might be wise that the user supplies the complete param_vals to "proof" that he knows what he is doing.

@mlr-org mlr-org deleted a comment from lintr-bot Sep 8, 2020
Base automatically changed from master to main January 25, 2021 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants