-
Notifications
You must be signed in to change notification settings - Fork 133
Open
Labels
Description
I'm using a function defined in the current file in pseq, and seems it errors out not being able to find other referenced functions or even simple types like Dict. This works fine when using seq.
I think the problem is with pickling the target function in lazy_parallelize:
partitions = split_every(partition_size, iter(result))
packed_partitions = (pack(func, (partition,)) for partition in partitions)
for pool_result in pool.imap(unpack, packed_partitions):
yield pool_result
pool.terminate()
I executed on my own the function with pool.imap and works fine.
Wouldn't it be better not to use pickling to avoid these kind of problems?