Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwh committed Jan 29, 2025
1 parent f964334 commit a7798ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/levanter/data/permutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ async def getitem_async(self, index: int) -> T_co:

async def get_batch(self, indices: Sequence[int]) -> Sequence[T_co]:
permutation = await self._get_permutation()
return await self.dataset.get_batch([int(permutation(i)) for i in indices]) # cast to int to be sure it's python int
return await self.dataset.get_batch(
[int(permutation(i)) for i in indices]
) # cast to int to be sure it's python int

async def _get_permutation(self):
if self._permutation is None:
Expand Down

0 comments on commit a7798ca

Please sign in to comment.