You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by tv...@apache.org on 2022/06/29 18:52:57 UTC

[beam] branch master updated: Change wording of Pytorch LM example (#22099)

This is an automated email from the ASF dual-hosted git repository.

tvalentyn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new f2dcdcf4c4b Change wording of Pytorch LM example (#22099)
f2dcdcf4c4b is described below

commit f2dcdcf4c4bcdf47b1eb6ce414fa376f2054f21f
Author: Andy Ye <an...@gmail.com>
AuthorDate: Wed Jun 29 11:52:47 2022 -0700

    Change wording of Pytorch LM example (#22099)
---
 .../examples/inference/pytorch_language_modeling.py            | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sdks/python/apache_beam/examples/inference/pytorch_language_modeling.py b/sdks/python/apache_beam/examples/inference/pytorch_language_modeling.py
index 656f43eb011..ee0526c4c7c 100644
--- a/sdks/python/apache_beam/examples/inference/pytorch_language_modeling.py
+++ b/sdks/python/apache_beam/examples/inference/pytorch_language_modeling.py
@@ -17,11 +17,11 @@
 
 """"A pipeline that uses RunInference to perform Language Modeling with Bert.
 
-This pipeline takes sentences from a custom text file, removes the last word
-of the sentence, and then uses the BertForMaskedLM from Hugging Face to predict
-the best word to follow or continue that sentence given all the words already in
-the sentence. The pipeline then writes the prediction to an output file in
-which users can then compare against the original sentence.
+This pipeline takes sentences from a custom text file, converts the last word
+of the sentence into a [MASK] token, and then uses the BertForMaskedLM from
+Hugging Face to predict the best word for the masked token given all the words
+already in the sentence. The pipeline then writes the prediction to an output
+file in which users can then compare against the original sentence.
 """
 
 import argparse