-
Notifications
You must be signed in to change notification settings - Fork 413
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
JoblibCollisionWarning not shown in an interactive session #649
Comments
# test-collision.py
from joblib import Memory
memory = Memory('/tmp/test')
memory.clear(warn=False)
def func(x):
print('Running one(%s)' % x)
return 1
one = memory.cache(func)
def func(x):
print('Running two(%s)' % x)
return 2
two = memory.cache(func)
print('first call')
print('-'*80)
print('result one:', one(1))
print('result two:', two(1))
print('second call')
print('-'*80)
print('result one:', one(1))
print('result two:', two(1))
Copying and pasting the same snippet in a IPython session:
To sum up the difference is a JoblibCollisionWarning or a normal warning. Granted the former has a little bit more details explaining the problem but in the grand scheme of things this may not make a big difference. To be honest I am not sure what the behaviour should be (cc @GaelVaroquaux who may have an opinion on this edge case). It is nice to have a warning but it looks like the calling |
Seen in #648, the doc describing the behaviour with JoblibCollisionWarning does not correspond to the observed behaviour in an IPython console or Jupyter notebook. It seems to be more or less fine if the code is in a python file.
I'll try to add more details soon.
The text was updated successfully, but these errors were encountered: