Skip to content

feat: Python decorator dynamo_worker takes optional static parameter without etcd - #494

Merged
grahamking merged 3 commits into
mainfrom
gk-static-endpoint
Apr 4, 2025
Merged

grahamking merged 3 commits into
mainfrom
gk-static-endpoint

Conversation

@grahamking

@grahamking grahamking commented Apr 2, 2025 •

Copy link
Copy Markdown
Contributor

Adds @dynamo_worker(static = True) to create a static worker which has a predictable name and hence does not require discovery or etcd to be running. There can only be a single static worker per namespace / component / endpoint trio.

This contrasts with the default dynamic dynamo_worker endpoints we have now, which get a unique random name (based on namespace/component/endpoint), and are discovered by ingress components using etcd.

Also change the hello_world example to use dynamo_worker(static = True) so that it is exercised and demonstrated somewhere.

For NIM.

@grahamking grahamking changed the title feat: Python decorator dynamo_static_worker without etcd feat: Python decorator dynamo_worker takes optional static parameter without etcd Apr 2, 2025
@grahamking
grahamking enabled auto-merge (squash) April 2, 2025 23:16
@grahamking
grahamking force-pushed the gk-static-endpoint branch from f61ce5b to 11804c8 Compare April 3, 2025 12:38
@dmitry-tokarev-nv

dmitry-tokarev-nv commented Apr 3, 2025 •

Copy link
Copy Markdown
Contributor

@grahamking how was the new functionality tested?

@grahamking

Copy link
Copy Markdown
Contributor Author

@grahamking how was nee functionality tested?

Using the hello_world example, which is included in this PR. Tested as-is first to check no regressions, then upgraded to static = True and re-tested. There are two cases for hello_world, the all-in-one run.py and the split client.py and server.py, so four test cases all together.

Comment thread lib/runtime/src/lib.rs Resolved
Comment thread launch/llmctl/src/main.rs Resolved
Comment thread lib/bindings/python/rust/lib.rs Resolved
Comment thread lib/bindings/python/rust/lib.rs Resolved
Comment thread lib/runtime/src/component.rs Resolved
Comment thread launch/llmctl/src/main.rs Resolved
Introduce `@dynamo_static_worker` as an alternative to `@dynamo_worker`.

Static workers (`dynamo_static_worker`) have a predictable
name and etcd is not required. Ee don't do any runtime discovery.

This contrasts with the dynamic `dynamo_worker` endpoints we have now,
which get a unique random name (based on namespace/component/endpoint),
and are discovered by ingress via etcd.

Change the hello_world example to use dynamo_static_worker so that it is
exercised and demonstrated somewhere.

For NIM.
@grahamking
grahamking merged commit 8c39232 into main Apr 4, 2025
@grahamking
grahamking deleted the gk-static-endpoint branch April 4, 2025 13:26
kylehh pushed a commit to kylehh/dynamo that referenced this pull request Apr 11, 2025
…r without etcd (ai-dynamo#494)

Adds `@dynamo_worker(static = True)` to create a static worker which has a predictable name and hence does not require discovery or `etcd` to be running. There can only be a single static worker per namespace / component / endpoint trio.

This contrasts with the default dynamic `dynamo_worker` endpoints we have now, which get a unique random name (based on namespace/component/endpoint), and are discovered by ingress components using etcd.

Also change the hello_world example to use `dynamo_worker(static = True)` so that it is exercised and demonstrated somewhere.

For NIM.

This branch was previously deployed

1 inactive deployment
GITLAB — 919af11c Deployed Apr 4, 2025 by copy-pr-bot[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants