Skip to content

Commit

Permalink
keep up with marshal changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sebffischer committed Feb 22, 2024
1 parent 7875025 commit e19e36e
Show file tree
Hide file tree
Showing 77 changed files with 456 additions and 454 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Config/testthat/edition: 3
Config/testthat/parallel: true
NeedsCompilation: no
Roxygen: list(markdown = TRUE, r6 = FALSE)
RoxygenNote: 7.2.3.9000
RoxygenNote: 7.3.1
VignetteBuilder: knitr
Collate:
'Graph.R'
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ S3method(pos,list)
S3method(predict,Graph)
S3method(print,Multiplicity)
S3method(print,Selector)
S3method(unmarshal_model,graph_learner_model_marshalled)
S3method(unmarshal_model,graph_learner_model_marshaled)
export("%>>!%")
export("%>>%")
export(Graph)
Expand Down
14 changes: 8 additions & 6 deletions R/GraphLearner.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ GraphLearner = R6Class("GraphLearner", inherit = Learner,
}
),
active = list(
marshalled = function(rhs) {
learner_marshalled(self)
marshaled = function(rhs) {
learner_marshaled(self)
},
hash = function() {
digest(list(class(self), self$id, self$graph$hash, private$.predict_type,
Expand Down Expand Up @@ -252,13 +252,15 @@ GraphLearner = R6Class("GraphLearner", inherit = Learner,
#' @export
marshal_model.graph_learner_model = function(model, ...) {
model = map(model, marshal_model)
class(model) = c("graph_learner_model_marshalled", "list_marshalled", "marshalled")
model
structure(list(
marshaled = map(model, marshal_model),
packages = "mlr3pipelines"
), class = c("graph_learner_model_marshaled", "list_marshaled", "marshaled"))
}

#' @export
unmarshal_model.graph_learner_model_marshalled = function(model, ...) {
model = map(model, marshal_model)
unmarshal_model.graph_learner_model_marshaled = function(model, ...) {
model = map(model$marshaled, unmarshal_model)
class(model) = c("graph_learner_model", "list")
model
}
Expand Down
8 changes: 4 additions & 4 deletions man/Graph.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions man/PipeOp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions man/PipeOpEnsemble.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions man/PipeOpImpute.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions man/PipeOpTargetTrafo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions man/PipeOpTaskPreproc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions man/PipeOpTaskPreprocSimple.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e19e36e

Please sign in to comment.