apple / turicreate

Turi Create simplifies the development of custom machine learning models.
BSD 3-Clause "New" or "Revised" License
11.2k stars 1.14k forks source link

set the number of threads in recommendation module #3420

Closed fatemeh9264 closed 3 years ago

fatemeh9264 commented 3 years ago

Is it possible to change the configuration and set the maximum number of threads to run the recommendation module?

TobyRoseman commented 3 years ago

Before importing turicreate, set the OMP_NUM_THREADS environment variable to your max number.

If you wanted the maximum number of threads to be 5, you could do:

import os
os.env["OMP_NUM_THREADS"] = 5
import turicreate

I'm going to close this issue, but let me know if you have any issues or more questions.