Skip to content
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 batch number #533

Merged
merged 14 commits into from
Jun 23, 2024
Merged

Fix batch number #533

merged 14 commits into from
Jun 23, 2024

Conversation

XianzheMa
Copy link
Collaborator

@XianzheMa XianzheMa commented Jun 20, 2024

Previously, we didn't record the number of passed batches correctly:
We use a batch_number which is generated purely from enumeration in dataloader. Therefore this number is irrelevant to the number of epochs (only shows how many batches there are in one epoch).
A similar issue exists on the iteration on StB when we calculate scores class by class. The number of batches passed in the previous class is not correctly accumulated on the current class.

This PR fixes it.

Copy link

Line Coverage: -% ( % to main)
Branch Coverage: -% ( % to main)

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.81%. Comparing base (bf96bfa) to head (9b2a8c9).
Report is 1 commits behind head on main.

Current head 9b2a8c9 differs from pull request most recent head 07ebc07

Please upload reports for the commit 07ebc07 to get more accurate results.

Files Patch % Lines
...trainer_server/internal/trainer/pytorch_trainer.py 82.35% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #533      +/-   ##
==========================================
+ Coverage   82.31%   82.81%   +0.50%     
==========================================
  Files         217      217              
  Lines       10125    10124       -1     
==========================================
+ Hits         8334     8384      +50     
+ Misses       1791     1740      -51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MaxiBoether MaxiBoether changed the title fix batch number Fix batch number Jun 21, 2024
Copy link
Contributor

@MaxiBoether MaxiBoether left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this. My only comment is whether we should log both numbers :)

@XianzheMa XianzheMa marked this pull request as ready for review June 21, 2024 07:30
@XianzheMa XianzheMa merged commit 97a2b5f into main Jun 23, 2024
18 checks passed
@XianzheMa XianzheMa deleted the XianzheMa/fix/batch-number branch June 26, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants