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

[bin] support model saving for both per-step & per-epoch mode #2248

Merged
merged 6 commits into from
Dec 19, 2023

Conversation

xingchensong
Copy link
Member

@xingchensong xingchensong commented Dec 18, 2023

fix #1839

@xingchensong
Copy link
Member Author

image

@xingchensong xingchensong marked this pull request as ready for review December 19, 2023 03:18
@@ -76,19 +78,35 @@ def train(self, model, optimizer, scheduler, data_loader, writer, configs,
info_dict = update_parameter_and_lr(model, optimizer,
scheduler, scaler,
info_dict)
save_interval = info_dict.get('save_interval', 10000)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just like log_interval, save_interval is set in train.yaml?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里我认为 : log save_interval等为训练行为 应该放到train的args里边

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,都在train.yaml, 需要的话可以改到args

@robin1001 robin1001 merged commit 56c0e8e into main Dec 19, 2023
6 checks passed
@robin1001 robin1001 deleted the xcsong-save-model branch December 19, 2023 09:06
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.

Saving Model Checkpoint after some fixed steps rather than after every epoch
3 participants