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
ENH add cache_validation_callback in Memory #1149
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1149 +/- ##
==========================================
+ Coverage 94.82% 94.93% +0.10%
==========================================
Files 44 44
Lines 7366 7439 +73
==========================================
+ Hits 6985 7062 +77
+ Misses 381 377 -4
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tomMoral,
After some delay, here is a first superficial pass. I still need to get into MemorizedFunc
's internals to see how everything fits together.
Thx for the review @jjerphan ! I did update this a bit. I will try to finish this by adding some examples and a bit of doc. |
You're welcome.
Feel free to request a new review when it's ready. |
723eb7e
to
ea1f187
Compare
@jjerphan I rebased the PR and did a pass on the doc, feel free to review once more :) |
It looks like the tests are failing in some configurations. I mostly am busy with other tasks now but will try to come back to it soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussing a few remark and changing this PR title to mention cache_validation_callback
instead of validate_cache
, this LGTM. 👍
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
My previous review might be outdated, let me know if you want another one, @tomMoral. |
This popular feature appears to have rested unmerged after passing an extended review. Sadly there are now conflicts and test failures again. Is this good to merge if it is ported forward? |
I just fixed this, I will try to merge it to include it in the next release. |
Tentative to implement a way to validate the cache results with user define rules.
validate_cache
that takes a callablevalidate_cache(metadata) -> bool
.time
in metadata to ease the robust checking of computation time in all backends.joblib.memory.expires_after
to check the age of a cached results.Todo:
Fixes #313 .