Closed tonymhl closed 1 year ago
Hi @tonymhl - can you tell us more about the environment you are running the notebook in? The first issue appears to be that pyTigerGraph cannot access the Louvain query on our github repo. Does the machine you are running it on have internet access?
The TG cloud issue is due to the way you should specify usernames and passwords. It is not your login info, rather, you need to set up users in the access management screen you took a screenshot of.
Hope this helps!
Hi @parkererickson - The environment I am running the notebook is Python3.8. The machine we are running it on does have the internet access. Curretly, we have almost resolved issue of connecting tgcloud, by adding SSL certificate on local server, which missing will stop the server connecting to tgcloud. We are getting assistance from CUSTOMER SUPPORT#46248, where provided below script to connect tgcloud solution:
import pyTigerGraph as tg
hostName = "https://mydb.i.tgcloud.io" graphName = "Cora" secret = "token" userName = "tigergraph" password = ""
conn = tg.TigerGraphConnection(host=hostName, graphname=graphName)
authToken = conn.getToken(secret) authToken = authToken[0] print(f"SHHHH.... Keep this a secret. Here's your token:\n {authToken}")
conn = tg.TigerGraphConnection(host=hostName, graphname=graphName, username="GSQLsecret", password="token", apiToken=authToken) print("hello")
ls_results = conn.gsql("LS") print("ls result", ls_results)
results = conn.getSchema() print(results)
or I am simply doing:
We notice that when we run the notebook on Google Cloab, the runAlgorithm function will run successfully. However, if we do it on our local Linux server installed with TigerGraph Community edition, the runAlgorithm function might report ConnectionError. We can successfully have our local Linux server installed with TigerGraph Community edition, and have our python notebook connected to it, as the picture shows: It can successfully show all the available algorithms, e.g. Louvain query, on TG github repo, as shown below:
However, whenever we try to run any specific algorithm, for example, tg_louvain, we get ConnectionError:
We tried to install the algorithm manually in advance, we see that installAlgorithm part gets pass, however the runAlgorithm part still gets ConnectionError: Kinda wondering why running installed query still requires connection to TG github repo? (*If running installed query no longer requires connection to TG github repo, this issue will get resolved.)
We have figured out that it is an issue with the VPN for Internet access on our machine that caused the ConnectionError, since switching VPN could resolve the issue.
In conclude, We are trying to implement this project which is available on GitHub: https://github.com/KstecGit2021/TG-mlworkbench-docs-kr/tree/main/tutorials/basics The main issue is about this Feature Engineering part, which involves doing TG Algorithms: https://github.com/KstecGit2021/TG-mlworkbench-docs-kr/blob/main/tutorials/basics/2_feature_engineering.ipynb In brief, our final goal is that we make this workflow run successfully, either through local TigerGraph Community version or through tgcloud . For tgcloud, we see that Google Cloab managed to run the workflow successfully, however, since Colab is a google service, we cannot move on to our next stage of software engineering which involves packaging our workflow into a program. We need to have a successful and stable workflow on our local python script, either through local TigerGraph Community version or tgcloud.
Thank you.
We are using pyTigerGraph to do tg_louvain alogorithm on our graph database. We tried to do this in two ways.
However, when trying to use installAlgorithm or runAlgorithm functions, we meet a connection error as shown below:
It would be much appreciated If this problem can be solved.