库Multprocesing在sagemaker conda-python3上是否工作正常?
答案 0 :(得分:0)
这当然取决于您要考虑的用例,但是通常对于pool
中的multiprocessing
的函数的并行处理,它很好用,我经常使用它。例如:
import multiprocessing as mp
pool = mp.Pool(mp.cpu_count())
# f is your function and L the list of items you want to apply f to
result = pool.map(f, L)
pool.quit()
pool.join()