Skip to content

Commit

Permalink
Check invalid input directory in nvflare config (#2295)
Browse files Browse the repository at this point in the history
* check invalid input directory

* check invalid input directory
  • Loading branch information
chesterxgchen authored Jan 20, 2024
1 parent 73b0bdc commit af027a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nvflare/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ def def_config_parser(sub_cmd):
def handle_config_cmd(args):
config_file_path, nvflare_config = get_hidden_config()

if not args.job_templates_dir or not os.path.isdir(args.job_templates_dir):
raise ValueError(f"job_templates_dir='{args.job_templates_dir}', it is not a directory")

nvflare_config = create_startup_kit_config(nvflare_config, args.startup_kit_dir)
nvflare_config = create_poc_workspace_config(nvflare_config, args.poc_workspace_dir)
nvflare_config = create_job_template_config(nvflare_config, args.job_templates_dir)
Expand Down

0 comments on commit af027a0

Please sign in to comment.