FIX: Update `optimization_tutorial.py` to expose `batch_size` in `train_loop()`
Description
batch_size is not currently exposed as train_loop() parameter
- Re-implements #2920 (accidental deletion from forked repo)
Checklist
- [X] The issue that is being fixed is referred in the description (see above "Fixes #ISSUE_NUMBER")
- [X] Only one issue is addressed in this pull request
- [X] Labels from the issue that this PR is fixing are added to this pull request
- [X] No unnecessary issues are included into this pull request.
cc @subramen @albanD @sekyondaMeta @svekars @kit1980 @brycebortree
:link: Helpful Links
:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/2945
- :page_facing_up: Preview Python docs built from this PR
Note: Links to docs will display an error until the docs builds have been completed.
:white_check_mark: No Failures
As of commit 73bfa3436e4406d7384c46e29f6832bd7771a395 with merge base 0740801fa8df2464f4d931d36a4bd7ada9cd0519 ():
:green_heart: Looks good so far! There are no failures yet. :green_heart:
This comment was automatically generated by Dr. CI and updates every 15 minutes.
Hi, thanks for the PR but the proposed change is not correct. The dataloader takes in the batch size arg (as seen here https://github.com/pytorch/tutorials/blob/0740801fa8df2464f4d931d36a4bd7ada9cd0519/beginner_source/basics/optimization_tutorial.py#L47)
The
dataloadertakes in the batch size arg (as seen here)
Yes, but part of the train_loop uses the batch_size for reporting: https://github.com/pytorch/tutorials/blob/0740801fa8df2464f4d931d36a4bd7ada9cd0519/beginner_source/basics/optimization_tutorial.py#L166
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.Stale pull requests will automatically be closed after 30 days of inactivity.