Skip to content

unlist tuning parameters wrapped in lists #1191

Merged
topepo merged 1 commit into
mainfrom
delist
Jun 18, 2026
Merged

unlist tuning parameters wrapped in lists #1191
topepo merged 1 commit into
mainfrom
delist

Conversation

@topepo

@topepo topepo commented May 18, 2026

Copy link
Copy Markdown
Member

Closes #1190

@topepo
topepo requested a review from EmilHvitfeldt June 15, 2026 13:49

@EmilHvitfeldt EmilHvitfeldt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice, small PR

Comment thread R/finalize.R
Comment on lines +187 to +191
if (any(is_list_param)) {
for (inx in which(is_list_param)) {
grid[[inx]] <- grid[[inx]][[1]]
}
}

@EmilHvitfeldt EmilHvitfeldt Jun 17, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a big deal, but like this better

Suggested change
if (any(is_list_param)) {
for (inx in which(is_list_param)) {
grid[[inx]] <- grid[[inx]][[1]]
}
}
if (!any(is_list_param)) {
return(grid)
}
for (inx in which(is_list_param)) {
grid[[inx]] <- grid[[inx]][[1]]
}

@topepo
topepo merged commit 984b694 into main Jun 18, 2026
15 checks passed
@topepo
topepo deleted the delist branch June 18, 2026 14:24
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.

avoid failures with tune parameters that are not scalars

2 participants