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

Parameterize drop_last #550

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Parameterize drop_last #550

merged 2 commits into from
Jun 27, 2024

Conversation

XianzheMa
Copy link
Collaborator

@XianzheMa XianzheMa commented Jun 26, 2024

The reason for this PR is that, for il model training, I don't want to drop the last batch, as the holdout set is already super small (and on il model training no sampling is used, so it does not harm not to drop last batch). But for main model training, usually we default drop_last to True.

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.84%. Comparing base (72ffdca) to head (9804c85).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #550   +/-   ##
=======================================
  Coverage   82.83%   82.84%           
=======================================
  Files         220      220           
  Lines       10232    10235    +3     
=======================================
+ Hits         8476     8479    +3     
  Misses       1756     1756           

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

Copy link

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

@XianzheMa XianzheMa requested a review from MaxiBoether June 26, 2024 14:46
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.

The changes look good but cause a problem in the integration test. When this is fixed, feel free to merge

@XianzheMa
Copy link
Collaborator Author

The changes look good but cause a problem in the integration test. When this is fixed, feel free to merge

The failure is because we have a _assert_data_size logic added when merging the batch accumulation. This assertion happens regardless of we are doing batch accumulation or not. When we set drop_last to False, naturally the last batch has fewer samples and does not conform to the assertion. Let's hope this time CI passes

@XianzheMa XianzheMa merged commit 59ea026 into main Jun 27, 2024
26 checks passed
@XianzheMa XianzheMa deleted the XianzheMa/parameterize-drop-last branch June 27, 2024 06:17
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