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

Load schedulers from ckpt in a backward-compatible manner #2236

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

hyperzy
Copy link
Contributor

@hyperzy hyperzy commented Jul 17, 2023

  • The loading behavior is similar to that in sdfstudio.
  • Allow loading old checkpoints without the schedulers key.
  • Versions <= 0.3.2 don't support loading schedulers state_dict, because the states of schedulers are not saved in Trainer.save_checkpoint(). Specifically, commits older than cebe787 don't support schedulers loading/saving.
    These changes in the commit will save the states of schedulers by default, i.e. creating a schedulers key. Were the checkpoints from previous versions loaded, the loader will check whether the schedulers key exist before loading schedulers.

Copy link
Contributor

@tancik tancik left a comment

Choose a reason for hiding this comment

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

LGTM

@tancik tancik enabled auto-merge (squash) July 18, 2023 17:46
@tancik tancik merged commit e7fd1ae into nerfstudio-project:main Jul 18, 2023
4 checks passed
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