Open JinchaoLove opened 1 year ago
@JinchaoLove You never passed the logger to the Trainer. You are missing
Trainer(
...
logger=wblogger,
)
Once you do that, the logs will be written to the wandb folder.
Hi @awaelchli , thanks for the kind reply. I've updated the code in colab. It's expected to log all console outputs and be saved in wandb/lastest-run/files/output.log
, but it's still missing. (It's in the files
subfolder, not the logs
subfolder). Below are the different logs using WandbLogger
with pl.Trainer
(bug: no output.log
) and self-implemented WandbLogger
with pl.lite.LightningLite
(normally generated output.log
).
Using WandbLogger
with pl.Trainer
(bug: no output.log
):
Self-implemented WandbLogger
with pl.lite.LightningLite
(normally generated output.log
):
Why do we need output.log
?
Because sometimes useful information are printed in the console, such as the model summary, printed metrics, checkpoint/logs dirs, tracebacks, etc.
How to mitigate current problem?
The new release of wandb (v0.13.1) fixed the problem by using a server connect, but output.log
only generated in online
mode if we using WandbLogger
with pl.Trainer
. Please see in https://github.com/wandb/wandb/issues/3978#issuecomment-1212456758
@JinchaoLove Thanks. This is very strange, I can't tell exactly what could be the reason for this. I will have to compare what happens with using raw wandb api calls vs. using the WandbLogger wrapper.
This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions - the Lightning Team!
🐛 Bug
To Reproduce
https://colab.research.google.com/drive/1k-wWyw-_8P987-Ay7n-rtEZiGU2pIrev#scrollTo=zK7-Gg69kMnG
Expected behavior
The wandb will save the console outputs in the file
wandb/latest-run/files/output.log
, but no such file when usingWandbLogger
.Environment
conda
,pip
, source): piptorch.__config__.show()
: N/AAdditional context
Wandb related: https://github.com/wandb/wandb/issues/3978
cc @awaelchli @morganmcg1 @borisdayma @scottire @parambharat @manangoel99