Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
55407cd6
Commit
55407cd6
authored
Nov 01, 2023
by
haileyschoelkopf
Browse files
fix tqdm total for hf model
parent
12fe236d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+7
-1
No files found.
lm_eval/models/huggingface.py
View file @
55407cd6
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment