-
Notifications
You must be signed in to change notification settings - Fork 520
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
fix(pt): do not overwrite disp_file when restarting training #3985
Conversation
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
WalkthroughWalkthroughThe recent changes to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TrainingScript as training.py
participant FileSystem
User->>TrainingScript: Start training
alt restart_training is true
TrainingScript->>FileSystem: Open file in append mode
else restart_training is false
TrainingScript->>FileSystem: Open file in write mode
end
alt SAMPLER_RECORD is true
TrainingScript->>FileSystem: Create file for recording
end
TrainingScript->>User: Training process starts
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## devel #3985 +/- ##
=======================================
Coverage 82.83% 82.83%
=======================================
Files 522 522
Lines 50872 50872
Branches 3015 3015
=======================================
Hits 42142 42142
Misses 7795 7795
Partials 935 935 ☔ View full report in Codecov by Sentry. |
782f1e2
…eling#3985) New contents should be appended when restarting <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved training process by conditionally appending to files based on the `restart_training` flag. - Added functionality to create a record file when `SAMPLER_RECORD` is true. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
New contents should be appended when restarting
Summary by CodeRabbit
restart_training
flag.SAMPLER_RECORD
is true.