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

Improve proxy server usage #2488

Merged
merged 6 commits into from
Sep 23, 2024
Merged

Improve proxy server usage #2488

merged 6 commits into from
Sep 23, 2024

Conversation

AllentDan
Copy link
Collaborator

No description provided.

Conflicts:
	lmdeploy/cli/serve.py
	lmdeploy/serve/openai/api_server.py
@lvhan028
Copy link
Collaborator

lvhan028 commented Sep 22, 2024

Let's add another CLI for python3 -m lmdeploy.serve.proxy.proxy --server_name {server_name} --server_port {server_port} --strategy "min_expected_latency"

lmdeploy serve proxy --server-name {server_name} --server-port {server_port} --strategy "min_expected_latency"

default server_port 8000


```shell
curl -X 'POST' \
'http://localhost:10086/nodes/remove?node_url=http://0.0.0.0:23333' \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Which is a more conventional way, "remove/?node_url" or set the parameter in -d field?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Both worked, the command was from swagger UI.

@@ -40,6 +40,9 @@ class VariableInterface:
session_id: int = 0
api_keys: Optional[List[str]] = None
request_hosts = []
# following are for registering to proxy server
proxy_url: Optional[str] = None
api_server_url: Optional[str] = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it necessary? Can we use http://{server_ip}:{server_port} instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is a global variable. VariableInterface.api_server_url = f'{http_or_https}://{server_name}:{server_port}'

lmdeploy/cli/serve.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@RunningLeon RunningLeon left a comment

Choose a reason for hiding this comment

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

LGTM

@lvhan028 lvhan028 merged commit 3da9c9a into InternLM:main Sep 23, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants