fix: raises error if backend is not supported

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
Aaron
2023-11-20 17:03:30 -05:00
parent 3769ca73a9
commit 5b92e848e2

View File

@@ -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(