Fix score and eval run types
@@ -150,6 +150,9 @@ def main():
help="Path to the new target vocabulary.")
args = parser.parse_args()
+ if hasattr(args, "features_file"):
+ if len(args.features_file) == 1:
+ args.features_file = args.features_file[0]
_set_log_level(getattr(logging, args.log_level))
tf.config.threading.set_intra_op_parallelism_threads(args.intra_op_parallelism_threads)
@@ -192,8 +195,6 @@ def main():
labels_file=args.labels_file)
print(metrics)
elif args.run == "infer":
- if len(args.features_file) == 1:
- args.features_file = args.features_file[0]
runner.infer(
args.features_file,
predictions_file=args.predictions_file,
