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

test compute_grid_info() #948

Merged
merged 1 commit into from
Oct 17, 2024
Merged

test compute_grid_info() #948

merged 1 commit into from
Oct 17, 2024

Conversation

simonpcouch
Copy link
Contributor

The compute_grid_info() helper currently calls one of three helpers depending on the presence of tuning parameters in the model or recipe:

tune/R/grid_helpers.R

Lines 319 to 330 in f8d734a

if (any_parameters_model) {
if (any_parameters_preprocessor) {
compute_grid_info_model_and_preprocessor(workflow, grid, parameters_model)
} else {
compute_grid_info_model(workflow, grid, parameters_model)
}
} else {
if (any_parameters_preprocessor) {
compute_grid_info_preprocessor(workflow, grid, parameters_model)
} else {
rlang::abort("Internal error: `workflow` should have some tunable parameters if `grid` is not `NULL`.")
}

In implementing postprocessing, I'd like to refactor this to avoid inflating that number of helpers, but I want to make sure it's well-tested first before doing so!

@simonpcouch simonpcouch merged commit 51db99e into main Oct 17, 2024
11 checks passed
@simonpcouch simonpcouch deleted the test-compute_grid_info branch October 17, 2024 23:57
Copy link

github-actions bot commented Nov 1, 2024

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants