From 9fb68a76552c5d302c5b13c5c4fdf250423113a5 Mon Sep 17 00:00:00 2001 From: Villu Ruusmann Date: Wed, 27 Nov 2024 20:25:07 +0200 Subject: [PATCH] Updated command-line interface --- jpmml_evaluator/cli.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jpmml_evaluator/cli.py b/jpmml_evaluator/cli.py index f10a7a6..ad07fa0 100644 --- a/jpmml_evaluator/cli.py +++ b/jpmml_evaluator/cli.py @@ -7,15 +7,17 @@ from jpmml_evaluator import make_evaluator def main(): - parser = ArgumentParser(description = "JPMML-Evaluator command-line application") + parser = ArgumentParser(prog = "jpmml_evaluator", description = "JPMML-Evaluator command-line application") parser.add_argument("model", type = str, help = "Model PMML file") - parser.add_argument("-i", "--input", type = str, help = "Input CSV file") - parser.add_argument("-o", "--output", type = str, help = "Output CSV file") + parser.add_argument("--backend", type = str, default = "jpype", help = "Java backend. One of 'jpype', 'pyjnius' or 'py4j'") + parser.add_argument("--transpile", action = "store_true", help = "Transpile PMML to Java") + parser.add_argument("-i", "--input", type = str, help = "Input CSV file. If absent, read from system input") + parser.add_argument("-o", "--output", type = str, help = "Output CSV file. If absent, write to system output") parser.add_argument("--sep", type = str, default = ",", help = "CSV separator character") args = parser.parse_args() - evaluator = make_evaluator(args.model) + evaluator = make_evaluator(args.model, backend = args.backend, transpile = args.transpile) evaluator.verify() if args.input: