parse¶
- torchtune.config.parse(recipe_main: Callable[[DictConfig], Any]) Callable[[...], Any] [source]¶
一个装饰器,用于处理秘籍的配置文件解析和 CLI 覆盖。将其用于秘籍的主函数。
- 参数:
recipe_main (Recipe) – 初始化和运行秘籍的主方法
示例
>>> @parse >>> def main(cfg: DictConfig): >>> ...
>>> # With the decorator, the parameters will be parsed into cfg when run as: >>> tune my_recipe --config config.yaml foo=bar
- 返回值:
被装饰的主函数
- 返回类型:
Callable[…, Any]