Skip to content
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

Support http communication implement for DLRover Master and Agent. #1429

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

BalaBalaYi
Copy link
Collaborator

@BalaBalaYi BalaBalaYi commented Jan 8, 2025

What changes were proposed in this pull request?

  1. Implement a http server based on tornado in master.
  2. Adapt the implementation of the HTTP framework, including both the server and client, without modifying the core business logic, while also maintaining support for gRPC.

Why are the changes needed?

#1366

Does this PR introduce any user-facing change?

User can specify which service to use for communication between the master and agent by using the parameter --service_type=(http/grpc). For details, please refer: dlrover/docs/deployment/argument.md.

How was this patch tested?

UT + training with grpc type service + training with http type service.

@BalaBalaYi BalaBalaYi added do not merge Do not merge for same cases. wip issue or pr with 'wip' will ignore expiration feature labels Jan 8, 2025
@BalaBalaYi BalaBalaYi added this to the v0.5.0 milestone Jan 8, 2025
@BalaBalaYi BalaBalaYi self-assigned this Jan 8, 2025
# Conflicts:
#	dlrover/python/common/constants.py
#	dlrover/python/tests/test_utils.py
#	scripts/ci_install.sh
# Conflicts:
#	dlrover/python/master/args.py
#	dlrover/python/tests/test_args.py
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 92.50681% with 55 lines in your changes missing coverage. Please review.

Project coverage is 81.30%. Comparing base (f762e17) to head (e52d763).

Files with missing lines Patch % Lines
dlrover/python/master/servicer.py 89.17% 17 Missing ⚠️
dlrover/python/common/comm.py 76.31% 9 Missing ⚠️
dlrover/python/common/http_server.py 87.09% 8 Missing ⚠️
dlrover/python/elastic_agent/master_client.py 93.89% 8 Missing ⚠️
dlrover/python/tests/test_http_server.py 94.28% 4 Missing ⚠️
dlrover/python/util/common_util.py 92.72% 4 Missing ⚠️
dlrover/python/master/dist_master.py 60.00% 2 Missing ⚠️
dlrover/python/elastic_agent/tensorflow/hooks.py 0.00% 1 Missing ⚠️
dlrover/python/tests/test_common_util.py 96.29% 1 Missing ⚠️
dlrover/trainer/torch/elastic_run.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1429      +/-   ##
==========================================
+ Coverage   81.22%   81.30%   +0.08%     
==========================================
  Files         238      240       +2     
  Lines       23169    23523     +354     
==========================================
+ Hits        18818    19126     +308     
- Misses       4351     4397      +46     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@workingloong
Copy link
Collaborator

It is very meaningful job. Can we remove the grpc in the following verison?

@BalaBalaYi
Copy link
Collaborator Author

It is very meaningful job. Can we remove the grpc in the following verison?

Maybe. We need more time and practice to verify the performance, reliability, flexibility, etc., of the HTTP approach.

@BalaBalaYi BalaBalaYi removed the wip issue or pr with 'wip' will ignore expiration label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Do not merge for same cases. feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants