From 5b92e848e2f2feb5a0aa25548442835f47b8bc2e Mon Sep 17 00:00:00 2001 From: Aaron <29749331+aarnphm@users.noreply.github.com> Date: Mon, 20 Nov 2023 17:03:30 -0500 Subject: [PATCH] fix: raises error if backend is not supported Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> --- openllm-python/src/openllm_cli/entrypoint.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openllm-python/src/openllm_cli/entrypoint.py b/openllm-python/src/openllm_cli/entrypoint.py index 3c99d544..49348038 100644 --- a/openllm-python/src/openllm_cli/entrypoint.py +++ b/openllm-python/src/openllm_cli/entrypoint.py @@ -1048,6 +1048,8 @@ def build_command( serialisation, default='safetensors' if has_safetensors_weights(model_id, model_version) else 'legacy' ), ) + if llm.__llm_backend__ not in llm.config['backend']: + raise click.ClickException(f"'{backend}' is not supported with {model_id}") backend_warning(llm.__llm_backend__, build=True) os.environ.update( **process_environ(