You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by pa...@apache.org on 2020/07/07 01:51:20 UTC

[beam] branch master updated: Pass the pipeline's options when visualizing the pipeline graph.

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

pabloem 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 e918fa5  Pass the pipeline's options when visualizing the pipeline graph.
     new c7b0450  Merge pull request #12181 from KevinGG/fix_graph
e918fa5 is described below

commit e918fa551a5219b915a261a62128fdb3885875b0
Author: Ning Kang <ni...@google.com>
AuthorDate: Mon Jul 6 13:21:25 2020 -0700

    Pass the pipeline's options when visualizing the pipeline graph.
    
    Change-Id: Ia7fb2ae970bad54119ebe4da0c9e7de40305bee8
---
 .../runners/interactive/display/pipeline_graph.py         | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/sdks/python/apache_beam/runners/interactive/display/pipeline_graph.py b/sdks/python/apache_beam/runners/interactive/display/pipeline_graph.py
index d061845..e7e0161 100644
--- a/sdks/python/apache_beam/runners/interactive/display/pipeline_graph.py
+++ b/sdks/python/apache_beam/runners/interactive/display/pipeline_graph.py
@@ -50,12 +50,12 @@ from apache_beam.runners.interactive.display import pipeline_graph_renderer
 
 class PipelineGraph(object):
   """Creates a DOT representing the pipeline. Thread-safe. Runner agnostic."""
-
-  def __init__(self,
-               pipeline,  # type: Union[beam_runner_api_pb2.Pipeline, beam.Pipeline]
-               default_vertex_attrs={'shape': 'box'},
-               default_edge_attrs=None,
-               render_option=None):
+  def __init__(
+      self,
+      pipeline,  # type: Union[beam_runner_api_pb2.Pipeline, beam.Pipeline]
+      default_vertex_attrs={'shape': 'box'},
+      default_edge_attrs=None,
+      render_option=None):
     """Constructor of PipelineGraph.
 
     Examples:
@@ -78,7 +78,8 @@ class PipelineGraph(object):
     self._graph = None  # type: pydot.Dot
     self._pipeline_instrument = None
     if isinstance(pipeline, beam.Pipeline):
-      self._pipeline_instrument = inst.PipelineInstrument(pipeline)
+      self._pipeline_instrument = inst.PipelineInstrument(
+          pipeline, pipeline._options)
       # The pre-process links user pipeline to runner pipeline through analysis
       # but without mutating runner pipeline.
       self._pipeline_instrument.preprocess()