diff --git a/inference_cli/benchmark.py b/inference_cli/benchmark.py index 80672bc51..328f446b7 100644 --- a/inference_cli/benchmark.py +++ b/inference_cli/benchmark.py @@ -195,6 +195,9 @@ def python_package_speed( model_configuration=model_configuration, output_location=output_location, ) + except KeyboardInterrupt: + print("Benchmark interrupted.") + return except Exception as error: typer.echo(f"Command failed. Cause: {error}") raise typer.Exit(code=1)