Commit 2bd5dcb6 authored by Zhiwei Zhuang's avatar Zhiwei Zhuang
Browse files

finished test code

parent 1aa3bc1e
...@@ -847,7 +847,7 @@ class HFLM(LM): ...@@ -847,7 +847,7 @@ class HFLM(LM):
# for each different set of kwargs, we execute all requests, by batch. # for each different set of kwargs, we execute all requests, by batch.
for key, re_ord in re_ords.items(): for key, re_ord in re_ords.items():
for chunk in utils.chunks( for chunk in utils.chunks(
re_ord.get_reordered(), tqdm(re_ord.get_reordered(), disable=self.rank != 0),
n=self.batch_size n=self.batch_size
if self.batch_size != "auto" if self.batch_size != "auto"
else adaptive_batch_size else adaptive_batch_size
...@@ -858,7 +858,6 @@ class HFLM(LM): ...@@ -858,7 +858,6 @@ class HFLM(LM):
and not adaptive_batch_size and not adaptive_batch_size
else None, else None,
): ):
contexts, all_gen_kwargs = zip(*chunk) contexts, all_gen_kwargs = zip(*chunk)
# we assume all gen kwargs in the batch are the same # we assume all gen kwargs in the batch are the same
# this is safe to assume because the `grouper` object ensures it. # this is safe to assume because the `grouper` object ensures it.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment