rename cmd arg

This commit is contained in:
kadarakos 2022-11-23 17:24:43 +00:00
parent 490bce3cd8
commit 35893b187c

View File

@ -76,7 +76,7 @@ def apply_cli(
data_path: Path = Arg(..., help=path_help, exists=True),
output_file: Path = Arg(..., help=out_help, dir_okay=False),
code_path: Optional[Path] = Opt(None, "--code", "-c", help=code_help),
json_field: str = Opt("text", "--json-field", "-jf", help="Field to grab from .jsonl"),
text_key: str = Opt("text", "--text-key", "-tk", help="Field to grab from .jsonl"),
force_overwrite: bool = Opt(False, "--force", "-F", help="Force overwriting the output file"),
use_gpu: int = Opt(-1, "--gpu-id", "-g", help="GPU ID or -1 for CPU."),
batch_size: int = Opt(1, "--batch-size", "-b", help="Batch size."),
@ -102,7 +102,7 @@ def apply_cli(
msg.fail(f"Couldn't find data path: {data_path}", exits=1)
import_code(code_path)
setup_gpu(use_gpu)
apply(data_path, output_file, model, json_field, batch_size, n_process)
apply(data_path, output_file, model, text_key, batch_size, n_process)
def apply(