Skip to content

Style async nodes in graph visualizations#1603

Open
officialasishkumar wants to merge 1 commit into
apache:mainfrom
officialasishkumar:feat/async-node-visualization
Open

Style async nodes in graph visualizations#1603
officialasishkumar wants to merge 1 commit into
apache:mainfrom
officialasishkumar:feat/async-node-visualization

Conversation

@officialasishkumar
Copy link
Copy Markdown

Adds a distinct graphviz style and legend entry for async-backed Hamilton nodes so DAG visualizations can signal when AsyncDriver is needed for execution.

Changes

  • Added async callable detection in graphviz visualization generation.
  • Applied a distinct async node style and included it in the legend ordering.
  • Added regression coverage asserting async nodes and their legend entry render with the async style.

How I tested this

  • uv run --with pytest --with graphviz pytest tests/test_graph.py::test_create_graphviz_graph_styles_async_nodes
  • uv run ruff format --check hamilton/graph.py tests/test_graph.py
  • uv run ruff check hamilton/graph.py tests/test_graph.py

Notes

Fixes #1182.

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

@skrawcz
Copy link
Copy Markdown
Contributor

skrawcz commented May 25, 2026

Can you provide a screenshot please?

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.

visualization: style async nodes

2 participants