Skip to content

Bug when using internal tuning and encapsulation #1256

@sebffischer

Description

@sebffischer
library(mlr3torch)
#> Loading required package: mlr3
#> Loading required package: mlr3pipelines
#> Loading required package: torch
library(mlr3)
l = lrn("classif.debug", validate = 0.3, early_stopping = TRUE)
l$train(tsk("iris"))
l$internal_valid_scores
#> $acc
#> [1] 0.3111111
l$encapsulate("callr", lrn("classif.featureless"))
l$train(tsk("iris"))
#> INFO  [16:55:35.461] [mlr3] Calling train method of fallback 'classif.featureless' on task 'iris' with 105 observations {learner: <LearnerClassifFeatureless/LearnerClassif/Learner/R6>}
l$internal_valid_scores
#> named list()

Created on 2025-02-04 with reprex v2.1.1

The issue is that the model might be in a marshaled state when the internal tuning values are being extracted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions