Skip to content

Commit

Permalink
Fix bug in handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ydm-amazon committed Jan 5, 2024
1 parent bd9d6d0 commit 26401a6
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions engines/python/setup/djl_python/tensorrt_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class TRTLLMService(object):
def __init__(self):
self.initialized = False
self.trt_configs = None
self.rolling_batch_type = None
self.rolling_batch = None

def initialize(self, properties: dict):
Expand Down Expand Up @@ -78,13 +77,10 @@ def inference(self, inputs):
if len(input_data) == 0:
for i in range(len(batch)):
err = errors.get(i)
if self.rolling_batch_type:
err = {"data": "", "last": True, "code": 424, "error": err}
outputs.add(Output.binary_encode(err),
key="data",
batch_index=i)
else:
outputs.add(err, key="data", batch_index=i)
err = {"data": "", "last": True, "code": 424, "error": err}
outputs.add(Output.binary_encode(err),
key="data",
batch_index=i)
return outputs

if inputs.get_property("reset_rollingbatch"):
Expand Down

0 comments on commit 26401a6

Please sign in to comment.