damccorm commented on code in PR #27430: URL: https://github.com/apache/beam/pull/27430#discussion_r1263876918
########## sdks/python/apache_beam/examples/ml_transform/ml_transform_basic.py: ########## @@ -61,49 +61,89 @@ def parse_args(): return parser.parse_known_args() -def run(args): - data = [ - dict(x=["Let's", "go", "to", "the", "park"]), - dict(x=["I", "enjoy", "going", "to", "the", "park"]), - dict(x=["I", "enjoy", "reading", "books"]), - dict(x=["Beam", "can", "be", "fun"]), - dict(x=["The", "weather", "is", "really", "nice", "today"]), - dict(x=["I", "love", "to", "go", "to", "the", "park"]), - dict(x=["I", "love", "to", "read", "books"]), - dict(x=["I", "love", "to", "program"]), - ] - +def preprocess_data_for_ml_training(train_data, artifact_mode, args): with beam.Pipeline() as p: Review Comment: I think I agree that having a function header that describes it as a complete pipeline run would be helpful for folks who are less familiar with Beam (and a similar comment on the second one). Running 2 pipelines in a single example might be unexpected -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
