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

add mlr3 and renv gallery post #141

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

add mlr3 and renv gallery post #141

wants to merge 8 commits into from

Conversation

be-marc
Copy link
Sponsor Member

@be-marc be-marc commented Nov 11, 2023

No description provided.

Copy link

Preview

lxy = list(x, y)
object_size(lx)
object_size(lxy)
```
Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the example because it is easy to understand but it is not clear where this happens in mlr3. Maybe mention the repeated storing of our objects in benchmark results.

```


When serializing `mlr3` objects, it can happen that their size is much larger than expected.
Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe start with non-technical term like storing mlr3 objects.

Because `Learner`s store the hyperparameters that were used for training in their `$state`, it is important to ensure that their size is small.
One cause for large sizes of parameter values is the presence of source references in the function's attributes.
Source references are kept when installing packages with the `--with-keep.source` option.
Note that this option is enabled by default when installing packages with `renv`.
Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention that installing with source refs is not the normal case but I would point out renv earlier. How can I check that mlr3 was installed with source refs?


Another -- easily amendable -- source for large object sizes is forgetting to set the right flags.
The list below contains some important configuration options that can be used to reduce the size of important `mlr3` objects:

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to the book. This is explained in detail there.

We will update this post as new problems come to our attention.
Note that while some of these issues might seem neglibile, they can cause serious problems when running large benchmrk experiments, e.g. using `mlr3batchmark`.

## Avoid Installating Packages With Source References
Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention renv right in the heading.

@sebffischer
Copy link
Sponsor Member

  • Use unserialize after serialize when measuring objects

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