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
9894597c
Commit
9894597c
authored
Oct 10, 2023
by
lintangsutawika
Browse files
add verbose arg
parent
13f0d126
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
9 deletions
+19
-9
lm_eval/__main__.py
lm_eval/__main__.py
+7
-0
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+12
-9
No files found.
lm_eval/__main__.py
View file @
9894597c
...
...
@@ -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
(
"--verbose"
,
type
=
bool
,
default
=
False
,
help
=
"Log error when tasks are not registered."
,
)
return
parser
.
parse_args
()
...
...
@@ -167,6 +173,7 @@ def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None:
assert
args
.
output_path
,
"Specify --output_path"
eval_logger
.
info
(
f
"Selected Tasks:
{
task_names
}
"
)
eval_logger
.
verbose
=
args
.
verbose
results
=
evaluator
.
simple_evaluate
(
model
=
args
.
model
,
...
...
lm_eval/tasks/__init__.py
View file @
9894597c
...
...
@@ -139,15 +139,18 @@ def include_task_folder(task_dir: str, register_task: bool = True) -> None:
register_configurable_group
(
config
,
yaml_path
)
except
Exception
as
error
:
import
traceback
eval_logger
.
warning
(
"Failed to load config in
\n
"
f
"
{
yaml_path
}
\n
"
" Config will not be added to registry
\n
"
f
" Error:
{
error
}
\n
"
f
" Traceback:
{
traceback
.
format_exc
()
}
"
)
if
eval_logger
.
verbose
:
import
traceback
eval_logger
.
warning
(
"Failed to load config in
\n
"
f
"
{
yaml_path
}
\n
"
" Config will not be added to registry
\n
"
f
" Error:
{
error
}
\n
"
f
" Traceback:
{
traceback
.
format_exc
()
}
"
)
else
:
eval_logger
.
warning
(
"Yaml failed to register {yaml_path}
\n
"
)
return
0
...
...
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