deploy_utils.py w async execution support #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enhances the deploy_utils.py file to support asynchronous execution of the
pipeline_run
method usingrun_in_threadpool
. This change allows the server to handle multiple pipeline requests concurrently, improving performance and efficiency.I've already tested it locally with a
docker-compose.yml
withwhere
my_custom_deploy_utils.py
is the adjusted file (with run_in_threadpool etc)If you need additional testing resources, I've created a dummy component that just waits, some pipeline and
send_requests_and_save.py
that makes multiple async request in orderpreviously
Returned syncronous result of the format
(pipeline 4 starts after all tasks from pipeline 1 are ended)
With the changes, it returned me
which look intertwined (async)
test_pipelines.zip