From 54745c8be6a579256788f6c32785000ed3387c5a Mon Sep 17 00:00:00 2001 From: u25867 Date: Thu, 23 Nov 2023 11:39:23 +1100 Subject: [PATCH] amended cli scripts to function better --- uncoverml/scripts/uncoverml.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/uncoverml/scripts/uncoverml.py b/uncoverml/scripts/uncoverml.py index 3f10f056..cc6d4c71 100644 --- a/uncoverml/scripts/uncoverml.py +++ b/uncoverml/scripts/uncoverml.py @@ -337,7 +337,8 @@ def unsupervised(config): @click.argument('calling_process') @click.option('-p', '--partitions', type=int, default=1, help='divide each node\'s data into this many partitions') -@click.option('-i', '--interface_job', type=bool, default=False) +@click.option('-i', '--interface_job', is_flag=True, + help='Flag that the call is coming from an interface job') def validate(pipeline_file, model_or_cluster_file, calling_process, partitions, interface_job): """Validate a model with out-of-sample shapefile.""" with open(model_or_cluster_file, 'rb') as f: @@ -376,7 +377,8 @@ def validate(pipeline_file, model_or_cluster_file, calling_process, partitions, help='mask values where to predict') @click.option('-t', '--prediction_template', type=click.Path(exists=True), default=None, help='mask values where to predict') -@click.option('-i', '--interface_job', type=bool, default=False) +@click.option('-i', '--interface_job', is_flag=True, + help='Flag that the call is coming from an interface job') def predict(model_or_cluster_file, partitions, mask, retain, prediction_template, interface_job): with open(model_or_cluster_file, 'rb') as f: state_dict = joblib.load(f)