tweak parallelism in hopes for speed.
This commit is contained in:
parent
4168d0d4cf
commit
b2f1c1342f
@ -110,8 +110,8 @@ def cosine_similarities_weekly(tfidf_path, outfile, term_colname, included_subre
|
||||
# for week in weeks:
|
||||
# week_similarities_helper(week)
|
||||
|
||||
with Pool(cpu_count()) as pool: # maybe it can be done with 128 cores on the huge machine?
|
||||
list(pool.imap(week_similarities_helper, weeks))
|
||||
with Pool(128) as pool: # maybe it can be done with 128 cores on the huge machine?
|
||||
list(pool.imap_unordered(week_similarities_helper, weeks, 5))
|
||||
pool.close()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user