Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Learner): support marshal property #993

Merged
merged 49 commits into from
Apr 23, 2024
Merged

feat(Learner): support marshal property #993

merged 49 commits into from
Apr 23, 2024

Conversation

sebffischer
Copy link
Member

@sebffischer sebffischer commented Jan 25, 2024

Suggestion:

  • Per default, when calling benchmark() or resample(), the models are in unmarshaled form.
  • When calling $score() and $aggregate() it is checked whether the measure needs access to the model, and if so, a good error message is given that informs the user that:
    a) He needs to $unmarshal() the object
    b) After doing so, he needs to $marshal() again to be able to save the object

TODOs:

Points for discussion:

This is useful for learners that e.g. rely on external pointers and that need processing of the model to be serializable.
Addresses #891

Input checks on the measure (check that model is not marshaleld when accessing the model) only work partially (#1000)

TODOs:

  • Gallery Post

This is useful for learners that e.g. rely on external pointers
and that need so processing of the model to be serializable.
@sebffischer
Copy link
Member Author

Related PR in mlr3torch:
mlr-org/mlr3torch#179

@sebffischer sebffischer requested review from mllg and be-marc and removed request for mllg January 25, 2024 13:42
@sebffischer sebffischer requested a review from mllg January 29, 2024 15:29
R/Learner.R Outdated Show resolved Hide resolved
R/Learner.R Outdated Show resolved Hide resolved
@sebffischer
Copy link
Member Author

  • $bundle() and $unbundle() should only be implemented in the Learners that actually implement them.

@sebffischer sebffischer changed the title feat(Learner): support bundling property feat(Learner): support marshal property Feb 1, 2024
R/Measure.R Outdated Show resolved Hide resolved
R/Measure.R Outdated Show resolved Hide resolved
R/Measure.R Outdated Show resolved Hide resolved
@sebffischer sebffischer merged commit 6a11743 into main Apr 23, 2024
4 checks passed
@sebffischer sebffischer deleted the bundle branch April 23, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants