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

get_values(type = "only_token") breaks with dependencies #415

Closed
be-marc opened this issue Nov 13, 2024 · 0 comments · Fixed by #416
Closed

get_values(type = "only_token") breaks with dependencies #415

be-marc opened this issue Nov 13, 2024 · 0 comments · Fixed by #416

Comments

@be-marc
Copy link
Member

be-marc commented Nov 13, 2024

This fails

ps = ps(
  cost    = p_dbl(0, default = 1, tags = "train", depends = quote(type == "C-classification")),
  kernel  = p_fct(c("linear", "polynomial", "radial", "sigmoid"), default = "radial", tags = "train"),
  type    = p_fct(c("C-classification", "nu-classification"), default = "C-classification", tags = "train")
)

ps$set_values(cost = to_tune(1e-5, 1e5, logscale = TRUE), kernel = "radial", type = "C-classification")
ps$get_values(type = "only_token")
#> named list()

This works

ps = ps(
  cost    = p_dbl(0, default = 1, tags = "train"),
  kernel  = p_fct(c("linear", "polynomial", "radial", "sigmoid"), default = "radial", tags = "train"),
  type    = p_fct(c("C-classification", "nu-classification"), default = "C-classification", tags = "train")
)

ps$set_values(cost = to_tune(1e-5, 1e5, logscale = TRUE), kernel = "radial", type = "C-classification")
ps$get_values(type = "only_token")
#> $cost
#> Tuning over:
#> range [1e-05, 1e+05] (log scale)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant