Skip to content
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

Add wandb logger init to hydra runners #894

Merged
merged 10 commits into from
Nov 26, 2024
Merged

Conversation

rayg1234
Copy link
Collaborator

Add instantiation for wandb logger to the new hydra runners. The logger is a singleton logger that is only instantiated on master and independent of the runners. The runners can then just log from anywhere (without having to know all the run information) assuming the logger is instantiated.

example logger config in the yaml:

logger:
  _partial_: true
  _target_: fairchem.core.common.logger.WandBSingletonLogger.init_wandb
  project: fairchem
  entity: rgao

Example run: https://fairwandb.org/rgao/fairchem/runs/202410-2422-3005-86f0

@rayg1234 rayg1234 added enhancement New feature or request minor Minor version release labels Oct 24, 2024
@rayg1234 rayg1234 marked this pull request as ready for review October 24, 2024 22:41
misko
misko previously approved these changes Oct 24, 2024
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 79.16667% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/fairchem/core/_cli_hydra.py 79.16% 5 Missing ⚠️
Files with missing lines Coverage Δ
src/fairchem/core/_cli_hydra.py 69.73% <79.16%> (-0.42%) ⬇️

@@ -131,8 +156,8 @@ def main(
rdzv_backend="c10d",
max_restarts=0,
)
elastic_launch(launch_config, runner_wrapper)(cfg, args)
elastic_launch(launch_config, runner_wrapper)(cfg)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just out of curiosity is the runner_wrapper just to make elastic_launch happy?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, it can only deal with a top level function

@rayg1234 rayg1234 added this pull request to the merge queue Nov 26, 2024
Merged via the queue into main with commit 72614bf Nov 26, 2024
10 checks passed
@rayg1234 rayg1234 deleted the rgao_hydra_logger_init branch November 26, 2024 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor Minor version release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants