Skip to content

Commit

Permalink
Updated command-line interface
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Nov 27, 2024
1 parent 71b177f commit 9fb68a7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions jpmml_evaluator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9fb68a7

Please sign in to comment.