Skip to content

Commit

Permalink
fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanbo Liu committed Dec 26, 2023
1 parent ad435a7 commit 5693231
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions runtimes/huggingface/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,8 @@ async def test_pipeline_uses_inference_kwargs(
tokenizer = runtime._model.tokenizer

prediction = await runtime.predict(payload)
generated_text = MultiInputRequestCodec.decode_response(prediction)["output"][0][
"generated_text"
]
decoded_prediction = MultiInputRequestCodec.decode_response(prediction)
generated_text = decoded_prediction.get("output")[0]["generated_text"]
assert isinstance(generated_text, str)
tokenized_generated_text = tokenizer.tokenize(generated_text)
num_predicted_tokens = len(tokenized_generated_text)
Expand Down

0 comments on commit 5693231

Please sign in to comment.