diff --git a/src/promptflow/promptflow/executor/_line_execution_process_pool.py b/src/promptflow/promptflow/executor/_line_execution_process_pool.py index 369779364663..620c9e865988 100644 --- a/src/promptflow/promptflow/executor/_line_execution_process_pool.py +++ b/src/promptflow/promptflow/executor/_line_execution_process_pool.py @@ -434,7 +434,7 @@ def _calculate_worker_count_with_fork(self): worker_count = min(self._DEFAULT_WORKER_COUNT, self._nlines) bulk_logger.info("Using fork to create new process.") bulk_logger.info( - f"Set process count to ({worker_count}) by taking the minimum value among the " + f"Set process count to {worker_count} by taking the minimum value among the " f"default worker_count ({self._DEFAULT_WORKER_COUNT}) and the row count ({self._nlines}).") return worker_count @@ -445,7 +445,7 @@ def _calculate_worker_count_without_fork(self, estimated_available_worker_count) "The environment variable PF_WORKER_COUNT is not set or invalid. Calculate the worker count based " "on the currently memory usage.") bulk_logger.info( - f"Set process count to ({worker_count}) by taking the minimum value among estimated process " + f"Set process count to {worker_count} by taking the minimum value among estimated process " f"count ({estimated_available_worker_count}), the row count ({self._nlines}) and the default " f"worker count ({self._DEFAULT_WORKER_COUNT}).") return worker_count diff --git a/src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py b/src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py index 9452f60ed292..185446d1f636 100644 --- a/src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py +++ b/src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py @@ -87,7 +87,7 @@ def test_fork_mode_parallelism_in_subprocess( else: mock_logger.info.assert_any_call("Using fork to create new process.") mock_logger.info.assert_any_call( - f"Set process count to ({n_process}) by taking the minimum value among the " + f"Set process count to {n_process} by taking the minimum value among the " f"default worker_count ({pool._DEFAULT_WORKER_COUNT}) and the row count ({nlines})." ) @@ -146,7 +146,7 @@ def test_spawn_mode_parallelism_in_subprocess( "count based on the currently memory usage." ) mock_logger.info.assert_any_call( - f"Set process count to ({n_process}) by taking the minimum value among estimated " + f"Set process count to {n_process} by taking the minimum value among estimated " f"process count ({estimated_available_worker_count}), the row count ({nlines}) and the " f"default worker count ({pool._DEFAULT_WORKER_COUNT})." )