Open
Conversation
Member
Author
|
@rogerkuou I am implementing the training loop as a util function in this PR, also saving model and its config. I have to change the example notebook, but lets see how much we can change in other PR #27 and merge that one first. |
Draft
rogerkuou
approved these changes
Apr 7, 2026
Collaborator
rogerkuou
left a comment
There was a problem hiding this comment.
Hi @SarahAlidoost, thanks for making this util function! I managed to run the example notebook on my local.
I just have one minor comment on saving the best model to the log dir. Please feel free to adapt it or not.
After merging I will start to use this util function in PR #27
|
|
||
| def _save_model(model: torch.nn.Module, log_dir: str, verbose: bool) -> None: | ||
| """Save model state and config to disk.""" | ||
| model_path = Path(log_dir) / "best_model.pth" |
Collaborator
There was a problem hiding this comment.
I am wondering if it is a common pratice to output the best model to the log dir? If yes let's keep it!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #33
relates #13 using
torch.utils.tensorboard