create and save config via tyro
This commit is contained in:
13
lang_agent/config/ty_build_config.py
Normal file
13
lang_agent/config/ty_build_config.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import tyro
|
||||||
|
from loguru import logger
|
||||||
|
import os
|
||||||
|
import os.path as osp
|
||||||
|
from lang_agent.pipeline import PipelineConfig
|
||||||
|
|
||||||
|
def build_conf(pipeline:PipelineConfig, save_path:str):
|
||||||
|
os.makedirs(osp.dirname(save_path), exist_ok=True)
|
||||||
|
logger.info(pipeline)
|
||||||
|
pipeline.save_config(save_path)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
tyro.cli(build_conf)
|
||||||
Reference in New Issue
Block a user