refactor: get_mean_grouping command takes in export_name (#2677)

The `get_mean_grouping_command` currently does not take `export_name` as
param. Add the param for better naming use case.
This commit is contained in:
Klaijan 2024-03-20 17:09:02 -07:00 committed by GitHub
parent 31bef433ad
commit 469f878d14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 6 deletions

View File

@ -42,7 +42,7 @@ def main():
help="Directory to save the output evaluation metrics to. Default to \
your/working/dir/metrics/",
)
@click.option("--grouping", type=str, help="Input field for aggregration, or leave blank if none.")
@click.option("--group_by", type=str, help="Input field for aggregration, or leave blank if none.")
@click.option(
"--weights",
type=(int, int, int),
@ -74,7 +74,7 @@ def measure_text_extraction_accuracy_command(
output_type: str,
output_list: Optional[List[str]] = None,
source_list: Optional[List[str]] = None,
grouping: Optional[str] = None,
group_by: Optional[str] = None,
):
return measure_text_extraction_accuracy(
output_dir,
@ -82,7 +82,7 @@ def measure_text_extraction_accuracy_command(
output_list,
source_list,
export_dir,
grouping,
group_by,
weights,
visualize,
output_type,
@ -158,8 +158,13 @@ def measure_element_type_accuracy_command(
type=str,
help="Evaluated metric. Expecting one of 'text_extraction' or 'element_type'",
)
def get_mean_grouping_command(group_by: str, data_input: str, export_dir: str, eval_name: str):
return get_mean_grouping(group_by, data_input, export_dir, eval_name)
@click.option(
"--export_name", type=str, help="Optional. Define your file name for the output here."
)
def get_mean_grouping_command(
group_by: str, data_input: str, export_dir: str, eval_name: str, export_name: str
):
return get_mean_grouping(group_by, data_input, export_dir, eval_name, export_name)
@main.command()