Skip to content

Cleanup, use mean reduction#472

Merged
josephdviviano merged 1 commit intomasterfrom
small-cleanup
Feb 16, 2026
Merged

Cleanup, use mean reduction#472
josephdviviano merged 1 commit intomasterfrom
small-cleanup

Conversation

@younik
Copy link
Collaborator

@younik younik commented Feb 13, 2026

Cleanup, instead of manually dividing by per_node_batch_size which is prone to bug, just use mean

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.31%. Comparing base (4d84171) to head (9e37185).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #472   +/-   ##
=======================================
  Coverage   74.31%   74.31%           
=======================================
  Files          47       47           
  Lines        6960     6960           
  Branches      824      824           
=======================================
  Hits         5172     5172           
  Misses       1478     1478           
  Partials      310      310           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

training_objects, # type: ignore
recalculate_all_logprobs=(not is_on_policy_iter),
reduction="sum" if args.distributed or args.loss == "SubTB" else "mean", # type: ignore
reduction="sum" if args.loss == "SubTB" else "mean", # type: ignore
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry - what was the bug here? This can produce unintended behaviour as you scale up with DDP, but maybe it actually produces incorrect scaling for distributed async training. We should discuss on the call tomorrow.

Copy link
Collaborator

@josephdviviano josephdviviano left a comment

Choose a reason for hiding this comment

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

lgtm!

@josephdviviano josephdviviano merged commit ec05c19 into master Feb 16, 2026
6 checks passed
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