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

print.canned_pred checks contents of non-existent pre (partial-matched to unintended element) #447

Open
brookslogan opened this issue Mar 14, 2025 · 2 comments

Comments

@brookslogan
Copy link
Contributor

brookslogan commented Mar 14, 2025

if ("actions" %in% names(x$pre) && "recipe" %in% names(x$pre$actions)) {

print.canned_epipred <- function(x, name, ...) {
[...]
  if ("actions" %in% names(x$pre) && "recipe" %in% names(x$pre$actions)) {

Presumably, x$pre is supposed to be the preprocessor, but it actually partial-matches to x$predictions.

musing: if not for this coincidence, warnPartialMatchDollar wouldn't have even caught this and we'd just be testing vs. NULL. This is also an issue for epi_archives. (And also epi_dfs though for attrs not list elts.) Is there any sort of list subclass that makes $/attr do exact matches and produce an error rather than NULL when the requested key has no match?

@dshemetov
Copy link
Contributor

Hey could you tag these new issues with priority + size estimates and bucket them into backlog/icebox please? Should be easiest when freshly filed and the context is clear.

@brookslogan
Copy link
Contributor Author

I'm just guessing here.

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

No branches or pull requests

2 participants