"vscode:/vscode.git/clone" did not exist on "c6c1da03d04840d3f5710d1d649662acc997fd18"
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): ...@@ -675,7 +675,10 @@ class HFLM(LM):
else None, 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 = [] inps = []
cont_toks_list = [] cont_toks_list = []
inplens = [] inplens = []
...@@ -812,6 +815,9 @@ class HFLM(LM): ...@@ -812,6 +815,9 @@ class HFLM(LM):
res.append(answer) res.append(answer)
self.cache_hook.add_partial("loglikelihood", cache_key, answer) self.cache_hook.add_partial("loglikelihood", cache_key, answer)
pbar.update(1)
pbar.close()
return re_ord.get_original(res) 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