Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from apache_beam.runners.direct import direct_runner
from apache_beam.runners.interactive import cache_manager as cache
from apache_beam.runners.interactive.messaging.interactive_environment_inspector import InteractiveEnvironmentInspector
from apache_beam.runners.interactive.recording_manager import RecordingManager
from apache_beam.runners.interactive.sql.sql_chain import SqlChain
from apache_beam.runners.interactive.user_pipeline_tracker import UserPipelineTracker
from apache_beam.runners.interactive.utils import assert_bucket_exists
Expand Down Expand Up @@ -428,6 +427,10 @@ def set_recording_manager(self, recording_manager, pipeline):

def get_recording_manager(self, pipeline, create_if_absent=False):
"""Gets the recording manager for the given pipeline."""
# Allow initial module loading to be complete and not have a circular
# import.
from apache_beam.runners.interactive.recording_manager import RecordingManager

recording_manager = self._recording_managers.get(str(id(pipeline)), None)
if not recording_manager and create_if_absent:
# Get the pipeline variable name for the user. This is useful if the user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
from apache_beam.runners.interactive import pipeline_fragment as pf
from apache_beam.runners.interactive import utils
from apache_beam.runners.interactive.caching.cacheable import CacheKey
from apache_beam.runners.interactive.display.pipeline_graph import PipelineGraph
from apache_beam.runners.interactive.options import capture_control
from apache_beam.runners.runner import PipelineState

Expand Down Expand Up @@ -712,10 +713,6 @@ def _get_pipeline_graph(self):
"""Lazily initializes and returns the PipelineGraph."""
if self._pipeline_graph is None:
try:
# Allow initial module loading to be complete and not have a circular
# import.
from apache_beam.runners.interactive.display.pipeline_graph import PipelineGraph

# Try to create the graph.
self._pipeline_graph = PipelineGraph(self.user_pipeline)
except (ImportError, NameError, AttributeError):
Expand Down
Loading