-
Notifications
You must be signed in to change notification settings - Fork 631
Add distributed test cases #4161
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
base: main
Are you sure you want to change the base?
Conversation
| cmd = [ | ||
| 'lmdeploy', 'serve', 'api_server', model_path, '--server-port', | ||
| str(self.api_port), '--tp', | ||
| str(tp), '--backend', backend, '--communicator', communicator | ||
| ] | ||
|
|
||
| if backend == 'turbomind': | ||
| cmd.extend(['--quant-policy', str(quant_policy)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both engines support --quant-policy
But only turbomind engine support --communicator
| def is_port_open(host: str, port: int, timeout: float = 1.0) -> bool: | ||
| """Check if a port is open.""" | ||
| with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: | ||
| s.settimeout(timeout) | ||
| try: | ||
| s.connect((host, port)) | ||
| return True | ||
| except (socket.timeout, ConnectionRefusedError, OSError): | ||
| return False | ||
|
|
||
|
|
||
| def verify_service_functionality(host: str, proxy_port: int, model_name: str, check_count: int) -> bool: | ||
| try: | ||
| url = f'http://{host}:{proxy_port}/v1/chat/completions' | ||
| payload = { | ||
| 'model': model_name, | ||
| 'messages': [{ | ||
| 'role': 'user', | ||
| 'content': 'hi' | ||
| }], | ||
| 'max_tokens': 5, | ||
| 'stream': False | ||
| } | ||
| resp = requests.post(url, json=payload, timeout=15) | ||
| if resp.status_code in (200, 400): | ||
| return True | ||
| else: | ||
| print(f'🔧 Check {check_count}: Service returned status {resp.status_code}') | ||
| return False | ||
| except Exception as e: | ||
| print(f'🔧 Check {check_count}: Failed to verify service functionality - {e}') | ||
| return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can it be reused in ray_distributed_utils.py
| Qwen3-235B-A22B-Thinking-2507: 8 | ||
|
|
||
| dp_ep_config: | ||
| Kimi-K2-Instruct-0905: {"dp": 16, "ep": 16} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use YAML format instead of a JSON string; the configuration reader will parse it into JSON.
Kimi-K2-Instruct-0905:
dp: 16
ep: 16
| - unsloth/gpt-oss-120b-BF16 | ||
|
|
||
|
|
||
| evaluate_model: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may also cover the use of the tp_ep configuration in the future.
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily receiving feedbacks. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
Please describe the motivation of this PR and the goal you want to achieve through this PR.
Modification
Please briefly describe what modification is made in this PR.
BC-breaking (Optional)
Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Checklist