mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-23 06:12:50 +08:00
[patch] Patch remote OS command injection vulnerability
Former-commit-id: aa6a174d6822340022433c5ba38182b4932adecb
This commit is contained in:
parent
4d49dc0559
commit
e272f87849
@ -320,7 +320,12 @@ class Runner:
|
|||||||
if args.get("deepspeed", None) is not None:
|
if args.get("deepspeed", None) is not None:
|
||||||
env["FORCE_TORCHRUN"] = "1"
|
env["FORCE_TORCHRUN"] = "1"
|
||||||
|
|
||||||
self.trainer = Popen(f"llamafactory-cli train {save_cmd(args)}", env=env, shell=True)
|
cmd = [
|
||||||
|
"llamafactory-cli",
|
||||||
|
"train",
|
||||||
|
*save_cmd(args).split(),
|
||||||
|
]
|
||||||
|
self.trainer = Popen(cmd, env=env)
|
||||||
yield from self.monitor()
|
yield from self.monitor()
|
||||||
|
|
||||||
def _form_config_dict(self, data: Dict["Component", Any]) -> Dict[str, Any]:
|
def _form_config_dict(self, data: Dict["Component", Any]) -> Dict[str, Any]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user