Skip to content
Merged
Show file tree
Hide file tree
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: 3 additions & 1 deletion src/sagemaker/djl_inference/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,11 +854,13 @@ def generate_serving_properties(self, serving_properties=None) -> Dict[str, str]
if self.low_cpu_mem_usage:
serving_properties["option.low_cpu_mem_usage"] = self.low_cpu_mem_usage
# This is a workaround due to a bug in our built in handler for huggingface
# TODO: This needs to be fixed when new dlc is published
# TODO: Remove this logic whenever 0.20.0 image is out of service
if (
serving_properties["option.entryPoint"] == "djl_python.huggingface"
and self.dtype
and self.dtype != "auto"
and self.djl_version
and int(self.djl_version.split(".")[1]) < 21
):
serving_properties["option.dtype"] = "auto"
serving_properties.pop("option.load_in_8bit", None)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_djl_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def test_generate_serving_properties_with_valid_configurations(
"option.entryPoint": "djl_python.huggingface",
"option.s3url": VALID_UNCOMPRESSED_MODEL_DATA,
"option.tensor_parallel_degree": 1,
"option.dtype": "auto",
"option.dtype": "fp32",
"option.device_id": 4,
"option.device_map": "balanced",
}
Expand Down