Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
be-marc committed Apr 24, 2024
2 parents 17abd0c + 702e21f commit 0c9fd46
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/marshal.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ learner_marshal = function(.learner, ...) {
learner_marshaled = function(.learner) {
# no need to check for 'marshal' property as this method should only be available for such learners
if (is.null(.learner$model)) {
stopf("Cannot check marshaled status, Learner '%s' has not been trained yet", .learner$id)
return(FALSE)
}
is_marshaled_model(model = .learner$model)
}
Expand Down
2 changes: 1 addition & 1 deletion inst/testthat/helper_expectations.R
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ expect_marshalable_learner = function(learner, task) {
# (un)marshal only possible after training
testthat::expect_error(learner$marshal(), "has not been trained")
testthat::expect_error(learner$unmarshal(), "has not been trained")
testthat::expect_error(learner$marshaled, "has not been trained")
testthat::expect_equal(learner$marshaled, FALSE)

learner$train(task)
model = learner$model
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test_marshal.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ test_that("learner methods", {
task = tsk("iris")
expect_error(learner_marshal(learner), "not been trained")
expect_error(learner_unmarshal(learner), "not been trained")
expect_error(learner_marshaled(learner), "not been trained")
expect_false(learner_marshaled(learner))

learner$train(task)
expect_false(learner_marshaled(learner))
Expand Down

0 comments on commit 0c9fd46

Please sign in to comment.