Skip to content

Commit

Permalink
fix: raises error if backend is not supported
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
aarnphm committed Nov 20, 2023
1 parent 3769ca7 commit 5b92e84
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openllm-python/src/openllm_cli/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 5b92e84

Please sign in to comment.