Skip to content

Commit 33168a1

Browse files
Carl Chengyan Fufacebook-github-bot
Carl Chengyan Fu
authored andcommitted
batch size scheduling remove asending batch size constraint (#2686)
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
1 parent dc6a789 commit 33168a1

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

torchrec/metrics/metrics_config.py

-5
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,6 @@ def validate_batch_size_stages(
236236
if len(batch_size_stages) == 0:
237237
raise ValueError("Batch size stages should not be empty")
238238

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

0 commit comments

Comments
 (0)