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

Trim '"_@_XXX_@_"' into 'XXX' #1024

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
'"_@_XXX_@_"' to 'XXX'
  • Loading branch information
shino16 committed Aug 22, 2024
commit b7f5ea36ec7b2637feebb9aeac0444ee7c0c3c11
4 changes: 3 additions & 1 deletion thunder/core/codeutils.py
Original file line number Diff line number Diff line change
@@ -241,9 +241,11 @@ def prettyprint(
unflattened_str = str(unflattened)
# NOTE Collections of strings (so collections of names) print like this --
# ('a', 'b') -- but we want them to print like this -- (a, b) --
# so this just removes all the single quotes -- this seems super hacky
# so this just removes all the quotes -- this seems super hacky
unflattened_str = unflattened_str.replace(f"{_quote_marker}'", "")
unflattened_str = unflattened_str.replace(f"'{_quote_marker}", "")
unflattened_str = unflattened_str.replace(f'{_quote_marker}"', "")
unflattened_str = unflattened_str.replace(f'"{_quote_marker}', "")
return unflattened_str
if isinstance(x, dtypes.dtype):
# str(x) -> thunder.dtypes.foo
Loading