Skip to content

[Feature] Expose additional arguments for Wandb #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Xmaster6y
Copy link
Contributor

What does this PR do?

It exposes wandb_extra_kwargs in the experiment config to pass additional arguments to both WandbLogger and wandb.init.

To discuss

  • Should there be an extra validation in ExperimentConfig, e.g. using a field like:
@dataclass
class WandbExtraKwargs:
    """
    Extra kwargs for wandb.
    """
    # WandbLogger
    offline: bool = False
    ...
    # wandb.init
    entity: Optional[str] = None
    ...
  • Is having wandb as a default logger (base_experiment) really ideal?

Happy to iterate.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 29, 2025
Copy link
Contributor

@matteobettini matteobettini left a comment

Choose a reason for hiding this comment

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

This looks great, sorry for taking so long. Only one point about bc-breaking

# WandbLogger includes: offline, save_dir, project, video_fps
# wandb.init includes: entity, tags, notes, etc.
wandb_extra_kwargs:
project: "benchmarl"
Copy link
Contributor

Choose a reason for hiding this comment

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

So the only problem is that this is backwards compatibility breaking and I would like to avoid that.

What about we keep the project name out and have wandb_extra_kwargs: {}?

Then is someone provides the project in wandb_extra_kwargs and it is different from project_name we tell them through an error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I get you, sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants