Unverified Commit 45823914 authored by Hailey Schoelkopf's avatar Hailey Schoelkopf Committed by GitHub
Browse files

Hotfix: fix TypeError in `--trust_remote_code` (#1517)

parent 48476c4c
......@@ -203,7 +203,7 @@ def parse_eval_args() -> argparse.Namespace:
)
parser.add_argument(
"--trust_remote_code",
default=True,
action="store_true",
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']}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment