Skip to content

Commit

Permalink
fix(train/test): Unify CLI options
Browse files Browse the repository at this point in the history
  • Loading branch information
mmjb committed Oct 8, 2019
1 parent 117bb23 commit d9a9c5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
Options:
-h --help Show this screen.
--result_dir DIR Directory to store logfiles and trained models. [default: trained_models]
--result-dir DIR Directory to store logfiles and trained models. [default: trained_models]
--azure-info PATH Azure authentication information file (JSON). [default: azure_auth.json]
--quiet Show less output.
--debug Turn on debugger.
"""
Expand Down Expand Up @@ -36,7 +37,7 @@ def run(args):
test_data_path = args.get('DATA_PATH')
if test_data_path is not None:
test_data_path = RichPath.create(test_data_path, azure_info_path)
result_dir = args.get('--result_dir', 'trained_models')
result_dir = args.get('--result-dir', 'trained_models')
test(model_path, test_data_path, result_dir, quiet=args.get('--quiet'))


Expand Down
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def run(args):
task_params[param_name] = RichPath.create(param_value, azure_info_path)

# Now prepare to actually run by setting up directories, creating object instances and running:
result_dir = args.get('--result_dir', 'trained_models')
result_dir = args.get('--result-dir', 'trained_models')
os.makedirs(result_dir, exist_ok=True)
task = task_cls(task_params)
data_path = args.get('--data-path') or task.default_data_path()
Expand Down

0 comments on commit d9a9c5d

Please sign in to comment.