Python 3.x 库multprocessing对sagemaker conda-python3有效吗?

Python 3.x 库multprocessing对sagemaker conda-python3有效吗?,python-3.x,python-multiprocessing,amazon-sagemaker,Python 3.x,Python Multiprocessing,Amazon Sagemaker,库multprocessing在sagemaker conda-python3上运行良好吗?这当然取决于您考虑的用例,但通常对于使用多处理池的函数的并行处理,它运行良好,我经常使用它。例如: 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)

库multprocessing在sagemaker conda-python3上运行良好吗?

这当然取决于您考虑的用例,但通常对于使用多处理池的函数的并行处理,它运行良好,我经常使用它。例如:

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()