From fecb328ba9585ab0d1c8f0079eacd1777e2c3055 Mon Sep 17 00:00:00 2001 From: longbinlai Date: Tue, 13 Jun 2023 03:39:18 +0000 Subject: [PATCH 1/5] add flash test Committed-by: longbinlai from Dev container --- docs/interactive_engine/deployment.md | 2 +- docs/interactive_engine/dev_and_test.md | 2 +- .../graphscope/tests/unittest/test_flash.py | 20 +++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/docs/interactive_engine/deployment.md b/docs/interactive_engine/deployment.md index 75c720f4a13d..cde2452a519f 100644 --- a/docs/interactive_engine/deployment.md +++ b/docs/interactive_engine/deployment.md @@ -77,7 +77,7 @@ deployment and management of applications. To deploy GIE standalone using Helm, You should see the GIE Frontend service endpoint as `:`. - Connect to the GIE frontend service using the Tinkerpop's official SDKs or Gremlin console, which -can be found [here](./tinkerpop_eco.md). +can be found [here](./tinkerpop_gremlin.md). ## Remove the GIE Service ```bash diff --git a/docs/interactive_engine/dev_and_test.md b/docs/interactive_engine/dev_and_test.md index 592aa5044795..d94ed78ac288 100644 --- a/docs/interactive_engine/dev_and_test.md +++ b/docs/interactive_engine/dev_and_test.md @@ -131,7 +131,7 @@ java -cp ".:$GIE_TEST_HOME/lib/*" -Djna.library.path=$GIE_TEST_HOME/lib com.alib ``` With the frontend service, you can open the gremlin console and set the endpoint to -`localhost:8182`, as given [here](./deployment.md#deploy-your-first-gie-service). +`localhost:8182`, as given [here](./tinkerpop_gremlin.md#gremlin-console). 7. Kill the services of `vineyardd`, `gaia_executor` and `frontend`: ``` diff --git a/python/graphscope/tests/unittest/test_flash.py b/python/graphscope/tests/unittest/test_flash.py index fa7e9efef025..1c695d0b9c21 100644 --- a/python/graphscope/tests/unittest/test_flash.py +++ b/python/graphscope/tests/unittest/test_flash.py @@ -48,3 +48,23 @@ def test_flash_triangle_counting_on_projected_graph(arrow_property_graph_directe vertices={v: []}, edges={e: ["weight"]} ) ctx = flash.triangle_counting(g) + +def test_flash_bfs_on_projected_graph(ldbc_graph): + g = ldbc_graph.project( + vertices={"person": []}, + edges={"knows": []}, + ) + bfs_context = flash.bfs(g, source = 1) + df = bfs_context.to_dataframe(selector={"id": "v.id", "dist": "r"}) \ + .sort_values(by=['id']) + print(df) + +def test_flash_cc_on_projected_graph(ldbc_graph): + g = ldbc_graph.project( + vertices={"person": []}, + edges={"knows": []}, + ) + cc_context = flash.cc(g) + df = cc_context.to_dataframe(selector={"id": "v.id", "dist": "r"}) \ + .sort_values(by=['id']) + print(df) From ab29c090d86377ffc9ee107e940ef045f3ad68f6 Mon Sep 17 00:00:00 2001 From: longbinlai Date: Tue, 13 Jun 2023 04:09:49 +0000 Subject: [PATCH 2/5] minor fix Committed-by: longbinlai from Dev container --- python/graphscope/tests/unittest/test_flash.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/graphscope/tests/unittest/test_flash.py b/python/graphscope/tests/unittest/test_flash.py index 1c695d0b9c21..5b8ba0a2e5c0 100644 --- a/python/graphscope/tests/unittest/test_flash.py +++ b/python/graphscope/tests/unittest/test_flash.py @@ -54,7 +54,7 @@ def test_flash_bfs_on_projected_graph(ldbc_graph): vertices={"person": []}, edges={"knows": []}, ) - bfs_context = flash.bfs(g, source = 1) + bfs_context = flash.bfs(g, source=65) df = bfs_context.to_dataframe(selector={"id": "v.id", "dist": "r"}) \ .sort_values(by=['id']) print(df) @@ -65,6 +65,6 @@ def test_flash_cc_on_projected_graph(ldbc_graph): edges={"knows": []}, ) cc_context = flash.cc(g) - df = cc_context.to_dataframe(selector={"id": "v.id", "dist": "r"}) \ + df = cc_context.to_dataframe(selector={"id": "v.id", "cc": "r"}) \ .sort_values(by=['id']) print(df) From 84057138e4cbd47b95ce761675801a9a34b46a87 Mon Sep 17 00:00:00 2001 From: longbinlai Date: Tue, 13 Jun 2023 06:34:09 +0000 Subject: [PATCH 3/5] python code format Committed-by: longbinlai from Dev container --- python/graphscope/tests/unittest/test_flash.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python/graphscope/tests/unittest/test_flash.py b/python/graphscope/tests/unittest/test_flash.py index 5b8ba0a2e5c0..62234ab383e9 100644 --- a/python/graphscope/tests/unittest/test_flash.py +++ b/python/graphscope/tests/unittest/test_flash.py @@ -55,8 +55,9 @@ def test_flash_bfs_on_projected_graph(ldbc_graph): edges={"knows": []}, ) bfs_context = flash.bfs(g, source=65) - df = bfs_context.to_dataframe(selector={"id": "v.id", "dist": "r"}) \ - .sort_values(by=['id']) + df = bfs_context.to_dataframe(selector={"id": "v.id", "dist": "r"}).sort_values( + by=['id'] + ) print(df) def test_flash_cc_on_projected_graph(ldbc_graph): @@ -65,6 +66,7 @@ def test_flash_cc_on_projected_graph(ldbc_graph): edges={"knows": []}, ) cc_context = flash.cc(g) - df = cc_context.to_dataframe(selector={"id": "v.id", "cc": "r"}) \ - .sort_values(by=['id']) + df = cc_context.to_dataframe(selector={"id": "v.id", "cc": "r"}).sort_values( + by=['id'] + ) print(df) From cab41f6b97c368e74953b849d72537e521d8995d Mon Sep 17 00:00:00 2001 From: longbinlai Date: Tue, 13 Jun 2023 06:44:00 +0000 Subject: [PATCH 4/5] fix format Committed-by: longbinlai from Dev container --- python/graphscope/tests/unittest/test_flash.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/graphscope/tests/unittest/test_flash.py b/python/graphscope/tests/unittest/test_flash.py index 62234ab383e9..053e910c5bd2 100644 --- a/python/graphscope/tests/unittest/test_flash.py +++ b/python/graphscope/tests/unittest/test_flash.py @@ -56,7 +56,7 @@ def test_flash_bfs_on_projected_graph(ldbc_graph): ) bfs_context = flash.bfs(g, source=65) df = bfs_context.to_dataframe(selector={"id": "v.id", "dist": "r"}).sort_values( - by=['id'] + by=["id"] ) print(df) @@ -67,6 +67,6 @@ def test_flash_cc_on_projected_graph(ldbc_graph): ) cc_context = flash.cc(g) df = cc_context.to_dataframe(selector={"id": "v.id", "cc": "r"}).sort_values( - by=['id'] + by=["id"] ) print(df) From 6640fc1c83abe0492eb0eb73d777266f15741356 Mon Sep 17 00:00:00 2001 From: longbinlai Date: Tue, 13 Jun 2023 06:46:03 +0000 Subject: [PATCH 5/5] fix format Committed-by: longbinlai from Dev container --- python/graphscope/tests/unittest/test_flash.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/graphscope/tests/unittest/test_flash.py b/python/graphscope/tests/unittest/test_flash.py index 053e910c5bd2..11fb6b229c59 100644 --- a/python/graphscope/tests/unittest/test_flash.py +++ b/python/graphscope/tests/unittest/test_flash.py @@ -49,6 +49,7 @@ def test_flash_triangle_counting_on_projected_graph(arrow_property_graph_directe ) ctx = flash.triangle_counting(g) + def test_flash_bfs_on_projected_graph(ldbc_graph): g = ldbc_graph.project( vertices={"person": []}, @@ -60,6 +61,7 @@ def test_flash_bfs_on_projected_graph(ldbc_graph): ) print(df) + def test_flash_cc_on_projected_graph(ldbc_graph): g = ldbc_graph.project( vertices={"person": []},