-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
CondEqual and functions #278
Comments
Write a custom condition? |
@sumny can you please clarify your usecase better? with a concrete example |
This is for I now want to have the following: Using
So I could write my own condition, i,e:
Seems like everything should work now, right? Nope, because
to test whether the right hand side of the condition is actually valid for the parameter type. But
yields
but of course |
I don't know if this is that useful. Dependencies on the "Learner"-side are currently pretty broken and I don't think they should be used in PipeOps. The "tuner" side otoh only has atomic values so this is not a problem there. |
summarizing this as "broken" really seems not appropriate |
and saying "they should not be used" also sounds weird? |
also, if you read the code that leads to this bug, it simply comes from the fact that the code does not respect the type of "rhs". |
so, ps$add_dep("test", on = "fun", cond = CondEqual$new(list(identity))) actually works (that this is coded wrongly on the inside is still bad!) |
its not that simple. the whole Condition code becomes kinda ugly if we depend on Uty Params. OTOH we never assert that we do NOT ally UTY. I created a branch here, but I am not sure what to do best in terms of specs whether stuff CAN depend on UTY or not. https://github.com/mlr-org/paradox/tree/fix_278_condeq_and_funs |
Suppose I have a
ParamUty
accepting a function. I want to have a condition for another parameter on this one, e.g.:Currently this fails:
Any easy way how I can achieve this? (I guess I could set
fun
to acharacter
and then later substitute it to evaluate the function with the name of the value offun
but I'd rather prefer to directly work with functions.The text was updated successfully, but these errors were encountered: