Commit 16caed31 authored by Myle Ott's avatar Myle Ott
Browse files

Change --path to be colon-separated instead of comma-separated

parent ef179415
...@@ -30,7 +30,7 @@ def main(args): ...@@ -30,7 +30,7 @@ def main(args):
# Load ensemble # Load ensemble
print('| loading model(s) from {}'.format(args.path)) print('| loading model(s) from {}'.format(args.path))
models, _ = utils.load_ensemble_for_inference(args.path.split(','), task) models, _ = utils.load_ensemble_for_inference(args.path.split(':'), task)
# Optimize ensemble for generation and set the source and dest dicts on the model (required by scorer) # Optimize ensemble for generation and set the source and dest dicts on the model (required by scorer)
for model in models: for model in models:
......
...@@ -237,7 +237,7 @@ def add_checkpoint_args(parser): ...@@ -237,7 +237,7 @@ def add_checkpoint_args(parser):
def add_common_eval_args(group): def add_common_eval_args(group):
group.add_argument('--path', metavar='FILE', group.add_argument('--path', metavar='FILE',
help='path(s) to model file(s), comma separated') help='path(s) to model file(s), colon separated')
group.add_argument('--remove-bpe', nargs='?', const='@@ ', default=None, group.add_argument('--remove-bpe', nargs='?', const='@@ ', default=None,
help='remove BPE tokens before scoring') help='remove BPE tokens before scoring')
group.add_argument('--cpu', action='store_true', help='generate on CPU') group.add_argument('--cpu', action='store_true', help='generate on CPU')
......
...@@ -38,7 +38,7 @@ def main(args): ...@@ -38,7 +38,7 @@ def main(args):
# Load ensemble # Load ensemble
print('| loading model(s) from {}'.format(args.path)) print('| loading model(s) from {}'.format(args.path))
models, _ = utils.load_ensemble_for_inference([args.path], task) models, _ = utils.load_ensemble_for_inference(args.path.split(':'), task)
# Optimize ensemble for generation # Optimize ensemble for generation
for model in models: for model in models:
......
...@@ -73,7 +73,7 @@ def main(args): ...@@ -73,7 +73,7 @@ def main(args):
# Load ensemble # Load ensemble
print('| loading model(s) from {}'.format(args.path)) print('| loading model(s) from {}'.format(args.path))
model_paths = args.path.split(',') model_paths = args.path.split(':')
models, model_args = utils.load_ensemble_for_inference(model_paths, task) models, model_args = utils.load_ensemble_for_inference(model_paths, task)
# Set dictionaries # Set dictionaries
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment