feat: add --confirm-run-unsafe-code CLI option to allow execution of untrusted code (#348)

This commit is contained in:
Ivan Fioravanti
2025-08-04 14:20:32 -07:00
committed by GitHub
parent 06efe8db99
commit fc800f1a0b
+7
View File
@@ -372,6 +372,12 @@ def main():
apply_chat_template, e.g. '{"enable_thinking":false}'""",
default="{}",
)
parser.add_argument(
"--confirm-run-unsafe-code",
action="store_true",
help="Confirm that you want to run tasks that execute untrusted code.",
default=False,
)
args = parser.parse_args()
@@ -401,6 +407,7 @@ def main():
numpy_random_seed=args.seed,
torch_random_seed=args.seed,
fewshot_random_seed=args.seed,
confirm_run_unsafe_code=args.confirm_run_unsafe_code,
)
file_keys = ["eval", args.model.replace("/", "_"), version("lm_eval")]