Skip to content

Commit

Permalink
format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayv25 committed Oct 10, 2023
1 parent 065f2dc commit 40f38ff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def initialize(self, args):
AsyncEngineArgs(**vllm_engine_config)
)

output_config = pb_utils.get_output_config_by_name(self.model_config, "text_output")
output_config = pb_utils.get_output_config_by_name(
self.model_config, "text_output"
)
self.output_dtype = pb_utils.triton_string_to_numpy(output_config["data_type"])

# Counter to keep track of ongoing request counts
Expand Down Expand Up @@ -172,7 +174,9 @@ async def generate(self, request):
self.ongoing_request_count += 1
try:
request_id = random_uuid()
prompt = pb_utils.get_input_tensor_by_name(request, "text_input").as_numpy()[0]
prompt = pb_utils.get_input_tensor_by_name(
request, "text_input"
).as_numpy()[0]
if isinstance(prompt, bytes):
prompt = prompt.decode("utf-8")
stream = pb_utils.get_input_tensor_by_name(request, "stream").as_numpy()[0]
Expand Down

0 comments on commit 40f38ff

Please sign in to comment.