facebookresearch / mmf

A modular framework for vision & language multimodal research from Facebook AI Research (FAIR)
https://mmf.sh/
Other
5.48k stars 935 forks source link

How to visualize train.log file with tensorboard? #890

Closed dinhanhx closed 3 years ago

dinhanhx commented 3 years ago

❓ Questions and Help

How can I use tensorboard to visualize train.log in save folder produced by this command mmf_run config=projects/hateful_memes/configs/mmbt/defaults.yaml model=mmbt dataset=hateful_memes?

apsdehal commented 3 years ago

Hi, First you will need to enable tensorboard by training.tensorboard=True. This will enable tensorboard logging into <save_dir>/logs folder. Now, you can run tensorboard there with tensorboard --port 5901 --logdir ..

dinhanhx commented 3 years ago

Hi, First you will need to enable tensorboard by training.tensorboard=True. This will enable tensorboard logging into <save_dir>/logs folder. Now, you can run tensorboard there with tensorboard --port 5901 --logdir ..

So this means if I forget to enable before training, I can't visualize with tensorboard?

dinhanhx commented 3 years ago

In my opinion, there should be a way to convert train.log file to something that Tensorboard can read.

apsdehal commented 3 years ago

For the moment, yeah it is not possible as the events for tensorboard are generate at runtime. You can indeed log them back in or use some other tool to plot the curves by reading train.log. Here is some sample code to read and write a file to plotly: https://gist.github.com/apsdehal/1d348bb5c1a179c430f9676d4c2972f0

dinhanhx commented 3 years ago

For the moment, yeah it is not possible as the events for tensorboard are generate at runtime. You can indeed log them back in or use some other tool to plot the curves by reading train.log. Here is some sample code to read and write a file to plotly: https://gist.github.com/apsdehal/1d348bb5c1a179c430f9676d4c2972f0

Thank you, it's certainly useful, I will use it.

apsdehal commented 3 years ago

Closing this as resolved with the script provided.