Skip to content

Commit

Permalink
batch size scheduling remove asending batch size constraint (#2686)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #2686

In the use case of NE verification for paft, there are cases that global batch will decrease. Remove the sanity check in batch size scheduling to couple with this scenario for NE verification.

Reviewed By: xunnanxu

Differential Revision: D68284699

fbshipit-source-id: 74c975b4599350919d51e21897ce3ee46557c478
  • Loading branch information
Carl Chengyan Fu authored and facebook-github-bot committed Jan 17, 2025
1 parent dc6a789 commit 33168a1
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions torchrec/metrics/metrics_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,6 @@ def validate_batch_size_stages(
if len(batch_size_stages) == 0:
raise ValueError("Batch size stages should not be empty")

for i in range(len(batch_size_stages) - 1):
if batch_size_stages[i].batch_size >= batch_size_stages[i + 1].batch_size:
raise ValueError(
f"Batch size should be in ascending order. Got {batch_size_stages}"
)
if batch_size_stages[-1].max_iters is not None:
raise ValueError(
f"Batch size stages last stage should have max_iters = None, but get {batch_size_stages[-1].max_iters}"
Expand Down

0 comments on commit 33168a1

Please sign in to comment.