From 5a6761305444e97b8c8ae66d77bf1adf388ec1ee Mon Sep 17 00:00:00 2001 From: Ella Charlaix Date: Fri, 8 Sep 2023 12:06:41 +0200 Subject: [PATCH] fix INC CLI --- optimum/commands/neural_compressor/quantize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/optimum/commands/neural_compressor/quantize.py b/optimum/commands/neural_compressor/quantize.py index c822b1a195..e95eb3ce83 100644 --- a/optimum/commands/neural_compressor/quantize.py +++ b/optimum/commands/neural_compressor/quantize.py @@ -28,7 +28,7 @@ def parse_args_inc_quantize(parser: "ArgumentParser"): required_group = parser.add_argument_group("Required arguments") required_group.add_argument( "--model", - type=Path, + type=str, required=True, help="Path to the repository where the model to quantize is located.", ) @@ -83,7 +83,7 @@ def run(self): if task == "auto": try: - task = TasksManager.infer_task_from_model(str(model_id)) + task = TasksManager.infer_task_from_model(model_id) except Exception as e: return ( f"### Error: {e}. Please pass explicitely the task as it could not be infered.",