Skip to content

Commit 5fe4662

Browse files
committed
Workaround to WandbLogger ignoring WANDB_DIR
1 parent 2eab819 commit 5fe4662

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/nn_core/model_logging.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ def __init__(self, logging_cfg: DictConfig, cfg: DictConfig, resume_id: Optional
3939
self.logging_cfg.logger.mode = "offline"
4040

4141
pylogger.info(f"Instantiating <{self.logging_cfg.logger['_target_'].split('.')[-1]}>")
42-
self.wrapped: LightningLoggerBase = hydra.utils.instantiate(self.logging_cfg.logger, version=self.resume_id)
42+
self.wrapped: LightningLoggerBase = hydra.utils.instantiate(
43+
self.logging_cfg.logger,
44+
version=self.resume_id,
45+
dir=os.getenv("WANDB_DIR", "."),
46+
)
4347

4448
# force experiment lazy initialization
4549
_ = self.wrapped.experiment

0 commit comments

Comments
 (0)