Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
sshleifer committed Sep 17, 2020
1 parent 2911453 commit 779618f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/seq2seq/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def make_dynamic_sampler(self, max_tokens_per_batch=1024, **kwargs):
def num_tokens_in_example(i):
return min(self.src_lens[i], self.max_target_length)

# num_tokens_fn = lambda i: self.src_lens[i] // 4 # assume each token is ~4 characters (a bit conservative)
# call fairseq cython function
batch_sampler: List[List[int]] = batch_by_size(
sorted_indices,
num_tokens_fn=num_tokens_in_example,
Expand Down

0 comments on commit 779618f

Please sign in to comment.