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

Leanificate R6 Classes #509

Closed
wants to merge 1 commit into from
Closed

Leanificate R6 Classes #509

wants to merge 1 commit into from

Conversation

mb706
Copy link
Collaborator

@mb706 mb706 commented Jun 17, 2020

Re: #482

roundtripdiff = function(x) {
  path <- tempfile()
  saveRDS(x, file = path)
  y <- readRDS(path)
  file.remove(path)
  as.numeric(lobstr::obj_size(y)) / as.numeric(lobstr::obj_size(x))
}

task <- tsk("mtcars")
learner <- lrn("regr.rpart")
rr <- resample(task, learner, rsmp("bootstrap", repeats = 1000))
roundtripdiff(rr$data$learner)

This PR:

4.156

Whatever mlr3 version I happen to have installed:

36.991

Size of the whole rr object is 15.8 MB before serialization, 62.4 MB with this PR after serialization, and 618.3 MB with vanilla mlr3.

@codecov-commenter
Copy link

codecov-commenter commented Jun 17, 2020

Codecov Report

Merging #509 into master will decrease coverage by 0.71%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #509      +/-   ##
==========================================
- Coverage   92.77%   92.05%   -0.72%     
==========================================
  Files          75       76       +1     
  Lines        1937     1952      +15     
==========================================
  Hits         1797     1797              
- Misses        140      155      +15     
Impacted Files Coverage Δ
R/zzz.R 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eabb2d5...426e48d. Read the comment docs.

@mllg
Copy link
Sponsor Member

mllg commented Jun 18, 2020

Thanks, look promising. We should discuss the next steps in a call.

This was referenced Aug 10, 2020
@mb706
Copy link
Collaborator Author

mb706 commented Aug 10, 2020

Moving this to mlr3misc

@mb706 mb706 closed this Aug 10, 2020
@mllg mllg deleted the leanify branch August 18, 2020 08:03
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.

3 participants