Fix small issue with train/testing examples#331
Merged
mkolodner-sc merged 4 commits intomainfrom Sep 22, 2025
Merged
Conversation
kmontemayor2-sc
approved these changes
Sep 22, 2025
yliu2-sc
approved these changes
Sep 22, 2025
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.
Scope of work done
This PR addresses two issues:
should_skip_trainingis True, we try to log atrain_start_timeafter testing, but it has not been initialized, which causes error.should_skip_trainingis True, we still try to re-save the model to the model uri, which should only be done after training.We fix this by moving the train_start_time and model saving code to the code which runs if
should_skip_training=False, and we introduce a time for logging how long the testing takes.There is also a small consistency change here where we have the code block:
which is currently done before calling
.shutdown()in train and done after calling.shutdown()in test. It's good to be consistent between the two here, and this block should be called before.shutdown()in both cases so that we are only shutting down the dataloaders once it is safe to do so (all processes have reached the shutdown stage) and all cached memory is cleaned up before references are lost in.shutdown()call.Where is the documentation for this feature?: N/A
Did you add automated tests or write a test plan?
Updated Changelog.md? NO
Ready for code review?: NO