Skip to main content

Live visualization for GEPA prompt-optimization runs.

Project description

gepa-viz

Live visualization for GEPA prompt-optimization runs.

pip install gepa-viz

Live run

Use GepaVizCallback as a context manager. Entering it spins up the dashboard (a browser tab opens automatically) and streams the run to the page over SSE as the optimizer works. Exiting dumps run.json and keeps the viewer alive until you press Ctrl+C.

from gepa_viz import GepaVizCallback

# DSPy
with GepaVizCallback(valset, trainset=trainset) as cb:
    dspy.GEPA(..., gepa_kwargs={"callbacks": [cb]}).compile(student, ...)

# Base gepa
with GepaVizCallback(valset, trainset=trainset) as cb:
    gepa.optimize(..., callbacks=[cb])

No second terminal or CLI step is needed — the viewer is part of the callback.

For headless/CI runs, pass live=False to skip the server and just dump run.json at the end:

with GepaVizCallback(valset, live=False, path="run.json") as cb:
    ...

__init__ options: path, trainset, live (default True), host (127.0.0.1), port (5151), open_browser (True), keep_alive (True), endpoint (None), endpoint_timeout (5.0).

Stream into a separate server

Instead of embedding a server, point the callback at a preexisting one with endpoint=. Snapshots are POSTed to <endpoint>/ingest; the callback starts no server of its own. Start the server with the CLI:

gepa-viz live                      # serves the SPA + /events + /ingest on :5151
with GepaVizCallback(valset, endpoint="http://127.0.0.1:5151") as cb:
    dspy.GEPA(..., gepa_kwargs={"callbacks": [cb]}).compile(student, ...)

The server fans every pushed snapshot out to connected browsers over SSE. This also works across machines — run gepa-viz live --host 0.0.0.0 and point the producer's endpoint at it.

Re-open a finished run

run.json is a durable artifact. Re-open it any time in a static viewer (loads once, no polling, no stream):

gepa-viz serve --file run.json

A browser tab opens to http://127.0.0.1:5151.

See the project README at the repo root for the full architecture and contributor docs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gepa_viz-0.1.0.tar.gz (119.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gepa_viz-0.1.0-py3-none-any.whl (122.9 kB view details)

Uploaded Python 3

File details

Details for the file gepa_viz-0.1.0.tar.gz.

File metadata

  • Download URL: gepa_viz-0.1.0.tar.gz
  • Upload date:
  • Size: 119.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gepa_viz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 375b25b6c3e5f963cbfeb3f4b1bba06df005f73041b6920cff893c1aeda38b2e
MD5 8f7167730ec05e13945f7288e514b010
BLAKE2b-256 c72969277ce1f5a190aaf734870630734cd627ee3e5f631e37b1e56400009212

See more details on using hashes here.

Provenance

The following attestation bundles were made for gepa_viz-0.1.0.tar.gz:

Publisher: publish.yml on modaic-ai/gepa-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gepa_viz-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gepa_viz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 122.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gepa_viz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d967f22cd4ebc6e79573a34b3764e5b1d69c4277018a46c86b5030b906f5a50
MD5 9927051a0a0eb83a13061c3cccf6826a
BLAKE2b-256 92c87e71bd97946743d5f30e1f46a8d83031dbce44cb4ce35c3a22cf111048d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gepa_viz-0.1.0-py3-none-any.whl:

Publisher: publish.yml on modaic-ai/gepa-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page