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

Caching #22

Closed
pat-s opened this issue Jun 4, 2019 · 6 comments
Closed

Caching #22

pat-s opened this issue Jun 4, 2019 · 6 comments

Comments

@pat-s
Copy link
Member

pat-s commented Jun 4, 2019

In mlr we use the memoise pkg for caching.
I saw that Tasks are cached in mlr3 already via this PR.

@mllg Would this concept also be preferrable for the filters or does it have any limitations? And should we rely on the memoise pkg for caching?

@mb706
Copy link
Contributor

mb706 commented Jun 24, 2019

btw, mlr3 attaches a $hash to most things, so there may be a way to avoid calculating the digest for input tasks (as memoise would probably do it) and speed things up.

@pat-s
Copy link
Member Author

pat-s commented Jun 24, 2019

memoise caches the whole function call and all of its arguments. Not sure if the hashed task would have any effect here.

@mb706
Copy link
Contributor

mb706 commented Jun 25, 2019

The return object of memoise::cache_memory and memoise::cache_filesystem contain the hash function that the these cache mechanisms should use in the $digest slot. It would be possible to modify this to consider the $hash of input tasks instead of running digest::digest on them.

@pat-s
Copy link
Member Author

pat-s commented Oct 19, 2020

@mb706 AFAIR caching is done in pipelines, isn't it? Hence I would close here if we can find/already have an overarching solution.

@mb706
Copy link
Contributor

mb706 commented Oct 19, 2020

Caching is on the way to be implemented in pipelines (here), but not there yet. But I agree that it is probably redundant to have filtering here once it is also in pipelines.

@pat-s
Copy link
Member Author

pat-s commented Oct 19, 2020

Cool, thanks. Then I won't put more thoughts about this in here 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants