This is an automated email from the ASF dual-hosted git repository. damccorm pushed a commit to branch users/damccorm/notebook-bug in repository https://gitbox.apache.org/repos/asf/beam.git
commit c49fdb66fa8b1d8f37808166732637b30c9f7b33 Author: Danny McCormick <[email protected]> AuthorDate: Wed Sep 28 16:56:42 2022 -0400 Fix Small pytorch notebook bug fix --- examples/notebooks/beam-ml/README.md | 2 +- examples/notebooks/beam-ml/run_inference_pytorch.ipynb | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/notebooks/beam-ml/README.md b/examples/notebooks/beam-ml/README.md index 8a3776d1bbd..d93b5ef8b7f 100644 --- a/examples/notebooks/beam-ml/README.md +++ b/examples/notebooks/beam-ml/README.md @@ -34,7 +34,7 @@ Beam comes with various implementations of ModelHandler. ### Loading the Notebooks -1. A quick way to get started is with [Colab](colab.sandbox.google.com). +1. A quick way to get started is with [Colab](https://colab.sandbox.google.com/). 2. Load the notebook from github, for example: ``` https://github.com/apache/beam/blob/master/examples/notebooks/beam-ml/run_inference_tensorflow.ipynb. diff --git a/examples/notebooks/beam-ml/run_inference_pytorch.ipynb b/examples/notebooks/beam-ml/run_inference_pytorch.ipynb index 1dec04f020b..0909b4e0b5b 100644 --- a/examples/notebooks/beam-ml/run_inference_pytorch.ipynb +++ b/examples/notebooks/beam-ml/run_inference_pytorch.ipynb @@ -895,10 +895,10 @@ "key: second_question * 10, input: 108.0 output: 1075.4891357421875\n", "key: first_question * 10, input: 105.0 output: 1045.84521484375\n", "key: fourth_question * 10, input: 1013.0 output: 10018.0546875\n", - "key: third_question * 5, input: 1000.0 output: 9889.59765625\n", - "key: second_question * 5, input: 108.0 output: 1075.4891357421875\n", - "key: first_question * 5, input: 105.0 output: 1045.84521484375\n", - "key: fourth_question * 5, input: 1013.0 output: 10018.0546875\n" + "key: third_question * 5, input: 1000.0 output: 4962.61962890625\n", + "key: second_question * 5, input: 108.0 output: 538.472412109375\n", + "key: first_question * 5, input: 105.0 output: 523.5929565429688\n", + "key: fourth_question * 5, input: 1013.0 output: 5027.0966796875\n" ] } ], @@ -916,7 +916,7 @@ " | read_from_bq\n", " | \"CreateMultiplyFiveTuple\" >> beam.Map(lambda x: ('{} {}'.format(x['key'], '* 5'), x['value']))\n", " | \"ConvertNumpyToTensorFiveTuple\" >> beam.Map(lambda x: (x[0], torch.Tensor([x[1]])))\n", - " | \"RunInferenceTorchFiveTuple\" >> RunInference(keyed_torch_ten_times_model_handler)\n", + " | \"RunInferenceTorchFiveTuple\" >> RunInference(keyed_torch_five_times_model_handler)\n", " )\n", " multiply_ten = (\n", " p \n",
