From 27e7e19ce3a67288c99db0603f1dd5929745c9d5 Mon Sep 17 00:00:00 2001 From: Dougal Dobie Date: Fri, 26 Jul 2024 13:38:22 +1000 Subject: [PATCH] Fixed logging in calculate_n_partitions --- vast_pipeline/utils/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vast_pipeline/utils/utils.py b/vast_pipeline/utils/utils.py index 2fccddd3..39016b54 100644 --- a/vast_pipeline/utils/utils.py +++ b/vast_pipeline/utils/utils.py @@ -397,7 +397,9 @@ def calculate_n_partitions(df, n_cpu, partition_size_mb=100): # n_partitions should be >= n_cpu for optimal parallel processing if n_partitions < n_cpu: n_partitions=n_cpu + + partition_size_mb = int(np.ceil(mem_usage_mb/n_partitions)) - logger.debug("Using {n_partitions} partions of {partition_size}MB") + logger.debug(f"Using {n_partitions} partions of {partition_size_mb}MB") return n_partitions