Remove redundant epoch_number variable in training tutorial (issue 3714)#3787
Remove redundant epoch_number variable in training tutorial (issue 3714)#3787sheralskumar wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3787
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit e90f18e with merge base 3e6cc9b ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Claude finished @sekyondaMeta's task in 1m 33s —— View job PR Review: #3787SummaryThis PR removes the redundant Content QualityNo concerns. This is a minor cleanup that improves clarity for beginners by eliminating a redundant variable that shadows the loop counter. Previously, Code CorrectnessNo concerns. I verified all four substitution sites:
The Structure & FormattingNo concerns. This is a modification to an existing file with no structural changes needed (no new tutorials, no index/toctree changes). Build CompatibilityNo concerns. The change is purely a variable renaming with identical runtime behavior. No new dependencies, data downloads, or build configuration changes. RecommendationApprove Clean, correct simplification that removes unnecessary complexity from a beginner tutorial. The diff is minimal and behavior-preserving. |
Fixes #3714
Description
Removed redundant epoch_number variable and used the loop variable epoch directly for logging and checkpointing. This simplifies the code, improving clarity for beginners.
Checklist