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
641ffeba
Commit
641ffeba
authored
Jan 19, 2024
by
lintangsutawika
Browse files
changed source of ALL_TASKS
parent
d5071b70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
lm_eval/__main__.py
lm_eval/__main__.py
+6
-8
No files found.
lm_eval/__main__.py
View file @
641ffeba
...
...
@@ -10,8 +10,7 @@ from typing import Union
import
numpy
as
np
from
lm_eval
import
evaluator
,
utils
from
lm_eval.api.registry
import
ALL_TASKS
from
lm_eval.tasks
import
include_path
,
initialize_tasks
from
lm_eval.tasks
import
initialize_tasks
from
lm_eval.utils
import
make_table
...
...
@@ -156,24 +155,23 @@ def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None:
eval_logger
.
info
(
f
"Verbosity set to
{
args
.
verbosity
}
"
)
os
.
environ
[
"TOKENIZERS_PARALLELISM"
]
=
"false"
initialize_tasks
(
args
.
verbosity
)
# initialize_tasks(args.verbosity)
ALL_TASKS
=
initialize_tasks
(
args
.
verbosity
,
include_path
=
args
.
include_path
)
if
args
.
limit
:
eval_logger
.
warning
(
" --limit SHOULD ONLY BE USED FOR TESTING."
"REAL METRICS SHOULD NOT BE COMPUTED USING LIMIT."
)
if
args
.
include_path
is
not
None
:
eval_logger
.
info
(
f
"Including path:
{
args
.
include_path
}
"
)
include_path
(
args
.
include_path
)
if
args
.
tasks
is
None
:
task_names
=
ALL_TASKS
eval_logger
.
error
(
"Need to specify task to evaluate."
)
elif
args
.
tasks
==
"list"
:
eval_logger
.
info
(
"Available Tasks:
\n
- {}"
.
format
(
"
\n
- "
.
join
(
sorted
(
ALL_TASKS
)))
)
sys
.
exit
()
else
:
if
os
.
path
.
isdir
(
args
.
tasks
):
import
glob
...
...
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