Parallel Processing in Python
Common Python Libraries (Numpy, Sklearn, Pytorch, etc…)
Some Python libraries will parallelize tasks for you. A few of these libraries include numpy, sklearn, and pytorch. If you are working on a shared system like the Yens, you may want to limit the amount of cores these packages can use. The following code should work for the packages listed above:
rcpedia.stanford.edu/topicGuides/parallelProcessingPython