Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion fastchat/serve/launch_all_serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@

parser.add_argument("--worker-host", type=str, default="localhost")
parser.add_argument("--worker-port", type=int, default=21002)
# parser.add_argument("--worker-address", type=str, default="http://localhost:21002")
parser.add_argument(
"--worker-address",
type=str,
default=None,
help="Address registered with the controller. "
"Defaults to http://{worker-host}:{worker-port}; "
"overridden per worker from --model-path-address.",
)
# parser.add_argument(
# "--controller-address", type=str, default="http://localhost:21001"
# )
Expand Down Expand Up @@ -129,6 +136,7 @@
worker_args = [
"worker-host",
"worker-port",
"worker-address",
"model-path",
"revision",
"device",
Expand Down Expand Up @@ -242,6 +250,9 @@ def launch_worker(item):
)

args.model_path, args.worker_host, args.worker_port = item.split("@")
# model_worker registers with --worker-address independently of --host/--port.
# Keep them aligned so the controller can reach the worker on the custom port.
args.worker_address = f"http://{args.worker_host}:{args.worker_port}"
print("*" * 80)
worker_str_args = string_args(args, worker_args)
print(worker_str_args)
Expand Down
Loading