@@ -726,10 +726,9 @@ def descriptive_statistics_raster_cli(input_file: INPUT_FILE_OPTION):
726
726
results_dict = descriptive_statistics_raster (raster )
727
727
typer .echo ("Progress: 75%" )
728
728
729
- json_str = json .dumps (results_dict )
730
- typer .echo ("Progress: 100%\n " )
729
+ typer .echo ("Progress: 100% \n " )
731
730
732
- typer .echo (f"Results: { json_str } " )
731
+ typer .echo (f"Results: { str ( results_dict ) } " )
733
732
typer .echo ("\n Descriptive statistics (raster) completed" )
734
733
735
734
@@ -755,11 +754,10 @@ def descriptive_statistics_vector_cli(input_file: INPUT_FILE_OPTION, column: str
755
754
raise Exception ("Could not read input file as raster or dataframe" )
756
755
typer .echo ("Progress: 75%" )
757
756
758
- json_str = json .dumps (results_dict )
759
757
typer .echo ("Progress: 100%" )
760
758
761
- typer .echo (f"Results: { json_str } " )
762
- typer .echo ("Descriptive statistics (vector) completed" )
759
+ typer .echo (f"Results: { str ( results_dict ) } " )
760
+ typer .echo ("\n Descriptive statistics (vector) completed" )
763
761
764
762
765
763
# LOCAL MORAN'S I
@@ -3115,10 +3113,9 @@ def summarize_probability_metrics_cli(true_labels: INPUT_FILE_OPTION, probabilit
3115
3113
3116
3114
typer .echo ("Progress: 75%" )
3117
3115
3118
- json_str = json .dumps (results_dict )
3119
3116
typer .echo ("Progress: 100% \n " )
3120
3117
3121
- typer .echo (f"Results: { json_str } " )
3118
+ typer .echo (f"Results: { str ( results_dict ) } " )
3122
3119
typer .echo ("\n Generating probability metrics summary completed." )
3123
3120
3124
3121
@@ -3141,11 +3138,10 @@ def summarize_label_metrics_binary_cli(true_labels: INPUT_FILE_OPTION, predictio
3141
3138
results_dict = summarize_label_metrics_binary (y_true = y_true , y_pred = y_pred )
3142
3139
typer .echo ("Progress: 75%" )
3143
3140
3144
- json_str = json .dumps (results_dict )
3145
3141
typer .echo ("Progress: 100% \n " )
3146
3142
3147
- typer .echo (f"Results: { json_str } " )
3148
- typer .echo ("\n Generating prediction label metrics summary completed." )
3143
+ typer .echo (f"Results: { str ( results_dict ) } " )
3144
+ typer .echo ("\n Generating prediction label metrics summary completed." )
3149
3145
3150
3146
3151
3147
@app .command ()
@@ -3357,12 +3353,7 @@ def score_predictions_cli(
3357
3353
outputs = score_predictions (y_true , y_pred , metrics )
3358
3354
typer .echo ("Progress: 100% \n " )
3359
3355
3360
- if isinstance (outputs , dict ):
3361
- for key , value in outputs .items ():
3362
- typer .echo (f"{ key } : { value } " )
3363
- else :
3364
- typer .echo (outputs )
3365
-
3356
+ typer .echo (f"Results: { str (outputs )} " )
3366
3357
typer .echo ("\n Scoring predictions completed." )
3367
3358
3368
3359
0 commit comments