moved constant

This commit is contained in:
2026-03-06 11:36:07 +08:00
parent 3fc3d7288c
commit 07149e426e
3 changed files with 7 additions and 5 deletions

View File

@@ -5,15 +5,13 @@ import subprocess
import json
from lang_agent.config.core_config import load_tyro_conf
_PROJECT_ROOT = osp.dirname(osp.dirname(osp.dirname(osp.abspath(__file__))))
_TY_BUILD_SCRIPT = osp.join(_PROJECT_ROOT, "lang_agent", "config", "ty_build_config.py")
from lang_agent.config.constants import TY_BUILD_SCRIPT, _PROJECT_ROOT
def opt_to_config(save_path: str, *nargs):
os.makedirs(osp.dirname(save_path), exist_ok=True)
subprocess.run(
["python", _TY_BUILD_SCRIPT, "--save-path", save_path, *nargs],
["python", TY_BUILD_SCRIPT, "--save-path", save_path, *nargs],
check=True,
cwd=_PROJECT_ROOT,
)