Skip to content

Commit

Permalink
Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiltsov-max committed Mar 13, 2024
1 parent 4c767ad commit 8871081
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions datumaro/plugins/synthetic_data/image_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 8871081

Please sign in to comment.