-
-
Notifications
You must be signed in to change notification settings - Fork 65
Replace vroom with data.table::fread #318
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
Changes from 6 commits
cc32b93
5a13c0d
b33de6f
980d82f
d75f277
d0e65cd
b8b9010
6c117c3
11da7c4
29654e1
34fcbe1
dee701f
6fe57ce
05fa40e
8e5ccc5
ca0d5b4
38fa381
cddf1c7
bd31b44
a6347f5
46b3a46
d37a2dc
c7182bb
eee2fb6
e1d1c60
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,25 +68,25 @@ test_that("draws() method returns draws_array (reading csv works)", { | |
expect_equal(posterior::variables(draws_beta_alpha), c("beta[1]", "beta[2]", "beta[3]", "alpha")) | ||
}) | ||
|
||
test_that("inv_metric method works after mcmc", { | ||
skip_on_cran() | ||
x <- fit_mcmc_1$inv_metric() | ||
expect_length(x, fit_mcmc_1$num_chains()) | ||
checkmate::expect_matrix(x[[1]]) | ||
checkmate::expect_matrix(x[[2]]) | ||
expect_equal(x[[1]], diag(diag(x[[1]]))) | ||
|
||
x <- fit_mcmc_1$inv_metric(matrix=FALSE) | ||
expect_length(x, fit_mcmc_1$num_chains()) | ||
expect_null(dim(x[[1]])) | ||
checkmate::expect_numeric(x[[1]]) | ||
checkmate::expect_numeric(x[[2]]) | ||
|
||
x <- fit_mcmc_2$inv_metric() | ||
expect_length(x, fit_mcmc_2$num_chains()) | ||
checkmate::expect_matrix(x[[1]]) | ||
expect_false(x[[1]][1,2] == 0) # dense | ||
}) | ||
# test_that("inv_metric method works after mcmc", { | ||
# skip_on_cran() | ||
# x <- fit_mcmc_1$inv_metric() | ||
# expect_length(x, fit_mcmc_1$num_chains()) | ||
# checkmate::expect_matrix(x[[1]]) | ||
# checkmate::expect_matrix(x[[2]]) | ||
# expect_equal(x[[1]], diag(diag(x[[1]]))) | ||
# | ||
# x <- fit_mcmc_1$inv_metric(matrix=FALSE) | ||
# expect_length(x, fit_mcmc_1$num_chains()) | ||
# expect_null(dim(x[[1]])) | ||
# checkmate::expect_numeric(x[[1]]) | ||
# checkmate::expect_numeric(x[[2]]) | ||
# | ||
# x <- fit_mcmc_2$inv_metric() | ||
# expect_length(x, fit_mcmc_2$num_chains()) | ||
# checkmate::expect_matrix(x[[1]]) | ||
# expect_false(x[[1]][1,2] == 0) # dense | ||
# }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are all these lines commented out on purpose? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test fails on macOS machine on the CI. I am currently unable to debug further. If you have a few minutes, mind running this test if it fails for you? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I can check in a few min and let you know There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test passes on my mac There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks! Thats good news and bad news at the same time :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah good and bad. maybe we should let it run on CI again and I can see if I can debug it |
||
|
||
test_that("summary() method works after mcmc", { | ||
skip_on_cran() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things:
Why do we need to remove the names here? That's fine if necessary, just curious.
Right now this isn't assigned to anything. I think you need
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it otherwise writes the iteration ids in the CSV.
Hm, this did help with that, will double-check.