Skip to content

Commit 5ca570f

Browse files
authored
chore: Rename dynamo.ingress to dynamo.frontend (#1944)
1 parent 7b9182f commit 5ca570f

File tree

5 files changed

+18
-15
lines changed

5 files changed

+18
-15
lines changed

components/ingress/README renamed to components/frontend/README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Dynamo ingress / frontend node.
1+
# Dynamo frontend node.
22

3-
Usage: `python -m dynamo.ingress [--http-port <port>]`. Port defaults to 8080.
3+
Usage: `python -m dynamo.frontend [--http-port 8080]`.
44

55
This runs an OpenAI compliant HTTP server, a pre-processor, and a router in a single process. Engines / workers are auto-discovered when they call `register_llm`.
66

Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
from dynamo.ingress.main import main
4+
from dynamo.frontend.main import main
55

66
if __name__ == "__main__":
77
main()

components/ingress/src/dynamo/ingress/main.py renamed to components/frontend/src/dynamo/frontend/main.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
# Usage: `python -m dynamo.ingress [args]`
4+
# Usage: `python -m dynamo.frontend [args]`
55
#
66
# Start a frontend node. This runs:
77
# - OpenAI HTTP server.
@@ -23,32 +23,35 @@ def parse_args():
2323
description="Dynamo Frontend: HTTP+Pre-processor+Router",
2424
formatter_class=argparse.RawTextHelpFormatter, # To preserve multi-line help formatting
2525
)
26+
parser.add_argument(
27+
"-i", "--interactive", action="store_true", help="Interactive text chat"
28+
)
2629
parser.add_argument(
2730
"--kv-cache-block-size", type=int, help="KV cache block size (u32)."
2831
)
2932
parser.add_argument(
3033
"--http-port", type=int, default=8080, help="HTTP port for the engine (u16)."
3134
)
32-
flags = parser.parse_args()
33-
34-
kwargs = {"http_port": flags.http_port}
35-
if flags.kv_cache_block_size is not None:
36-
kwargs["kv_cache_block_size"] = flags.kv_cache_block_size
37-
38-
return kwargs
35+
return parser.parse_args()
3936

4037

4138
async def async_main():
4239
runtime = DistributedRuntime(asyncio.get_running_loop(), False)
4340
flags = parse_args()
4441

4542
# out=dyn
46-
e = EntrypointArgs(EngineType.Dynamic, **flags)
43+
e = EntrypointArgs(
44+
EngineType.Dynamic,
45+
http_port=flags.http_port,
46+
kv_cache_block_size=flags.kv_cache_block_size,
47+
)
4748
engine = await make_engine(runtime, e)
4849

49-
# in=http
5050
try:
51-
await run_input(runtime, "http", engine)
51+
if flags.interactive:
52+
await run_input(runtime, "text", engine)
53+
else:
54+
await run_input(runtime, "http", engine)
5255
except asyncio.exceptions.CancelledError:
5356
pass
5457

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ requires = ["hatchling"]
7979
build-backend = "hatchling.build"
8080

8181
[tool.hatch.build.targets.wheel]
82-
packages = ["deploy/sdk/src/dynamo", "components/planner/src/dynamo", "components/ingress/src/dynamo", "components/backends/llama_cpp/src/dynamo"]
82+
packages = ["deploy/sdk/src/dynamo", "components/planner/src/dynamo", "components/frontend/src/dynamo", "components/backends/llama_cpp/src/dynamo"]
8383

8484
# This section is for including the binaries in the wheel package
8585
# but doesn't make them executable scripts in the venv bin directory

0 commit comments

Comments
 (0)