tensorflow / tensorflow/tensorboard
Tensorboard closes unclosed HTML tags in text log
Open
Nobody has claimed this yet.
plugin:text
- Dominant language
- TypeScript
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 1
Description
Environment information
--- check: autoidentify
INFO: diagnose_tensorboard.py version c6ca9f1d004e2a1bc7c160abc43be229b82cad7e
--- check: general
INFO: sys.version_info: sys.version_info(major=3, minor=11, micro=11, releaselevel='final', serial=0)
INFO: os.name: posix
INFO: sys.getwindowsversion(): N/A
--- check: package_management
INFO: has conda-meta: False
INFO: $VIRTUAL_ENV: '/Users/[DELETED]/projects/test-tensorboard/.venv'
--- check: installed_packages
Traceback (most recent call last):
File "/Users/[DELETED]/projects/test-tensorboard/dt.py", line 511, in main
suggestions.extend(check())
File "/Users/[DELETED]/projects/test-tensorboard/dt.py", line 185, in installed_packages
freeze = pip(["freeze", "--all"]).decode("utf-8").splitlines()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/[DELETED]/projects/test-tensorboard/dt.py", line 109, in pip
return subprocess.check_output(command)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/[DELETED]/.local/share/uv/python/cpython-3.11.11-macos-aarch64-none/lib/python3.11/subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/[DELETED]/.local/share/uv/python/cpython-3.11.11-macos-aarch64-none/lib/python3.11/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/Users/[DELETED]/projects/test-tensorboard/.venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'freeze', '--all']' returned non-zero exit status 1.
--- check: tensorboard_python_version
INFO: tensorboard.version.VERSION: '2.19.0'
--- check: tensorflow_python_version
Traceback (most recent call last):
File "/Users/[DELETED]/projects/test-tensorboard/dt.py", line 511, in main
suggestions.extend(check())
^^^^^^^
File "/Users/[DELETED]/projects/test-tensorboard/dt.py", line 81, in wrapper
result = fn()
^^^^
File "/Users/[DELETED]/projects/test-tensorboard/dt.py", line 267, in tensorflow_python_version
import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'
--- check: tensorboard_data_server_version
INFO: data server binary: None
--- check: tensorboard_binary_path
INFO: which tensorboard: b'/Users/[DELETED]/projects/test-tensorboard/.venv/bin/tensorboard\n'
--- check: addrinfos
socket.has_ipv6 = True
socket.AF_UNSPEC = <AddressFamily.AF_UNSPEC: 0>
socket.SOCK_STREAM = <SocketKind.SOCK_STREAM: 1>
socket.AI_ADDRCONFIG = <AddressInfo.AI_ADDRCONFIG: 1024>
socket.AI_PASSIVE = <AddressInfo.AI_PASSIVE: 1>
Loopback flags: <AddressInfo.AI_ADDRCONFIG: 1024>
Loopback infos: [(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 0)), (<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('::1', 0, 0, 0))]
Wildcard flags: <AddressInfo.AI_PASSIVE: 1>
Wildcard infos: [(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('::', 0, 0, 0)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('0.0.0.0', 0))]
--- check: readable_fqdn
INFO: socket.getfqdn(): '1.0.0.127.in-addr.arpa'
--- check: stat_tensorboardinfo
INFO: directory: /var/folders/00/h7yr1br9729g8rs335w9yjk00000gp/T/.tensorboard-info
INFO: os.stat(...): os.stat_result(st_mode=16895, st_ino=10273270, st_dev=16777234, st_nlink=2, st_uid=502, st_gid=20, st_size=64, st_atime=1740626089, st_mtime=1740627747, st_ctime=1740627747)
INFO: mode: 0o40777
--- check: source_trees_without_genfiles
INFO: tensorboard_roots (1): ['/Users/[DELETED]/projects/test-tensorboard/.venv/lib/python3.11/site-packages']; bad_roots (0): []
--- check: full_pip_freeze
Traceback (most recent call last):
File "/Users/[DELETED]/projects/test-tensorboard/dt.py", line 511, in main
suggestions.extend(check())
^^^^^^^
File "/Users/[DELETED]/projects/test-tensorboard/dt.py", line 81, in wrapper
result = fn()
^^^^
File "/Users/[DELETED]/projects/test-tensorboard/dt.py", line 478, in full_pip_freeze
"pip freeze --all:\n%s", pip(["freeze", "--all"]).decode("utf-8")
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/[DELETED]/projects/test-tensorboard/dt.py", line 109, in pip
return subprocess.check_output(command)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/[DELETED]/.local/share/uv/python/cpython-3.11.11-macos-aarch64-none/lib/python3.11/subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/[DELETED]/.local/share/uv/python/cpython-3.11.11-macos-aarch64-none/lib/python3.11/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/Users/[DELETED]/projects/test-tensorboard/.venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'freeze', '--all']' returned non-zero exit status 1.
Issue description
text log unexpectedly closes unclosed tags, for example hello!<think> becomes hello!<think></think>.
Steps to reproduce:
from torch.utils.tensorboard import SummaryWriter
writer = SummaryWriter(log_dir='logs')
writer.add_text("test", "Hello from test-tensorboard!<think>")
writer.close()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided SummaryWriter.add_text reproduction and inspect how TensorBoard renders text logs. Verify whether an unclosed tag is being auto-closed, then add a regression test for the reported input and confirm that the displayed text preserves the original tag structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100