pandarallel icon indicating copy to clipboard operation
pandarallel copied to clipboard

Value error when running

Open lfdversluis opened this issue 4 years ago • 3 comments

Traceback (most recent call last):
  File "/home/laurensv/pandas_alibaba_analysis.py", line 236, in <module>
    res = grouped_df.parallel_apply(lookahead_newer).to_parquet(os.path.join(output_location_look_ahead, 'output.parquet'), compression='snappy', engine='pyarrow')
  File "/home/laurensv/miniconda3/lib/python3.8/site-packages/pandarallel/pandarallel.py", line 446, in closure
    pool = context.Pool(
  File "/home/laurensv/miniconda3/lib/python3.8/multiprocessing/context.py", line 119, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild,
  File "/home/laurensv/miniconda3/lib/python3.8/multiprocessing/pool.py", line 205, in __init__
    raise ValueError("Number of processes must be at least 1")
ValueError: Number of processes must be at least 1

It did start with

INFO: Pandarallel will run on 48 workers.
INFO: Pandarallel will use Memory file system to transfer data between the main process and workers.

So something went wrong communicating 48 -> number of processes.

Using version 1.5.2.

lfdversluis avatar Mar 10 '21 20:03 lfdversluis

https://github.com/nalepae/pandarallel/blob/master/pandarallel/pandarallel.py#L443 I bet this somehow was <= 0

lfdversluis avatar Mar 10 '21 20:03 lfdversluis

Going by git blame, logic changed in 1.4.7. I will try 1.4.6 and see if that works.

lfdversluis avatar Mar 10 '21 20:03 lfdversluis

hi, does it work successful with 1.4.6?

ztsweet avatar Apr 24 '21 03:04 ztsweet

Closed in favour of #115. Feel free to reopen with a minimal working example if you think this is not the same problem.

till-m avatar Sep 07 '22 09:09 till-m