Skip to content

fix: drop references to wandb's removed RunDisabled class - #21919

Open
dmitryduev wants to merge 3 commits into
Lightning-AI:masterfrom
dmitryduev:rm-wandb-rundisabled
Open

dmitryduev wants to merge 3 commits into
Lightning-AI:masterfrom
dmitryduev:rm-wandb-rundisabled

Conversation

@dmitryduev

Copy link
Copy Markdown

wandb deprecated RunDisabled in v0.17.6 (wandb/wandb#8064): since then, wandb.init(mode="disabled") returns a regular no-op wandb.Run, and RunDisabled has been an empty compatibility shim that emits a deprecation warning on attribute access. The shim is being removed in an upcoming wandb release (wandb/wandb#12586), after which importing it raises ImportError.

This PR drops the remaining references so the integration keeps working with upcoming wandb releases, while remaining compatible with older ones.

Details:

  • WandbLogger.experiment imports RunDisabled at runtime, so every WandbLogger user would crash once the class is removed from wandb.
  • With older wandb (< 0.17.6, still allowed by the wandb>=0.12.10 requirement), disabled-mode stub runs no longer pass the isinstance gate before define_metric — that call was a no-op on those stubs anyway, so behavior is unchanged.
  • Also removes the docs nitpick entry and the RunDisabled attribute from the wandb mock in tests_pytorch/loggers/conftest.py.

@dmitryduev
dmitryduev marked this pull request as ready for review August 26, 2026 07:02
@dmitryduev dmitryduev changed the title Drop references to wandb's removed RunDisabled class fix: drop references to wandb's removed RunDisabled class Aug 26, 2026
@dmitryduev

Copy link
Copy Markdown
Author

Hey @tchaton @williamFalcon @justusschock @ethanwharris any chance to get this reviewed+merged? Thanks!

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant