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

call after_val_epoch hooks only once to save best ckpt correctly #421

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

Weiyun1025
Copy link
Contributor

Motivation

SingleTeacherDistillValLoop calls after_val_epoch hooks twice during the evaluation. However, the metric in the second call do not contain the key named student.accuracy/top1. As a result, if we set save_best='auto' in CheckpointHook, the program will fail.

Please refer to this issue for more details.

Modification

Now we only call after_val_epoch hooks once in SingleTeacherDistillValLoop.

@pppppM pppppM requested a review from HIT-cwh January 6, 2023 10:43
@pppppM pppppM merged commit f4d4478 into open-mmlab:dev-1.x Feb 13, 2023
@OpenMMLab-Assistant001
Copy link

Hi @Weiyun1025 !First of all, we want to express our gratitude for your significant PR in the MMRazor project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.

We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/UjgXkPWNqA

If you have WeChat account,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:)
Thank you again for your contribution!❤

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.

None yet

4 participants