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
ad8eee89
"vscode:/vscode.git/clone" did not exist on "56942c43315af2a205efbaaa6343786f6e11c943"
Commit
ad8eee89
authored
Nov 02, 2023
by
haileyschoelkopf
Browse files
cleanup hf tqdm
parent
a922db88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+2
-4
No files found.
lm_eval/models/huggingface.py
View file @
ad8eee89
...
@@ -676,9 +676,7 @@ class HFLM(LM):
...
@@ -676,9 +676,7 @@ class HFLM(LM):
)
)
pbar
=
tqdm
(
total
=
len
(
requests
),
disable
=
(
disable_tqdm
or
(
self
.
rank
!=
0
)))
pbar
=
tqdm
(
total
=
len
(
requests
),
disable
=
(
disable_tqdm
or
(
self
.
rank
!=
0
)))
for
(
for
chunk
in
chunks
:
chunk
)
in
chunks
:
# tqdm(chunks, disable=(disable_tqdm or (self.rank != 0))):
inps
=
[]
inps
=
[]
cont_toks_list
=
[]
cont_toks_list
=
[]
inplens
=
[]
inplens
=
[]
...
@@ -863,7 +861,7 @@ class HFLM(LM):
...
@@ -863,7 +861,7 @@ class HFLM(LM):
if
self
.
batch_size
==
"auto"
and
not
adaptive_batch_size
if
self
.
batch_size
==
"auto"
and
not
adaptive_batch_size
else
None
,
else
None
,
)
)
for
chunk
in
tqdm
(
chunks
,
disable
=
self
.
rank
!=
0
)
:
for
chunk
in
chunks
:
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.
...
...
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