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

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

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
@@ -12,6 +12,7 @@
from typing import TYPE_CHECKING

import hydra
from omegaconf import OmegaConf
Copy link
Collaborator

Choose a reason for hiding this comment

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

I dont think this is currently a dependency, should we add this to pyproject.toml?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

its installed through hydra

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 73.97% <79.16%> (-1.03%) ⬇️

@@ -32,29 +33,48 @@


class Submitit(Checkpointable):
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, since the Runner class is already a Checkpointable, do we need both the Runner and Submitit to inherit from Checkpointable?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Runner is not a Checkpointable?

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