Skip to content

[perf] Add thread pool execution to data processing #3379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

sunlei1024
Copy link
Collaborator

This PR introduces a thread pool to improve the execution of data processing tasks. The main changes include:

Adding a configurable thread pool to handle concurrent data processing.

Updating relevant functions to submit tasks to the thread pool.

Ensuring proper shutdown and resource management for threads.

Benefits:

Improved performance for large-scale data processing.

Better utilization of system resources.

Easier scalability for future enhancements.

Testing:

Verified data processing completes successfully with multiple threads.

Confirmed no resource leaks or deadlocks during execution.

Copy link

paddle-bot bot commented Aug 13, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Aug 13, 2025
Copy link
Collaborator

@ltd0924 ltd0924 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改一下日志

@@ -50,6 +53,7 @@ def __init__(
enable_logprob=False,
workers=1,
tool_parser=None,
data_processor_max_workers=5,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么设置为5

@@ -123,7 +135,7 @@ def add_requests(self, task):
Returns:
None
"""

api_server_logger.info(f"add_requests:{task} in [thread.{threading.current_thread().name}]")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改成debug 吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants