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

[Bug] Heterogeneous {crew} workers invalid class #1065

Closed
3 tasks done
mglev1n opened this issue May 8, 2023 · 1 comment
Closed
3 tasks done

[Bug] Heterogeneous {crew} workers invalid class #1065

mglev1n opened this issue May 8, 2023 · 1 comment
Assignees

Comments

@mglev1n
Copy link

mglev1n commented May 8, 2023

Prework

  • I understand and agree to help guide.
  • I understand and agree to contributing guide.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Issue

When following the "Heterogenous Workers" example in the {targets} manual (https://books.ropensci.org/targets/crew.html#heterogeneous-workers), the following error appears:

Last error: controller for tar_make() must be a valid object of class "crew_class_controller" from the {crew} R package.

This seems to be a result of the validate_crew_controller() function. Should this function also accept crew_class_controller_group as a valid class?

targets/R/class_crew.R

Lines 243 to 254 in 384da1b

validate_crew_controller <- function(controller) {
tar_assert_inherits(
x = controller,
class = "crew_class_controller",
msg = paste(
"controller for tar_make() must be a valid",
"object of class \"crew_class_controller\" from the",
"{crew} R package."
)
)
controller$validate()
}

@wlandau
Copy link
Member

wlandau commented May 8, 2023

Yes it is supposed to work with controller groups, thanks for letting me know. Should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants