Repository navigation
Description
Describe the bug
_link_and_save_file() in wandb/sdk/internal/tb_watcher.py calls os.symlink() unconditionally:
# We overwrite existing symlinks because namespaces can change in Tensorboardif os.path.islink(wandb_path) and abs_path != os.readlink(wandb_path): os.remove(wandb_path) os.symlink(abs_path, wandb_path)elif not os.path.exists(wandb_path): os.symlink(abs_path, wandb_path)Windows refuses symlink creation unless the process is elevated or Developer Mode is enabled — neither is the default — so wandb.init(sync_tensorboard=True) raises:
OSError: [WinError 1314] A required privilege is not held by the client: '...\tb\events.out.tfevents.123' -> '...\files\events.out.tfevents.123'wandb already handles this everywhere else
This is what makes it look like an oversight rather than a design decision. Three separate mechanisms exist for exactly this problem, and tb_watcher consults none of them:
_link_and_save_file already receives settings, so the setting is right there and simply is not read.
Related closed issues suggest this class was addressed before and this path was missed: #1370 ("wandb 10.x creates symlinks, which require administrator") and #1436 ("remove symlink for windows").
_link_and_save_file() in wandb/sdk/internal/tb_watcher.py calls os.symlink() unconditionally:We overwrite existing symlinks because namespaces can change in Tensorboard
if os.path.islink(wandb_path) and abs_path != os.readlink(wandb_path):
os.remove(wandb_path)
os.symlink(abs_path, wandb_path)
elif not os.path.exists(wandb_path):
os.symlink(abs_path, wandb_path)
Windows refuses symlink creation unless the process is elevated or Developer Mode is enabled — neither is the default — so wandb.init(sync_tensorboard=True) raises:
OSError: [WinError 1314] A required privilege is not held by the client:
'...\tb\events.out.tfevents.123' -> '...\files\events.out.tfevents.123'
wandb already handles this everywhere else
This is what makes it look like an oversight rather than a design decision. Three separate mechanisms exist for exactly this problem, and tb_watcher consults none of them:
Location Handling
wandb_settings.py:580 symlink: bool = Field(default_factory=lambda: platform.system() != "Windows") — defaults to False on Windows
filesystem.link_or_copy() Honours settings.symlink, then falls back symlink → hardlink → copy
wandb_init.py:594 Wraps its own os.symlink in try/except OSError
tb_watcher.py:55,57 Raw os.symlink
_link_and_save_file already receives settings, so the setting is right there and simply is not read.
Related closed issues suggest this class was addressed before and this path was missed: #1370 ("wandb 10.x creates symlinks, which require administrator") and #1436 ("remove symlink for windows").
Activity
iam-kira commentedon Sep 5, 2026
Closing as obsolete. I filed this against a stale checkout —
tb_watcher.pywas removed in #12694 along with
wandb sync --sync-tensorboardin #12686, sothe code path described here no longer exists. Sorry for the noise.