improve: surface extra wandb.init kwargs in WandbBackend (#594)#779
Open
lonexreb wants to merge 1 commit into
Open
improve: surface extra wandb.init kwargs in WandbBackend (#594)#779lonexreb wants to merge 1 commit into
lonexreb wants to merge 1 commit into
Conversation
…log (meta-pytorch#594) Anything under ``metric_logging.wandb:`` in YAML that isn't logging_mode or per_rank_share_run is forwarded verbatim to wandb.init via **kwargs. The prior docstring mentioned this in passing but didn't say "your YAML arbitrary keys land here", and there was no runtime signal of what got forwarded — making it easy to mistype ``entity`` or ``mode`` and not notice. This change: - Expands the docstring with an explicit YAML example showing arbitrary forwarded keys (entity, mode) alongside the named ones. - Emits a single INFO log at __init__ listing the extra kwargs being forwarded, e.g.: WandbBackend: forwarding 3 extra kwarg(s) to wandb.init: ['entity', 'mode', 'project'] No behavior change for wandb itself; this is a visibility fix. Test plan: - New: test_wandb_backend_logs_extra_kwargs verifies the INFO line lists the forwarded keys - New: test_wandb_backend_no_log_when_no_extra_kwargs verifies silence when only the named args are passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #594.
Anything you place under
metric_logging.wandb:in a YAML config that isn'tlogging_modeorper_rank_share_runis forwarded verbatim towandb.initvia**kwargs. This already works — it just isn't obvious, so a user can mistypeentityormodeand silently get a different run than they expected.This PR makes it obvious in two complementary ways:
entity,mode) alongside the named ones.__init__listing the extra kwargs being forwarded:No behavior change for wandb itself; this is a visibility fix.
Test plan
test_wandb_backend_logs_extra_kwargs— verifies INFO log lists forwarded keystest_wandb_backend_no_log_when_no_extra_kwargs— verifies silence when only named args passedtest_wandb_backend_creationstill passes (no API changes)