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
e4aa240e
Commit
e4aa240e
authored
Sep 22, 2023
by
haileyschoelkopf
Browse files
trigger precommit
parent
43c91b5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
lm_eval/api/task.py
lm_eval/api/task.py
+3
-1
lm_eval/utils.py
lm_eval/utils.py
+3
-1
No files found.
lm_eval/api/task.py
View file @
e4aa240e
...
@@ -631,7 +631,9 @@ class ConfigurableTask(Task):
...
@@ -631,7 +631,9 @@ class ConfigurableTask(Task):
if
self
.
fewshot_docs
()
is
not
None
:
if
self
.
fewshot_docs
()
is
not
None
:
self
.
sampler
=
samplers
.
get_sampler
(
self
.
sampler
=
samplers
.
get_sampler
(
self
.
config
.
fewshot_config
.
get
(
"sampler"
,
"default"
)
if
self
.
config
.
fewshot_config
else
"default"
self
.
config
.
fewshot_config
.
get
(
"sampler"
,
"default"
)
if
self
.
config
.
fewshot_config
else
"default"
)(
list
(
self
.
fewshot_docs
()),
self
,
rnd
=
random
.
Random
(
1234
))
)(
list
(
self
.
fewshot_docs
()),
self
,
rnd
=
random
.
Random
(
1234
))
if
self
.
has_test_docs
():
if
self
.
has_test_docs
():
...
...
lm_eval/utils.py
View file @
e4aa240e
...
@@ -63,7 +63,9 @@ def simple_parse_args_string(args_string):
...
@@ -63,7 +63,9 @@ def simple_parse_args_string(args_string):
if
not
args_string
:
if
not
args_string
:
return
{}
return
{}
arg_list
=
[
arg
for
arg
in
args_string
.
split
(
","
)
if
arg
]
arg_list
=
[
arg
for
arg
in
args_string
.
split
(
","
)
if
arg
]
args_dict
=
{
k
:
handle_arg_string
(
v
)
for
k
,
v
in
[
arg
.
split
(
"="
)
for
arg
in
arg_list
]}
args_dict
=
{
k
:
handle_arg_string
(
v
)
for
k
,
v
in
[
arg
.
split
(
"="
)
for
arg
in
arg_list
]
}
return
args_dict
return
args_dict
...
...
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