Skip to content

Commit

Permalink
feat: Add adapter logs for Inference API (#543)
Browse files Browse the repository at this point in the history
**Reason for Change**:
Add adapter logs for Inference API

Co-authored-by: Bangqi Zhu <bangqizhu@microsoft.com>
  • Loading branch information
bangqipropel and Bangqi Zhu authored Aug 15, 2024
1 parent ea86744 commit 868efc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion presets/inference/text-generation/inference_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,11 @@ def __post_init__(self): # validate parameters
active_adapters = model.active_adapters
if len(active_adapters) != 1 or active_adapters[0] != "combined_adapter":
raise ValueError(f"Adpaters is input but not merged correctlly")
print("Adapter added:", ', '.join(sorted(adapter_names)))
else:
print("Warning: Did not find any valid adapters mounted, using base model")
model = base_model

print("Model:", model)

pipeline_kwargs = {
Expand Down

0 comments on commit 868efc3

Please sign in to comment.