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

warnings in tests #32

Open
MichaelChirico opened this issue Mar 4, 2022 · 1 comment
Open

warnings in tests #32

MichaelChirico opened this issue Mar 4, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@MichaelChirico
Copy link

I ran the test suite with options(warn = 2) and it generated some failures:

── Error (test-bound.R:61:3): bounds are being respected in submodel ───────────────────────────
Error in `max(Q_submodel)`: (converted from warning) no non-missing arguments to max; returning -Inf
Backtrace:
    ▆
 1. └─testthat::expect_lte(max(Q_submodel), 1 - Q_bound_level) at test-bound.R:61:2
 2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
── Error (test-marginal_structural.R:171:1): (code run outside of `test_that()`) ───────────────────────────
Error in `learner$predict_fold(learner_task, fold_number)`: (converted from warning) Lrnr_density_semiparametric_NULL_NULL is not cv-aware: self$predict_fold reverts to self$predict
Backtrace:
     ▆
  1. └─R6 fit_tmle3(tmle_task, targeted_likelihood, msm, updater) at test-marginal_structural.R:171:0
  2.   └─tmle3 initialize(...)
  3.     └─private$.tmle_fit(max_it)
  4.       └─self$updater$update(self$likelihood, self$tmle_task)
  5.         └─base::lapply(...)
  6.           └─tmle3 FUN(X[[i]], ...)
  7.             └─tmle_param$estimates(tmle_task, update_fold)
  8.               └─self$clever_covariates(tmle_task, fold_number)
  9.                 └─self$observed_likelihood$get_likelihoods(...)
 10.                   └─self$get_likelihood(tmle_task, nodes[[1]], fold_number)
 11.                     └─self$initial_likelihood$get_likelihood(tmle_task, node, fold_number)
 12.                       └─likelihood_factor$get_likelihood(tmle_task, fold_number)
 13.                         └─self$get_density(tmle_task, fold_number)
 14.                           └─learner$predict_fold(learner_task, fold_number)
── Error (test-stratified_intevention.R:61:1): (code run outside of `test_that()`) ───────────────────────────
Error in `ED * private$.targeted_components`: (converted from warning) longer object length is not a multiple of shorter object length
Backtrace:
    ▆
 1. └─R6 fit_tmle3(tmle_task, targeted_likelihood, tmle_param, updater) at test-stratified_intevention.R:61:0
 2.   └─tmle3 initialize(...)
 3.     └─private$.tmle_fit(max_it)
 4.       └─self$updater$update(self$likelihood, self$tmle_task)

It might be best to design the tests or re-write the underlying code so as not to produce these warnings.

@nhejazi nhejazi added the bug Something isn't working label Mar 4, 2022
@nhejazi
Copy link
Member

nhejazi commented Mar 4, 2022

thanks for finding and noting these warnings. it's possible that the development cycle of this package is now out of sync with that of some of its dependencies, as the warnings seems to stem from both sl3 and tmle3. there's a long queue rn, but i'll try to make some time to rewrite the tests and fix any background issues contributing to this

@nhejazi nhejazi self-assigned this Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants