-
Notifications
You must be signed in to change notification settings - Fork 409
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
Handle new naming scheme in newer Jupyter notebook #1214
Conversation
…sion breaking the across-run identification of annotations in notebooks.
Codecov Report
@@ Coverage Diff @@
## master #1214 +/- ##
==========================================
- Coverage 94.51% 88.68% -5.83%
==========================================
Files 47 47
Lines 7034 7052 +18
==========================================
- Hits 6648 6254 -394
- Misses 386 798 +412
Continue to review full report at Codecov.
|
Thanks @mjziebarth, I pushed a small improvement to your PR. I tested the fix locally and I confirm that it works as expected. There is no easy way to write a test for this so... so be it. BTW next time, please create your PR from a dedicated branch instead of using master. Otherwise it will be very confusing for your to sync your local joblib repo with the main joblib repo. |
Thanks @mjziebarth! |
Release 1.1.0 Fix byte order inconsistency issue during deserialization using joblib.load in cross-endian environment: the numpy arrays are now always loaded to use the system byte order, independently of the byte order of the system that serialized the pickle. joblib/joblib#1181 Fix joblib.Memory bug with the ignore parameter when the cached function is a decorated function. joblib/joblib#1165 Fix joblib.Memory to properly handle caching for functions defined interactively in a IPython session or in Jupyter notebook cell. joblib/joblib#1214 Update vendored loky (from version 2.9 to 3.0) and cloudpickle (from version 1.6 to 2.0) joblib/joblib#1218
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Release 1.1.0 Fix byte order inconsistency issue during deserialization using joblib.load in cross-endian environment: the numpy arrays are now always loaded to use the system byte order, independently of the byte order of the system that serialized the pickle. joblib/joblib#1181 Fix joblib.Memory bug with the ignore parameter when the cached function is a decorated function. joblib/joblib#1165 Fix joblib.Memory to properly handle caching for functions defined interactively in a IPython session or in Jupyter notebook cell. joblib/joblib#1214 Update vendored loky (from version 2.9 to 3.0) and cloudpickle (from version 1.6 to 2.0) joblib/joblib#1218
Just checking..... I upgraded to 1.1.0 and found that this invalidated caches created by the earlier version of the module used within a Jupyter notebook. Is this as expected: should earlier cached function/args/kwargs sets fail? I'd hoped that this wasn't the case, but I can understand if it is. |
I believe this is expected but what I would not expect is that the cache would have worked without invalidation using a recent version of jupyter and the older version of joblib. |
Hi, the fix did not work for me,
UPDATE: the Memory cache IS preserved between IPykernel sessions, however, when the cell with defined function is updated, the last part I believe def get_func_name():
# ...
parts[-2] = 'ipykernel'
# add this line to prevent invalidating cahe on arbitrary change
# in jupyter cell code
del parts[-1] |
As mentioned in #1210, this adds handling of a different cell code naming scheme in the newest Jupyter notebook / IPython version (at least as packaged on Arch Linux).
Let me know if anything else can / needs to be done.
Cheers!