how do I disable multiprocessing? #2184
-
as far as I can tell albumentations automatically performs multiprocessing, but I want to run one augmentation per cpu core (I want to manage the multiprocessing myself). Is it possible to disable multiprocessing for albumentations? |
Beta Was this translation helpful? Give feedback.
Answered by
ternaus
Dec 12, 2024
Replies: 1 comment 1 reply
-
Albumentations by itself does not perform multiprocessing, but libraries it depends on could, like opencv or numpy. import os
os.environ["OMP_NUM_THREADS"] = "1"
os.environ["OPENBLAS_NUM_THREADS"] = "1"
os.environ["MKL_NUM_THREADS"] = "1"
os.environ["VECLIB_MAXIMUM_THREADS"] = "1"
os.environ["NUMEXPR_NUM_THREADS"] = "1" should do the job. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
alita-moore
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Albumentations by itself does not perform multiprocessing, but libraries it depends on could, like opencv or numpy.
should do the job.