Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

et_visualizer: Escape labels for graph rendering #17

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Conversation

TaekyungHeo
Copy link
Contributor

@TaekyungHeo TaekyungHeo commented Feb 6, 2024

Summary

This pull request introduces a new function escape_label in the et_visualizer module to escape special characters in labels for Graphviz rendering.

Test Plan

$ python3 -m chakra.et_visualizer.et_visualizer --input_filename ~/rank0.chakra --output_filename rank0.pdf
Screenshot 2024-02-06 at 9 18 18 AM

@TaekyungHeo TaekyungHeo requested a review from a team as a code owner February 6, 2024 14:16
Copy link

github-actions bot commented Feb 6, 2024

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@JoongunPark
Copy link
Contributor

JoongunPark commented Feb 6, 2024

What would be the advantage of replacing "special_chars = "{}()<>[]|&-" ?

@TaekyungHeo
Copy link
Contributor Author

@JoongunPark The PR replaces special chars because pydot (graphviz) cannot support special chars in labels.

@mlcommons mlcommons deleted a comment from JoongunPark Feb 6, 2024
Copy link
Contributor

@srinivas212 srinivas212 left a comment

Choose a reason for hiding this comment

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

lgtm

@srinivas212 srinivas212 merged commit b10e357 into main Feb 6, 2024
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 6, 2024
@TaekyungHeo TaekyungHeo deleted the et_visualizer branch February 6, 2024 22:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants