Skip to content

[fix][train] Defer W&B authentication to SDK - #2005

Open
bvolpato wants to merge 2 commits into
NovaSky-AI:mainfrom
bvolpato:bvolpato/wandb-netrc-auth
Open

[fix][train] Defer W&B authentication to SDK#2005
bvolpato wants to merge 2 commits into
NovaSky-AI:mainfrom
bvolpato:bvolpato/wandb-netrc-auth

Conversation

@bvolpato

@bvolpato bvolpato commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

SkyRL checked only WANDB_API_KEY before calling W&B. That rejected credentials stored by wandb login and offline runs that do not need API access. It also replaced W&B's authentication errors with a less useful SkyRL assertion.

Changes

  • Remove the environment-only check from training configuration validation.
  • Remove the same check from WandbTracker.
  • Let wandb.init select and validate supported authentication modes.

WANDB_API_KEY behavior remains unchanged. Netrc and offline authentication now follow standard W&B SDK behavior.

Validation

  • Config and logging tests (147 passed)
  • Regression coverage for config validation and WandbTracker without WANDB_API_KEY
  • Training run authenticated through netrc and synchronized metrics successfully
  • pre-commit run --all-files
  • git diff --check upstream/main

@bvolpato bvolpato changed the title [fix][train] Allow W&B netrc authentication [fix][train] Defer W&B authentication to SDK Aug 10, 2026
@bvolpato
bvolpato force-pushed the bvolpato/wandb-netrc-auth branch 2 times, most recently from d53a8ab to cb05331 Compare August 10, 2026 01:07
@bvolpato
bvolpato force-pushed the bvolpato/wandb-netrc-auth branch from cb05331 to f74da0a Compare August 13, 2026 01:21
@bvolpato
bvolpato marked this pull request as ready for review August 13, 2026 01:23

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes explicit checks for the WANDB_API_KEY environment variable in validate_generator_cfg and WandbTracker, deferring authentication directly to the wandb library. Unit tests have been added to ensure that the configuration validation and tracker initialization succeed even when the environment variable is not set. I have no feedback to provide as the changes are clean and well-tested.

@bvolpato
bvolpato force-pushed the bvolpato/wandb-netrc-auth branch from f74da0a to 5c12e97 Compare August 14, 2026 04:39
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