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

Change --load_best=true to fail if checkpoint does not exist #98

Merged
merged 3 commits into from
Feb 6, 2025

Conversation

favyen2
Copy link
Collaborator

@favyen2 favyen2 commented Feb 5, 2025

  • Change --load_best=true to fail if checkpoint does not exist.
  • Also adjust it to support loading checkpoint with arbitrary name in the checkpoint directory even if last.ckpt doesn't exist.

Resolves #89

Also adjust it to support loading checkpoint with arbitrary name in the
checkpoint directory even if last.ckpt doesn't exist.
Copy link
Collaborator

@Hgherzog Hgherzog left a comment

Choose a reason for hiding this comment

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

Approved with minor comments

from rslp.utils.rslearn import run_model_predict


def test_error_if_no_checkpoint(tmp_path: pathlib.Path, monkeypatch: Any) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would also add a test to ensure that the best checkpoint is indeed loaded if maybe multiple checkpoints exist

@favyen2 favyen2 merged commit 467888c into master Feb 6, 2025
3 of 4 checks passed
@favyen2 favyen2 deleted the favyen/issue89 branch February 6, 2025 22:39
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.

--load_best=true should force checkpoint to be loaded
2 participants