beantowel / chorus-from-music-structure

chorus detection for pop music
39 stars 6 forks source link

ValueError("Number of processes must be at least 1") #1

Closed gnai closed 2 years ago

gnai commented 2 years ago

Hello, I am having this traceback and not sure I am running correctly. Any help would be appreciated. Thank you :) Traceback (most recent call last): File "predict.py", line 213, in <module> main() File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "predict.py", line 154, in main preDataset.build(tf.preprocessor, force=force, num_workers=workers) File "/home/ubuntu/chorus-from-music-structure/utility/dataset.py", line 464, in build with Pool(num_workers) as p: File "/usr/lib/python3.8/multiprocessing/context.py", line 119, in Pool return Pool(processes, initializer, initargs, maxtasksperchild, File "/usr/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

beantowel commented 2 years ago

Sorry i didn't see this issue until now. You can change the default setting NUM_WORKERS = os.cpu_count() // 2 (which may be 0 if you are using a 1-core machine) by passing the param manually using python predict.py ./data/example/starfall.mp3 --force false --workers 1