Skip to content

Commit

Permalink
chore: polish result verification for udf call demo
Browse files Browse the repository at this point in the history
  • Loading branch information
wey-gu committed Mar 20, 2023
1 parent 540d3cc commit 7e11f93
Showing 1 changed file with 6 additions and 88 deletions.
94 changes: 6 additions & 88 deletions examples/ng_ai_from_ngql_udf.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,93 +75,7 @@
"execution_count": null,
"id": "a62330fa",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" * Serving Flask app 'ng_ai.ng_ai_api.app'\n",
" * Debug mode: off\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[31m\u001b[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.\u001b[0m\n",
" * Running on all addresses (0.0.0.0)\n",
" * Running on http://127.0.0.1:9999\n",
" * Running on http://172.23.0.27:9999\n",
"\u001b[33mPress CTRL+C to quit\u001b[0m\n",
" \r"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"+---------+\n",
"| id|\n",
"+---------+\n",
"|player108|\n",
"|player129|\n",
"|player120|\n",
"|player103|\n",
"|player128|\n",
"|player148|\n",
"|player117|\n",
"|player139|\n",
"|player140|\n",
"|player134|\n",
"|player149|\n",
"|player150|\n",
"|player125|\n",
"|player137|\n",
"|player143|\n",
"|player101|\n",
"|player141|\n",
"|player144|\n",
"|player102|\n",
"|player121|\n",
"+---------+\n",
"only showing top 20 rows\n",
"\n",
"+-----+------+-----------+----------+\n",
"|_rank|degree| _srcId| _dstId|\n",
"+-----+------+-----------+----------+\n",
"| 0| 90|34359738371| 3|\n",
"| 0| 90|25769803786| 6|\n",
"| 0| 90|34359738369| 6|\n",
"| 0| 80| 8589934596| 2|\n",
"| 0| 99|25769803784| 2|\n",
"| 0| 90|25769803777| 2|\n",
"| 0| 90| 1| 4|\n",
"| 0| 90|17179869189| 4|\n",
"| 0| 90| 4| 1|\n",
"| 0| 10| 8589934598| 1|\n",
"| 0| 90|17179869189| 1|\n",
"| 0| 80| 8589934598| 5|\n",
"| 0| 85|25769803786| 5|\n",
"| 0| 70|34359738373| 5|\n",
"| 0| 95|17179869185|8589934597|\n",
"| 0| 95|25769803778|8589934597|\n",
"| 0| 99|25769803784|8589934597|\n",
"| 0| 90|34359738368|8589934597|\n",
"| 0| 85| 5|8589934598|\n",
"| 0| 90| 8589934596|8589934598|\n",
"+-----+------+-----------+----------+\n",
"only showing top 20 rows\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"172.23.0.29 - - [20/Mar/2023 07:11:01] \"POST /api/v0/spark/pagerank HTTP/1.1\" 200 -\n"
]
}
],
"outputs": [],
"source": [
"from ng_ai import ng_ai_api_app as app\n",
"\n",
Expand All @@ -181,14 +95,18 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "a8c0577b",
"metadata": {},
"source": [
"## Verify the results\n",
"\n",
"```cypher\n",
"MATCH (n:pagerank) RETURN n LIMIT 100\n",
"MATCH (n:pagerank)\n",
" WITH n.pagerank.pagerank AS pr, n.player.name AS n\n",
" LIMIT 100\n",
"RETURN pr, n ORDER BY pr DESC\n",
"```"
]
},
Expand Down

0 comments on commit 7e11f93

Please sign in to comment.