Skip to content

Commit e26b76b

Browse files
authored
better formatting output (#37441)
1 parent 928ad7e commit e26b76b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/notebooks/beam-ml/run_inference_vllm.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
"source": [
232232
"class FormatOutput(beam.DoFn):\n",
233233
" def process(self, element, *args, **kwargs):\n",
234-
" yield \"Input: {input}, Output: {output}\".format(input=element.example, output=element.inference)\n",
234+
" yield \"Input: {input}, Output: {output}\".format(input=element.example, output=element.inference.choices[0].text)\n",
235235
"\n",
236236
"prompts = [\n",
237237
" \"Hello, my name is\",\n",
@@ -500,7 +500,7 @@
500500
"\n",
501501
"class FormatOutput(beam.DoFn):\n",
502502
" def process(self, element, *args, **kwargs):\n",
503-
" yield \"Input: {input}, Output: {output}\".format(input=element.example, output=element.inference)\n",
503+
" yield \"Input: {input}, Output: {output}\".format(input=element.example, output=element.inference.choices[0].text)\n",
504504
"\n",
505505
"logging.getLogger().setLevel(logging.INFO) # Output additional Dataflow Job metadata and launch logs. \n",
506506
"prompts = [\n",

0 commit comments

Comments
 (0)