From 88710818aadeeb7bcd019d8abd3e7fdd69786709 Mon Sep 17 00:00:00 2001 From: Maxim Zhiltsov Date: Wed, 13 Mar 2024 19:09:22 +0200 Subject: [PATCH] Update code --- datumaro/plugins/synthetic_data/image_generator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/datumaro/plugins/synthetic_data/image_generator.py b/datumaro/plugins/synthetic_data/image_generator.py index 5634561333..3f6533ff59 100644 --- a/datumaro/plugins/synthetic_data/image_generator.py +++ b/datumaro/plugins/synthetic_data/image_generator.py @@ -67,8 +67,9 @@ def generate_dataset(self) -> None: mp_ctx = get_context("spawn") # On Mac 10.15 and Python 3.7 fork leads to hangs with mp_ctx.Pool(processes=self._cpu_count) as pool: params = pool.map( - self._generate_category, [Random(i) for i in range(self._categories)] - ) # nosec - disable B311 + self._generate_category, + [Random(i) for i in range(self._categories)], # nosec - disable B311 + ) instances_weights = np.repeat(self._weights, self._instances, axis=0) weight_per_img = np.tile(instances_weights, (self._categories, 1))