diff --git a/autowsgr/configs.py b/autowsgr/configs.py index 4bb005d..acfe815 100644 --- a/autowsgr/configs.py +++ b/autowsgr/configs.py @@ -285,9 +285,17 @@ def __post_init__(self) -> None: object.__setattr__(self, 'default_plan_root', os.path.join(DATA_ROOT, 'plans')) if self.plan_root is None: local_plan_root = os.path.join(os.getcwd(), 'plans') + example_plan_root = os.path.join( + os.path.dirname(os.path.dirname(DATA_ROOT)), + 'examples', + 'plans', + ) if os.path.exists(local_plan_root): object.__setattr__(self, 'plan_root', local_plan_root) print(f'使用脚本运行目录的plans: {local_plan_root}') + elif os.path.exists(example_plan_root): + object.__setattr__(self, 'plan_root', example_plan_root) + print(f'使用examples目录的plans: {example_plan_root}') else: object.__setattr__(self, 'plan_root', self.default_plan_root) print(f'使用默认plans: {self.default_plan_root}')