Skip to content

Add auto-deploy feature to StreamWise dashboard#313

Open
James-QiuHaoran wants to merge 10 commits into
hqiu/refactor-model-provisionerfrom
hqiu/auto-deploy
Open

Add auto-deploy feature to StreamWise dashboard#313
James-QiuHaoran wants to merge 10 commits into
hqiu/refactor-model-provisionerfrom
hqiu/auto-deploy

Conversation

@James-QiuHaoran
Copy link
Copy Markdown
Collaborator

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.

Depends on: #312 (refactor: move policies to model_provisioner)

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_deploy and /api/auto_deploy/confirm routes
  • streamwise/templates/add_pod.html: Auto-deploy UI section with GPU budget inputs, workflow selector, and deployment plan preview
  • tests/streamwise/test_allocator_bridge.py (new): 15 tests for allocator bridge
  • tests/streamwise/test_streamwise_auto_deploy.py (new): 10 tests for auto-deploy API

Testing

  • 108 streamwise tests pass (1 pre-existing Windows failure: \ est_list_files)
  • flake8 clean
  • mypy clean

Haoran Qiu and others added 3 commits May 16, 2026 16:32
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>
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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py mapping Model/GPUType allocations to deployment specs and exposing run_allocator + JSON serialization.
  • New /api/auto_deploy, /api/auto_deploy/confirm, /api/auto_deploy/workflows routes in streamwise.py, plus an Auto-Deploy UI section in add_pod.html with optimize/confirm flow.
  • Packaging changes (Dockerfile, setup_image.sh, requirements.txt) to ship simulator + model_provisioner and add pandas/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.

Comment thread streamwise/streamwise.py
Comment thread streamwise/allocator_bridge.py Outdated
Comment thread tests/streamwise/test_allocator_bridge.py
Comment thread streamwise/allocator_bridge.py
Comment thread streamwise/streamwise.py
Comment thread tests/streamwise/test_streamwise_auto_deploy.py
Comment thread tests/streamwise/test_streamwise_auto_deploy.py
Comment thread streamwise/streamwise.py Outdated
Comment thread streamwise/allocator_bridge.py
Comment thread streamwise/streamwise.py
James-QiuHaoran and others added 5 commits May 17, 2026 15:24
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>
Copy link
Copy Markdown

Copilot AI commented May 17, 2026

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:

  • example.com
    • Triggering command: /home/REDACTED/.local/bin/pytest /home/REDACTED/.local/bin/pytest --ignore=tests/simulator --ignore=tests/streamwise --ignore=tests/streamwise_app -vv -main/dist/indexgpg.program (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

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.

4 participants