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

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

parent ef179415
Loading
Loading
Loading
Loading
+1 −1
Changes for eval_lm.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ def main(args):

    # Load ensemble
    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)
    for model in models:
+1 −1
Changes for fairseq/options.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ def add_checkpoint_args(parser):

def add_common_eval_args(group):
    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,
                       help='remove BPE tokens before scoring')
    group.add_argument('--cpu', action='store_true', help='generate on CPU')
+1 −1
Changes for generate.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ def main(args):

    # Load ensemble
    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
    for model in models:
+1 −1
Changes for interactive.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ def main(args):

    # Load ensemble
    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)

    # Set dictionaries