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

fix: internal tuning and parameter transformations #457

Merged
merged 5 commits into from
Oct 21, 2024
Merged

Conversation

sebffischer
Copy link
Member

@sebffischer sebffischer commented Oct 18, 2024

Previously it was not possible to do something like the code below:

mlp = lrn("classif.mlp",
  activation = nn_relu,
  neurons = to_tune(ps(
    n_layers = p_int(lower = 1, upper = 10), latent = p_int(10, 500),
    .extra_trafo = function(x, param_set) {
      list(neurons = rep(x$latent, x$n_layers))
    })
  ),
  epochs = to_tune(upper = 1000L, internal = TRUE),
  patience = 100,
  validate = 0.3,
  ...
)

After this PR:

  • the above code will work
  • it is possible to pass the internal_search_space manually. This is useful in cases where we want to directly pass a search_space (without the to_tune() machinery). In such cases it was previously not possible to add an .extra_trafo to this search space AND to internal tuning (because the internal search space cannot have a parameter transformation).

@sebffischer sebffischer changed the title Internal tuning and transformations fix: internal tuning and parameter transformations Oct 18, 2024
@be-marc be-marc merged commit 89bc580 into main Oct 21, 2024
5 checks passed
@be-marc be-marc deleted the fix/int-tune-trafo branch October 21, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants