Skip to content

Add model log parsers (GAN/RL/InstanceSeg/NLP) #49

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zzhfz
Copy link

@zzhfz zzhfz commented Apr 22, 2025

Description

add unified log parsers for DCGAN, DQN, MaskRCNN and BERT

Usage Example

1.DCGAN

(venv_fasterrcnn) sunjinge@ares1:~/PyTorchModels/GAN/dcgan$ python dcgan_log_parser.py -l dcgan_train.log -o dcgan_metrics.csv
成功保存 5 条记录到 dcgan_metrics.csv
(venv_fasterrcnn) sunjinge@ares1:~/PyTorchModels/GAN/dcgan$ cat dcgan_metrics.csv
epoch,total_epochs,iteration,loss_d,loss_g,d_x,d_g_z
0,25,0,1.9049,4.0445,0.3691,0.4341
0,25,1,1.7582,5.5897,0.8462,0.7125
0,25,2,1.2323,6.233,0.6996,0.4707
0,25,3,1.088,4.9859,0.5757,0.1771
0,25,4,0.9804,6.2721,0.7919,0.4466

2.DQN

(venv_fasterrcnn) sunjinge@ares1:~/PyTorchModels/RL/dqn$ python dqn_log_parser.py -l dqn_train.log -o dqn_metrics.csv
成功保存 5 条训练记录到 dqn_metrics.csv
(venv_fasterrcnn) sunjinge@ares1:~/PyTorchModels/RL/dqn$ cat dqn_metrics.csv
timestamp,episode,loss,loss_smooth
2025-04-21 16:47:53,0,0.649788,0.649788
2025-04-21 16:47:57,10,0.000329,0.325058
2025-04-21 16:47:59,20,0.412298,0.354138
2025-04-21 16:48:02,30,0.817083,0.469874
2025-04-21 16:48:04,40,4.243031,1.224506

3.MaskRCNN

(venv_fasterrcnn) sunjinge@ares1:~/PyTorchModels/InstanceSeg/maskrcnn$ python maskrcnn_log_parser.py -l maskrcnn_train.log -o maskrcnn_metrics.csv
成功保存 7 条记录到 maskrcnn_metrics.csv
(venv_fasterrcnn) sunjinge@ares1:~/PyTorchModels/InstanceSeg/maskrcnn$ cat maskrcnn_metrics.csv
timestamp,type,iter,loss,loss_avg,mAP
2025-04-22 22:33:38,train,10,2.0061,2.5199,
,eval,,,,0.0
,eval,,,,0.0
,eval,,,,0.0
,eval,,,,0.0
,eval,,,,0.0

4.BERT

(venv_fasterrcnn) sunjinge@ares1:~/PyTorchModels/NLP/HuggingFace$ python bert_log_parser.py -l  bert_train.log -o bert_metrics.csv
成功保存 1 条记录到 bert_metrics.csv
(venv_fasterrcnn) sunjinge@ares1:~/PyTorchModels/NLP/HuggingFace$ cat bert_metrics.csv
exact,f1,total,HasAns_exact,HasAns_f1,HasAns_total,NoAns_exact,NoAns_f1,NoAns_total,best_exact,best_exact_thresh,best_f1,best_f1_thresh,epoch
50.07159100480081,50.07159100480081,11873,0.0,0.0,5928,100.0,100.0,5945,50.07159100480081,0.0,50.07159100480081,0.0,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant