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
45823914
Unverified
Commit
45823914
authored
Mar 04, 2024
by
Hailey Schoelkopf
Committed by
GitHub
Mar 04, 2024
Browse files
Hotfix: fix TypeError in `--trust_remote_code` (#1517)
parent
48476c4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
lm_eval/__main__.py
lm_eval/__main__.py
+2
-4
No files found.
lm_eval/__main__.py
View file @
45823914
...
...
@@ -203,7 +203,7 @@ def parse_eval_args() -> argparse.Namespace:
)
parser
.
add_argument
(
"--trust_remote_code"
,
default
=
T
rue
,
action
=
"store_t
rue
"
,
help
=
"Sets trust_remote_code to True to execute code to create HF Datasets from the Hub"
,
)
...
...
@@ -298,9 +298,7 @@ def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None:
# Respect user's value passed in via CLI, otherwise default to True and add to comma-separated model args
if
args
.
trust_remote_code
:
os
.
environ
[
"HF_DATASETS_TRUST_REMOTE_CODE"
]
=
(
args
.
trust_remote_code
if
args
.
trust_remote_code
else
True
)
os
.
environ
[
"HF_DATASETS_TRUST_REMOTE_CODE"
]
=
str
(
args
.
trust_remote_code
)
args
.
model_args
=
(
args
.
model_args
+
f
",trust_remote_code=
{
os
.
environ
[
'HF_DATASETS_TRUST_REMOTE_CODE'
]
}
"
...
...
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