Skip to content

Commit ce6b96d

Browse files
committed
refine
1 parent 2a7ed4c commit ce6b96d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

auto_round/compressors/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,17 +1345,17 @@ def __init__(self, nsamples: int, batch_size: int) -> None:
13451345
self.batch_size: int = batch_size
13461346
self.index: int = 0
13471347

1348-
self.indices: List[int] = list(range(nsamples))
1348+
self.indices: list[int] = list(range(nsamples))
13491349
random.shuffle(self.indices)
13501350

1351-
def next_batch(self) -> List[int]:
1351+
def next_batch(self) -> list[int]:
13521352
"""Returns the next batch of shuffled indices.
13531353
13541354
If the remaining indices are fewer than `batch_size`, the sampler
13551355
reshuffles the entire list and starts from the beginning.
13561356
13571357
Returns:
1358-
List[int]: A list of size `batch_size` containing sample indices.
1358+
list[int]: A list of size `batch_size` containing sample indices.
13591359
"""
13601360
if self.index + self.batch_size > self.nsamples:
13611361
random.shuffle(self.indices)

0 commit comments

Comments
 (0)