[
https://issues.apache.org/jira/browse/BEAM-8457?focusedWorklogId=332274&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-332274
]
ASF GitHub Bot logged work on BEAM-8457:
----------------------------------------
Author: ASF GitHub Bot
Created on: 22/Oct/19 22:58
Start Date: 22/Oct/19 22:58
Worklog Time Spent: 10m
Work Description: KevinGG commented on pull request #9854: [BEAM-8457]
Label Dataflow jobs from Notebook
URL: https://github.com/apache/beam/pull/9854#discussion_r337785938
##########
File path: sdks/python/apache_beam/pipeline.py
##########
@@ -396,28 +396,40 @@ def replace_all(self, replacements):
for override in replacements:
self._check_replacement(override)
- def run(self, test_runner_api=True):
- """Runs the pipeline. Returns whatever our runner returns after running."""
+ def run(self, test_runner_api=True, runner=None, options=None):
+ """Runs the pipeline. Returns whatever our runner returns after running.
+
+ If another runner instance and options are provided, that runner will
+ execute the pipeline with the given options. If either of them is not set,
+ the default runner will run the pipeline with the original options
+ assigned to the pipeline. The usage is similar to directly invoking
+ `runner.run_pipeline(pipeline, options)`.
+ """
+ runner_in_use = self.runner
+ options_in_use = self._options
+ if runner and options:
Review comment:
You're right! This will surprise the user. I've changed it to throw error if
either is not provided instead of ignoring the input by default.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 332274)
Time Spent: 50m (was: 40m)
> Instrument Dataflow jobs that are launched from Notebooks
> ---------------------------------------------------------
>
> Key: BEAM-8457
> URL: https://issues.apache.org/jira/browse/BEAM-8457
> Project: Beam
> Issue Type: Improvement
> Components: runner-py-interactive
> Reporter: Ning Kang
> Assignee: Ning Kang
> Priority: Major
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Dataflow needs the capability to tell how many Dataflow jobs are launched
> from the Notebook environment, i.e., the Interactive Runner.
> # Change the pipeline.run() API to allow supply a runner and an option
> parameter so that a pipeline initially bundled w/ an interactive runner can
> be directly run by other runners from notebook.
> # Implicitly add the necessary source information through user labels when
> the user does p.run(runner=DataflowRunner()).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)