Add Python-configured independent worker deployments - #55
kailash109 wants to merge 26 commits into
Conversation
|
Some design considerations:
and if we really want to avoid duplicating code, can do something like
My review agent flagged a few other implementation details like
but these can come after we align on the config design / validation story |
…-design # Conflicts: # src/lilo/providers/modal/app.py # tests/backends/test_miles.py
Model deployments were tied to a manually maintained catalog. This adds Python infrastructure configs and independently deployed trainer/inference worker apps, while keeping one Tinker-compatible frontend for all models.
Configs export a
Deploymentcomposed from typedModel,Compute,Trainer, andInferencedataclasses. Variants use ordinarydataclasses.replace. Unknown orchestration fields are rejected; backend tuning stays in explicit dictionaries. There is no custom inheritance parser or dotted override syntax.Backend settings are resolved once and stored with the deployment. Worker launchers consume those settings. SGLang constructs
ServerArgsdirectly; Miles-specific argparse handling stays inside its adapter. Megatron constructors share one ownership rule: extra options may add fields, but cannot replace managed fields. This prevents optimizer keyword collisions and removes attribute-patching override loops.Compute, trainer timeout, inference startup timeout, and replica scaling are wired through. Unsupported trainer minimum instances and generic inference timeout fields are rejected. The merged multi-node Miles launcher is integrated through
Compute.nodes, including a two-node Qwen3.8-27B 256K example.Worker hashes track settings and explicit per-role code releases, without a whole-source fingerprint. Unchanged worker apps are reused, and existing jobs retain their recorded workers. Frontend selection belongs to the deployment command, not model configs. Earlier draft manifests require migration or a fresh registry; automatic old-worker cleanup is not included.
Validation: 651 CPU tests passed, 1 skipped. Coverage includes config typos, duplicate backend settings, all 15 examples, compute propagation, direct SGLang construction, saved records, update isolation/retries, and multi-node launcher wiring. Ruff and whitespace checks pass. No redeployment or GPU validation was performed for this revision. Historical live results in
docs/deployment-validation.mdare explicitly identified as earlier revisions.See
docs/deployment-configs.mdfor the configuration-to-launch code path and examples.