Skip to content

Commit

Permalink
[GAE/tests] Add GAE tests for FLASH algorithms of bfs and cc (#2869)
Browse files Browse the repository at this point in the history
Committed-by: longbinlai from Dev container

Fix issue #2824

---------

Co-authored-by: lixueclaire <youli.lx@alibaba-inc.com>
  • Loading branch information
longbinlai and lixueclaire committed Jun 13, 2023
1 parent 5a63faf commit ce3e16b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/interactive_engine/deployment.md
Expand Up @@ -77,7 +77,7 @@ deployment and management of applications. To deploy GIE standalone using Helm,
You should see the GIE Frontend service endpoint as `<ip>:<gremlinPort>`.

- 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
Expand Down
2 changes: 1 addition & 1 deletion docs/interactive_engine/dev_and_test.md
Expand Up @@ -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`:
```
Expand Down
24 changes: 24 additions & 0 deletions python/graphscope/tests/unittest/test_flash.py
Expand Up @@ -48,3 +48,27 @@ 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=65)
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", "cc": "r"}).sort_values(
by=["id"]
)
print(df)

0 comments on commit ce3e16b

Please sign in to comment.