Skip to content

Commit

Permalink
...cleanup and resolve pytype issues with assertions...
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 689850257
  • Loading branch information
Scenic Authors committed Nov 21, 2024
1 parent 0340172 commit 0605ba6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scenic/dataset_lib/tests/test_dataset_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def make_fake_batches():
self.assertEqual(outputs['batch_mask'].shape,
(desired_bs,) + batch_mask_shape)
if pre_padding_mask:
assert complete_batch_mask is not None
self.assertEqual(outputs['batch_mask'].sum(), complete_batch_mask.sum())
else:
self.assertEqual(outputs['batch_mask'].sum(),
Expand Down Expand Up @@ -104,6 +105,7 @@ def make_fake_batches():
self.assertEqual(outputs['batch_mask'].shape,
(desired_bs,) + batch_mask_shape)
if pre_padding_mask:
assert complete_batch_mask is not None
self.assertEqual(outputs['batch_mask'].sum(), complete_batch_mask.sum())
else:
self.assertEqual(outputs['batch_mask'].sum(),
Expand Down

0 comments on commit 0605ba6

Please sign in to comment.