Skip to content

Commit 143143d

Browse files
author
Yi-Ting Lee
committed
doc: install pyvis before using visualize()
1 parent 2950b9f commit 143143d

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/sagemaker/lineage/query.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ def __init__(self, graph_styles):
234234
235235
Args:
236236
graph_styles: A dictionary that contains graph style for node and edges by their type.
237-
Example: Display the nodes with different color by their lineage entity / different shape by start arn.
237+
Example: Display the nodes with different color by their lineage entity / different
238+
shape by start arn.
238239
lineage_graph = {
239240
"TrialComponent": {
240241
"name": "Trial Component",
@@ -312,10 +313,11 @@ def render(self, elements, path="pyvisExample.html"):
312313
Args:
313314
elements: A dictionary that contains the node and the edges of the graph.
314315
Example:
315-
elements["nodes"] contains a list of tuples, each tuple represents a node in the format
316-
(node arn, node lineage source, node lineage entity, node is start arn)
317-
elements["edges"] contains a list of tuples, each tuple represents an edge in the format
318-
(edge source arn, edge destination arn, edge association type)
316+
elements["nodes"] contains list of tuples, each tuple represents a node
317+
format: (node arn, node lineage source, node lineage entity,
318+
node is start arn)
319+
elements["edges"] contains list of tuples, each tuple represents an edge
320+
format: (edge source arn, edge destination arn, edge association type)
319321
320322
path(optional): The path/filemname of the rendered graph html file. (default path: "pyvisExample.html")
321323
@@ -425,8 +427,10 @@ def _get_visualization_elements(self):
425427
def visualize(self, path="pyvisExample.html"):
426428
"""Visualize lineage query result.
427429
428-
Creates a PyvisVisualizer object to render network graph with Pyvis library. The elements(nodes & edges) are
429-
preprocessed in this method and sent to PyvisVisualizer for rendering graph.
430+
Creates a PyvisVisualizer object to render network graph with Pyvis library.
431+
Pyvis library should be installed before using this method (run "pip install pyvis")
432+
The elements(nodes & edges) are preprocessed in this method and sent to
433+
PyvisVisualizer for rendering graph.
430434
431435
Args:
432436
path(optional): The path/filemname of the rendered graph html file. (default path: "pyvisExample.html")

0 commit comments

Comments
 (0)