Conversation
mohammad-ashraf-187
commented
Mar 25, 2026
- Created baseline setup for pagerank algorithm.
- Enhanced README file for pagerank.
- Imported baseline code for betweeness centrality (pulled gds-corrections).
- Fixed some minor bugs and stability issues.
|
|
||
| if __name__ == "__main__": | ||
| degree_cent_baseline.run() | ||
| fast_rp_baseline.run() |
There was a problem hiding this comment.
question: will we cover the pagerank_baseline here as well? I saw that it was imported but the pagerank_baseline.run() command weren't being called yet.
There was a problem hiding this comment.
we will be covering all the baseline including pagerank...
| python3 test/baseline/create_baselines.py && | ||
| pytest test/test_centrality.py #test/test_ml.py | ||
| # python3 test/setup.py && | ||
| python3 test/baseline/create_baselines.py #&& |
There was a problem hiding this comment.
question: is it the intention here to combine all testing runs into the create_baselines.py file?
There was a problem hiding this comment.
create_baseline.py file is for creating the baseline setup for all algorithm,currently we have only for degree cnetrality and fastrp.
to run test we have pytest test/test_centrality.py this will test the centrality algorithms based on the baseline created in create_baseline.py file. similarly we will be running pytest for test_classification,test_community,test_path_finding and etc.
There was a problem hiding this comment.
Got it - in that case should we uncomment at least the pytest test/test_centrality.py so that the test would be able to be run?
| python-dotenv==1.0.1 | ||
| pyTigerGraph==1.5.2 | ||
| pyTigerGraph[gds]==1.8.0 | ||
| pyTigerGraph==1.5.2 # use updated version when available on PyPI inorder to fix any issues |
There was a problem hiding this comment.
can we use a newer version of pyTigerGraph here? Might want to coordinate this somewhat with @chengbiao-jin - I saw that as of 2 April, pyTigerGraph is currently at release 2.0.1
| kiwisolver==1.4.5 | ||
| MarkupSafe==2.1.5 | ||
| matplotlib==3.9.0 | ||
| matplotlib==3.10.8 |
There was a problem hiding this comment.
thanks for upgrading these to latest versions! 🙏
Maybe we should consider updating some other libraries too (unless some libraries require a specific version that's older)?
| @@ -1,5 +1,5 @@ | |||
| # Use an official Python runtime as a parent image | |||
| FROM python:3.9-slim | |||
| FROM python:3.11-slim | |||
There was a problem hiding this comment.
suggestion: Let's perhaps use python 3.14 here since python 11 will reach end-of-life in 2027?
There was a problem hiding this comment.
that is good idea, we need to stick to one python version so that it would help in development and also in production environmnet.
There was a problem hiding this comment.
Question - where is this result being obtained from? Is this result from running networkx betweenness centrality, implementation of TG betweenness centrality logic in python, or is it TG betweenness centrality in GSQL?
There was a problem hiding this comment.
these are the baseline result for betweenness algorithm usually from the networkx not from TG, while running the pytest we will be comparing the result of tg result with this baseline result.
There was a problem hiding this comment.
Question - is this file created so that it'll pass the test as seen here?
If we aren't working on fastrp testing at the moment, I think it might be good to skip the fastrp test for now (maybe with some pytest skip and some comments.
There was a problem hiding this comment.
Thanks for the README here for PageRank algorithm! 🙏
I did notice that some information here have overlaps with the documentation page:
https://docs.tigergraph.com/graph-ml/3.10/centrality-algorithms/pagerank
So, I was wondering what's the best option we should do in this case to avoid confusion:
- e.g. have information on both the documentation page and this README page
- only have the main documentation on the docs page ( https://docs.tigergraph.com/graph-ml/3.10/centrality-algorithms/pagerank ), while leaving README.md for this one empty
Note: I'm fine with having readme file in here for now - but considering that the work might have to be done for all the queries here, I feel like we might want to have coordination with documentation team (or who is in charge of the documentation page around Graph Algorithms) as well around this to see what's the best place to put information about the algorithms into.
| | Official PageRank Documentation | [docs.tigergraph.com](https://docs.tigergraph.com/graph-ml/current/centrality-algorithms/pagerank) | | ||
| | Algorithm Changelog | [CHANGELOG.md](https://github.com/tigergraph/gsql-graph-algorithms/blob/master/algorithms/Centrality/pagerank/CHANGELOG.md) | | ||
| | Full GDS Algorithm Library | [gsql-graph-algorithms](https://github.com/tigergraph/gsql-graph-algorithms) | ||
| | Community Forum | [community.tigergraph.com](https://community.tigergraph.com) | |
There was a problem hiding this comment.
while this URL still works (since it does the re-direct to the other one), the current dev forum, as far as I know, is at this website here: https://dev.tigergraph.com/forum/
There was a problem hiding this comment.
thanks for providing updated link.
| ### Option 1 — Via TigerGraph CLI | ||
|
|
||
| ```bash | ||
| $ tg box algos install <Pagerank Algorithm> | ||
| $ tg box algos install <Algorithm> | ||
| ``` | ||
|
|
||
| #### Via GSQL terminal | ||
| **Example:** | ||
|
|
||
| ```bash | ||
| $ tg box algos install tg_pagerank | ||
| ``` |
There was a problem hiding this comment.
Hmmm the current tg box command doesn't work, so I was thinking that e should remove this option for installing the algorithms
CC @JonHerke-TG - what do you think? I think it might have worked for an older version of TG, but I never tried using tg box currently.
There was a problem hiding this comment.
tg box command is available in Tigergraph Dev lab github repo.
There was a problem hiding this comment.
Hmmm I just feel like the tg box one required some "more setup" than other methods and my concern was it wasn't that updated: https://github.com/TigerGraph-DevLabs/TigerGraph-CLI
It also wasn't that much simpler than the other ways of loading the algorithms too, which was why I'm fine with opting out of the tg box command.