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
1cf51552
Commit
1cf51552
authored
May 23, 2023
by
lintangsutawika
Browse files
update
parent
c17e3659
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
lm_eval/prompts/__init__.py
lm_eval/prompts/__init__.py
+5
-2
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+1
-1
No files found.
lm_eval/prompts/__init__.py
View file @
1cf51552
...
@@ -17,10 +17,13 @@ PROMPT_REGISTRY = {
...
@@ -17,10 +17,13 @@ PROMPT_REGISTRY = {
def
get_prompt
(
prompt_id
:
str
,
dataset_name
=
None
,
subset_name
=
None
):
def
get_prompt
(
prompt_id
:
str
,
dataset_name
=
None
,
subset_name
=
None
):
# unpack prompt name
# unpack prompt name
category_name
,
prompt_name
=
prompt_id
.
split
(
":"
)
category_name
,
prompt_name
=
prompt_id
.
split
(
":"
)
eval_logger
.
info
(
f
"Loading prompt from
{
category_name
}
"
)
if
subset_name
is
None
:
dataset_full_name
=
dataset_name
else
:
dataset_full_name
=
f
"
{
dataset_name
}
-
{
subset_name
}
"
eval_logger
.
info
(
f
"Loading prompt from
{
category_name
}
for
{
dataset_full_name
}
"
)
if
category_name
==
"promptsource"
:
if
category_name
==
"promptsource"
:
try
:
try
:
# prompts = DatasetTemplates(dataset_name, dataset_path)
if
subset_name
is
None
:
if
subset_name
is
None
:
prompts
=
DatasetTemplates
(
dataset_name
=
dataset_name
)
prompts
=
DatasetTemplates
(
dataset_name
=
dataset_name
)
else
:
else
:
...
...
lm_eval/tasks/__init__.py
View file @
1cf51552
...
@@ -55,7 +55,7 @@ def get_task(task_name, config):
...
@@ -55,7 +55,7 @@ def get_task(task_name, config):
return
TASK_REGISTRY
[
task_name
](
config
=
config
)
return
TASK_REGISTRY
[
task_name
](
config
=
config
)
except
KeyError
:
except
KeyError
:
eval_logger
.
info
(
"Available tasks:"
)
eval_logger
.
info
(
"Available tasks:"
)
eval_logger
.
info
(
TASK_REGISTRY
)
eval_logger
.
info
(
ALL_TASKS
)
raise
KeyError
(
f
"Missing task
{
task_name
}
"
)
raise
KeyError
(
f
"Missing task
{
task_name
}
"
)
...
...
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