Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions engines/python/setup/djl_python/async_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ def _extract_lora_adapter(raw_request, decoded_payload):
adapter_name = raw_request.get_property(
SAGEMAKER_ADAPTER_IDENTIFIER_HEADER)
logging.debug(f"Found adapter in headers: {adapter_name}")
elif "adapter" in decoded_payload:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we accept both "adapter" or "adapters" with a defined preference and warning ?

I worry this will break CX for customers who have already started using "adapter"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sagemaker users, they always use SAGEMAKER_ADAPTER_IDENTIFIER_HEADER, adapters in the payload is a legacy behavior.

adapter_name = decoded_payload.pop("adapter")
elif "adapters" in decoded_payload:
adapter_name = decoded_payload.pop("adapters")
logging.debug(f"Found adapter in payload: {adapter_name}")

return adapter_name
Expand Down
Loading