Skip to content

Commit

Permalink
Update custom model to use new_model_spec()
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasilge committed Apr 3, 2024
1 parent 016a5ce commit 337033e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/testthat/test-mda.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ test_that("mda + custom parsnip model + predict() works", {
stop("`mode` should be 'classification'", call. = FALSE)
}
args <- list(sub_classes = rlang::enquo(sub_classes))
out <- list(args = args,
eng_args = NULL,
mode = mode,
method = NULL,
engine = NULL)
class(out) <- make_classes("mixture_da")
out
new_model_spec(
"mixture_da",
args = args,
eng_args = NULL,
mode = mode,
method = NULL,
engine = NULL
)
}
set_fit(
model = "mixture_da",
Expand Down

0 comments on commit 337033e

Please sign in to comment.