Skip to content

Commit

Permalink
Making chunksize smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
ancestor-mithril committed Aug 7, 2024
1 parent 5623b80 commit ca18772
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dice_score_3d/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ def execute_evaluate_predictions(gt_files: List[str], pred_files: List[str], reo
ret = [evaluate_prediction(gt, pred, reorient, dtype, indices) for gt, pred in tqdm(
list(zip(gt_files, pred_files)))]
else:
chunksize = len(gt_files) // num_workers // 4 # arbitrarily chosen
if chunksize < 4:
chunksize = 1
chunksize = min(len(gt_files) // 50 // num_workers, 1) # 50 is arbitrarily chosen
ret = process_map(evaluate_prediction_wrapper,
[(gt, pred, reorient, dtype, indices) for gt, pred in zip(gt_files, pred_files)],
max_workers=num_workers, chunksize=chunksize)
Expand Down

0 comments on commit ca18772

Please sign in to comment.