Skip to content

Commit b873ccb

Browse files
committed
dont compare time elapsed slot for keras models
1 parent 082549d commit b873ccb

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

tests/testthat/test_linear_reg_keras.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ctrl <- fit_control(verbosity = 0, catch = FALSE)
2525
test_that('model fitting', {
2626
skip_on_cran()
2727
skip_if_not_installed("keras")
28+
cmp_slots <- c("lvl", "spec", "fit", "preproc")
2829

2930
set.seed(257)
3031
expect_error(
@@ -49,7 +50,7 @@ test_that('model fitting', {
4950
),
5051
regexp = NA
5152
)
52-
expect_equal(fit1, fit2)
53+
expect_equal(fit1[cmp_slots], fit2[cmp_slots])
5354

5455
expect_error(
5556
fit(

tests/testthat/test_logistic_reg_keras.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ ctrl <- fit_control(verbosity = 0, catch = FALSE)
4141
test_that('model fitting', {
4242
skip_on_cran()
4343
skip_if_not_installed("keras")
44+
cmp_slots <- c("lvl", "spec", "fit", "preproc")
4445

4546
set.seed(257)
4647
expect_error(
@@ -65,7 +66,7 @@ test_that('model fitting', {
6566
),
6667
regexp = NA
6768
)
68-
expect_equal(fit1, fit2)
69+
expect_equal(fit1[cmp_slots], fit2[cmp_slots])
6970

7071
expect_error(
7172
fit(

tests/testthat/test_multinom_reg_keras.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ ctrl <- fit_control(verbosity = 0, catch = FALSE)
3434
test_that('model fitting', {
3535
skip_on_cran()
3636
skip_if_not_installed("keras")
37+
cmp_slots <- c("lvl", "spec", "fit", "preproc")
3738

3839
set.seed(257)
3940
expect_error(
@@ -58,7 +59,7 @@ test_that('model fitting', {
5859
),
5960
regexp = NA
6061
)
61-
expect_equal(fit1, fit2)
62+
expect_equal(fit1[cmp_slots], fit2[cmp_slots])
6263

6364
expect_error(
6465
fit(

0 commit comments

Comments
 (0)