Commit 55407cd6 authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

fix tqdm total for hf model

parent 12fe236d
......@@ -675,7 +675,10 @@ class HFLM(LM):
else None,
)
for chunk in tqdm(chunks, disable=(disable_tqdm or (self.rank != 0))):
pbar = tqdm(total=len(requests), disable=(disable_tqdm or (self.rank != 0)))
for (
chunk
) in chunks: # tqdm(chunks, disable=(disable_tqdm or (self.rank != 0))):
inps = []
cont_toks_list = []
inplens = []
......@@ -812,6 +815,9 @@ class HFLM(LM):
res.append(answer)
self.cache_hook.add_partial("loglikelihood", cache_key, answer)
pbar.update(1)
pbar.close()
return re_ord.get_original(res)
......
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