Skip to content

Commit c1a127f

Browse files
author
Boyu Chen
committed
Add warning message.
1 parent c2440c1 commit c1a127f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sagemaker_huggingface_inference_toolkit/handler_service.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ def handle(self, data, context):
245245
"""
246246
try:
247247
if not self.initialized:
248+
logger.warn(
249+
f"Model is not initialized, will try to load model again.\n"
250+
f"This might cause following error during invocation:\n"
251+
f"model_fn() takes 1 positional argument but 2 were given :\n"
252+
f"Please consider increase wait time for model loading.\n"
253+
)
248254
self.initialize(context)
249255

250256
input_data = data[0].get("body")

0 commit comments

Comments
 (0)