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
6a49ed9b
Unverified
Commit
6a49ed9b
authored
Oct 17, 2023
by
Hailey Schoelkopf
Committed by
GitHub
Oct 17, 2023
Browse files
Merge pull request #910 from EleutherAI/verbose
[Refactor] Verbose
parents
73c80915
32a6362c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
lm_eval/__main__.py
lm_eval/__main__.py
+7
-0
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+4
-2
No files found.
lm_eval/__main__.py
View file @
6a49ed9b
...
...
@@ -97,6 +97,12 @@ def parse_eval_args() -> argparse.Namespace:
default
=
None
,
help
=
"Additional path to include if there are external tasks to include."
,
)
parser
.
add_argument
(
"--verbosity"
,
type
=
str
,
default
=
"INFO"
,
help
=
"Log error when tasks are not registered."
,
)
return
parser
.
parse_args
()
...
...
@@ -105,6 +111,7 @@ def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None:
# we allow for args to be passed externally, else we parse them ourselves
args
=
parse_eval_args
()
eval_logger
.
setLevel
(
getattr
(
logging
,
f
"
{
args
.
verbosity
}
"
))
os
.
environ
[
"TOKENIZERS_PARALLELISM"
]
=
"false"
if
args
.
limit
:
...
...
lm_eval/tasks/__init__.py
View file @
6a49ed9b
...
...
@@ -4,7 +4,6 @@ from typing import List, Union, Dict
from
lm_eval
import
utils
from
lm_eval
import
prompts
from
lm_eval.logger
import
eval_logger
from
lm_eval.api.task
import
TaskConfig
,
Task
,
ConfigurableTask
from
lm_eval.api.registry
import
(
register_task
,
...
...
@@ -14,6 +13,9 @@ from lm_eval.api.registry import (
ALL_TASKS
,
)
import
logging
eval_logger
=
logging
.
getLogger
(
'lm-eval'
)
def
register_configurable_task
(
config
:
Dict
[
str
,
str
])
->
int
:
SubClass
=
type
(
...
...
@@ -145,7 +147,7 @@ def include_task_folder(task_dir: str, register_task: bool = True) -> None:
except
Exception
as
error
:
import
traceback
eval_logger
.
warnin
g
(
eval_logger
.
debu
g
(
"Failed to load config in
\n
"
f
"
{
yaml_path
}
\n
"
" Config will not be added to registry
\n
"
...
...
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