Add auto-deploy feature to StreamWise dashboard#313
Conversation
Add an 'Auto Deploy' button to the web dashboard that automatically optimizes GPU resource allocation across workflow components using the model provisioner's greedy allocator. - Add streamwise/allocator_bridge.py: maps allocator output to K8s deployment parameters (Model enum -> container names, GPU specs) - Add /api/auto_deploy and /api/auto_deploy/confirm routes to streamwise.py for computing and confirming deployment plans - Add auto-deploy UI section to add_pod.html with GPU budget inputs, workflow selector, and deployment plan preview - Add comprehensive tests for allocator bridge and auto-deploy API Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ectory Add streamwise/ directory to sys.path explicitly in allocator_bridge.py so model_provisioner can be found when Python is invoked from a different working directory (e.g., in Docker/pipeline environments). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The StreamWise Docker image was missing the model_provisioner/ package and simulator/ foundation modules needed by the auto-deploy feature. - Update deployment/setup_image.sh to copy model_provisioner/ and simulator/ into the Docker build context - Update Dockerfile to COPY both directories - Fix model_provisioner/__init__.py to find simulator/ in both local dev layout (../../simulator) and Docker layout (../simulator) - Guard sys.path.insert with dedup check in allocator_bridge.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
91cf042 to
38997c3
Compare
The model_provisioner and simulator foundation modules (sim_types, data_loading, utils, greedy) require pandas and tabulate which were not previously needed by the StreamWise Docker image. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new "Auto Deploy" feature to the StreamWise dashboard: an HTTP API and UI that runs the greedy AutoModelAllocator over a user-supplied GPU budget + workflow, previews the resulting per-container deployment plan, and (on confirm) creates the corresponding pods via pod_manager.add_pod. A new bridge module translates the simulator's abstract Model/GPUType allocations into concrete K8s container specs, and the Dockerfile/setup script now bundle model_provisioner and simulator into the streamwise image.
Changes:
- New
streamwise/allocator_bridge.pymappingModel/GPUTypeallocations to deployment specs and exposingrun_allocator+ JSON serialization. - New
/api/auto_deploy,/api/auto_deploy/confirm,/api/auto_deploy/workflowsroutes instreamwise.py, plus an Auto-Deploy UI section inadd_pod.htmlwith optimize/confirm flow. - Packaging changes (
Dockerfile,setup_image.sh,requirements.txt) to shipsimulator+model_provisionerand addpandas/tabulate; new tests for the bridge and the API routes.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| streamwise/allocator_bridge.py | New bridge: Model→container/MIG/resource mapping and run_allocator/serialization helpers. |
| streamwise/streamwise.py | Three new auto-deploy routes invoking the bridge and pod_manager.add_pod. |
| streamwise/templates/add_pod.html | Auto-deploy form, results table, and fetch logic for optimize/confirm. |
| streamwise/requirements.txt | Adds pandas and tabulate dependencies. |
| deployment/streamwise/Dockerfile | Copies model_provisioner and simulator into the image. |
| deployment/setup_image.sh | Stages model_provisioner and simulator for the streamwise image build. |
| tests/streamwise/test_allocator_bridge.py | Unit/integration tests for the bridge (mappings, specs, real allocator runs). |
| tests/streamwise/test_streamwise_auto_deploy.py | API tests for the three new routes, with K8s mocks and allocator patches. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/realtimevideogen/sessions/e52c100d-a760-4a1a-8771-416155f3e835 Co-authored-by: James-QiuHaoran <22564180+James-QiuHaoran@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Add an Auto Deploy button to the web dashboard that automatically optimizes GPU resource allocation across workflow components using the model provisioner's greedy allocator.
Changes
streamwise/allocator_bridge.py(new): Maps allocator output to K8s deployment parameters (Model enum → container names, GPU specs)streamwise/streamwise.py: Add/api/auto_deployand/api/auto_deploy/confirmroutesstreamwise/templates/add_pod.html: Auto-deploy UI section with GPU budget inputs, workflow selector, and deployment plan previewtests/streamwise/test_allocator_bridge.py(new): 15 tests for allocator bridgetests/streamwise/test_streamwise_auto_deploy.py(new): 10 tests for auto-deploy APITesting