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

new evals_per_epoch and saves_per_epoch to make things cleaner #944

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

winglian
Copy link
Collaborator

right now, figuring out what values to put into eval_steps or save_steps is just plain confusing. hoping that simply having

evals_per_epoch: X
saves_per_epoch: X

makes it easier to understand and is probably what people really want.

README.md Show resolved Hide resolved
@@ -78,9 +78,13 @@ def normalize_config(cfg):
cfg.torch_dtype = torch.float32

if cfg.saves_per_epoch:
cfg.save_steps = 1.0 / (cfg.saves_per_epoch * cfg.num_epochs)
save_steps = 1.0 / (cfg.saves_per_epoch * cfg.num_epochs)
if save_steps < 1.0: # prevent saves on every step
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe instead of this if save_steps < 1.0:, you should do a check that cfg.saves_per_epoch >= 1

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that doesn't really solve the case I'm solving for. Basically when there is one epoch and one save per epoch, it will lead to save steps being 1, which iirc, causes it to save every step.

@winglian winglian merged commit 5f79b82 into main Dec 12, 2023
4 checks passed
@winglian winglian deleted the saves_per_epoch branch December 12, 2023 20:37
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

2 participants