Skip to content

[Bug-App]: sync_tensorboard=True fails on Windows without symlink privilege (tb_watcher ignores settings.symlink) #12726

Closed

Description

@iam-kira

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 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").

_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

  1. added
    ty:bugtype of the issue is a bug
    a:appArea: Frontend/Backend
    on Sep 4, 2026
  2. iam-kira commented on Sep 5, 2026

    @iam-kira
    Author

    Closing as obsolete. I filed this against a stale checkout — tb_watcher.py
    was removed in #12694 along with wandb sync --sync-tensorboard in #12686, so
    the code path described here no longer exists. Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:appArea: Frontend/Backendty:bugtype of the issue is a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions