-
Notifications
You must be signed in to change notification settings - Fork 301
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
pyflyte run
& register
asynchronously
#2276
pyflyte run
& register
asynchronously
#2276
Conversation
pyflyte remote run
: asynchronous registrationpyflyte run --remote
: asynchronous registration
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2276 +/- ##
==========================================
+ Coverage 83.04% 83.57% +0.52%
==========================================
Files 324 324
Lines 24861 24658 -203
Branches 3547 3510 -37
==========================================
- Hits 20645 20607 -38
+ Misses 3591 3421 -170
- Partials 625 630 +5 ☔ View full report in Codecov by Sentry. |
acd159d
to
3bbb889
Compare
pyflyte run --remote
: asynchronous registrationrun
& register
asynchronously
fcf4332
to
110375c
Compare
c30c359
to
1d1f7d4
Compare
Signed-off-by: Austin Liu <[email protected]> fix Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]> lint Signed-off-by: Austin Liu <[email protected]> fix dependency Signed-off-by: Austin Liu <[email protected]> fix dependency Signed-off-by: Austin Liu <[email protected]> fix dependency Signed-off-by: Austin Liu <[email protected]> fix dependency Signed-off-by: Austin Liu <[email protected]> fix Signed-off-by: Austin Liu <[email protected]> lint Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
4859018
to
e3b167a
Compare
Signed-off-by: Austin Liu <[email protected]> clean up Signed-off-by: Austin Liu <[email protected]> clean up Signed-off-by: Austin Liu <[email protected]> clean up Signed-off-by: Austin Liu <[email protected]> clean up Signed-off-by: Austin Liu <[email protected]>
e3b167a
to
da60031
Compare
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]> Signed-off-by: Jan Fiedler <[email protected]>
run
& register
asynchronouslyrun
& register
asynchronously
Tracking issue
NA
Why are the changes needed?
To make register
task
,workflow
, andlaunchplan
x2.5 ~ x4 faster inpyflyte run
andpyflyte register
by leveragingasyncio
.What changes were proposed in this pull request?
How was this patch tested?
Setup process
After introducing localhost network latency to
1000ms
per request, we can simulate network IO-intensive operations to cloud services (e.g., object storage, Kubernetes cluster, FlyteAdmin) on your own desktop. This way, we can finally evaluate performance improvements throughasyncio
without setup a real cluster outside. Otherwise, the Flyte sandbox cluster residing in macOS is just too fast to measure.Steps to reproduce network condition:
sudo pfctl -E
: Enabling the latency setup in packfilter.sudo dnctl pipe 1 config delay 1000ms && echo "dummynet in from any to any pipe 1" | sudo pfctl -f -
: Adding 1000ms latency to every dummynet requests.sudo pfctl -F all -f /etc/pf.conf
: To reset and remove the delay.Screenshots
34.1s
to16.1s
after introducing asynchronous registration.task
, 1wf
, 1lp
.1. Register in the
sync
manner:21.1s
python3 -m cProfile -o sync_requests_500ms.prof ./flytekit/clis/sdk_in_container/pyflyte.py register ./workflow.py
snakeviz ./sync_requests_500ms.prof
2. Register in the
async
manner:6.05s
python3 -m cProfile -o async_requests_500ms.prof ./flytekit/clis/sdk_in_container/pyflyte.py register ./workflow.py
snakeviz ./async_requests_500ms.prof
3. Run in the
async
manner:5.95s
python3 -m cProfile -o async_requests_500ms_run.prof ./flytekit/clis/sdk_in_container/pyflyte.py run --remote ./workflow.py wf
snakeviz ./async_requests_500ms_run.prof
Check all the applicable boxes
Related PRs
Docs link