Created
June 29, 2011 23:32
-
-
Save npinto/1055274 to your computer and use it in GitHub Desktop.
Joblib Bug when using Parallel and Memory(...).cache'd functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import sqrt | |
from joblib import Memory, Parallel, delayed | |
mem = Memory('tmp') | |
@mem.cache | |
def sqrt2(v): | |
return sqrt(v) | |
print Parallel(n_jobs=4, verbose=True)(delayed(sqrt2)(i**2) for i in range(10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment