New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
streamNodeProperty() doesn't work with gds.run_cypher() as I guess #179
Comments
Hello @MOSSupport , To clarify, are you trying to only return the rows with a |
Hi, Thanks. |
For further help, we need the GDS and Neo4j version you were running the queries against. When I tried it in my test environment, I could get the expected result. |
Neo4j 4.4.8 Enterprise image(Debian 11, openjdk 11.0.15) from docker hub, I'm running it on RHEL 7.9 machine. |
Hello, The query I used based on your description was |
I tried the code you typed above. But still the same "KeyError" returned as I explained above. |
Looks like I misunderstood you, I though you made it work afterwards (written at the end of your first description). Can you share the exact (anonymized) browser query and python client equivalent? If you are using a limit, you might also want to use an |
The original query is the code in my first post. Its error message was like this(Beware typo since I am typing it): Yes, there is no 'graph_name' in my code. But it appeared in its error message above. |
So I changed the first code according to the error messages like the 2nd code. It is processed without the error above. And its result is returned by label(3rd parameter) but their nodeId values are not the same ones with the node ids of the original nodes of the graph(stored on the storage). |
Ah, you are using GDS enterprise with Arrow enabled that explains the difference! I see the error now as well and will update you once we fixed the issue! As a temporary workaround I can only think of not using |
But I have to develop this process as python application now. How can I get the actual node properties like 'name' strings? As I told above, the node ids are not correct from gds.graph.streamProperty in python code. I cannot retrieve the correct properties since the ids are not correctly returned. |
I would suggest to use pandas to transform the result for now. As mentioned above, for now you need to use a workaround.
Hope this helps you as a temporary solution. |
You see my 4th posting. I already tried like that but I got the strange nodeIds. I cannot find the actual nodes in the original graph by matching with those nodeId retuned. They looks not the correct ids, so now I cannot use them in the development. |
Ok, unfortunately there is another bug on the server side. The only workaround, right now is to disable |
Another idea is to build this library using the version on #186. |
It didn't work even after arrow disabled for my test. Currently I use bolt driver to bring the result of the cypher of streamNodeProperty in my python code. Other functions are developed with the python client since they are working except streamNodeProperty. |
Sad to hear the workaround does not work for you. Without Arrow I could not get a test to fail. Did you make sure to restart the server after disabling arrow? |
Ah, the arrow must not be disabled at that time. Now I got the correct ids after I verified the arrow is disabled by dbms.listConfig. |
But it takes too long time for a big data: It took 117 secs with 2M News nodes. It's not practical to use in the development without arrow. |
With arrow disabled you can use your original query and only return the first 10 elements in the cypher query through For the fix using arrow, you need to wait until we release |
Yes, run_cypher works with no keyError after arrow disabled. The slice of 10 records is just to check the code. My purpose is to get all the vectors and then calculated them with numpy or scikit to find the most similar nodes. I tried Filtered KNN(alpha) but terminated in the middle of running since it took so long time with the big data. So I have to wait the next release. |
Thats helpful feedback. |
It's a quick PoC project to demonstrate Neo4j and GDSL capabilities. It has no specific requirement to meet. |
Thanks for the details. I would like to understand a bit more about your filtering. |
Yes, it's the core issue of the demo. Customer explained what kind of news they want to find in a set of hundreds words. They can be a source nodes. GDSL has several algos with source node or nodes in their parameter like bfs. But their approaches are almost to find News having the words or entities. They are not so different with the result of the exact matching search. |
Thanks for the detailed response. We will consider your feedback in our future planning! As a side comment, FastRP is also an algorithm where you need to tune the @MOSSupport |
@MOSSupport we also released a new client version now, so with updating your versions, it should work now. |
graphdatascience 1.3
I tried a query like this:
=> KeyError: 'graph_name'
I figured out to make it work like this:
=> No error, but it returned all rows(not limited to 100) as nodeId and propertyValue(not renamed as id and degree)
Other cypher queries works with gds.run_cypher(query) as expected.
The text was updated successfully, but these errors were encountered: