Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix visualization in notebook #1562

Merged
merged 2 commits into from
Dec 30, 2020
Merged
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
4 changes: 1 addition & 3 deletions jina/flow/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ def gather_inspect(self, name: str = 'gather_inspect', uses='_merge_eval', inclu
:meth:`inspect`

"""

needs = [k for k, v in self._pod_nodes.items() if v.role == PodRoleType.INSPECT]
if needs:
if include_last_pod:
Expand Down Expand Up @@ -329,7 +328,6 @@ def build(self, copy_flow: bool = False) -> FlowLike:
op_flow = copy.deepcopy(self) if copy_flow else self

_pod_edges = set()

if op_flow.args.inspect == FlowInspectType.COLLECT:
op_flow.gather_inspect(copy_flow=False)

Expand Down Expand Up @@ -621,7 +619,7 @@ def plot(self, output: str = None,

def _ipython_display_(self):
"""Displays the object in IPython as a side effect"""
self.plot(inline_display=True)
self.plot(inline_display=True, build=(self._build_level != FlowBuildLevel.GRAPH))

def _mermaid_to_url(self, mermaid_str, img_type) -> str:
"""
Expand Down