cancel
Showing results for 
Search instead for 
Did you mean: 

GDS Pipeline and mutate properties

Estelle
Ninja
Ninja

Hi!

I am working with GDS pipelines and wanted to introspect the content of the projected graph with the streamNodeProperties function but it is currently failing to find the property in the projected graph.

Here is my code (using the Python client):

 

pipe, _ =  gds.beta.pipeline.nodeClassification.create("pipe001")
pipe.addNodeProperty("pageRank", mutateProperty="pr")
pipe.selectFeatures(["pr"])

pipe.addRandomForest()

pgraph, _ = gds.graph.project(
    "pgraph",
    "Node",
    {"REL": {"orientation": "UNDIRECTED"}},
    nodeProperties=["target"]
)

model, _ = pipe.train(
    pgraph,
    modelName="modelRF",
    targetProperty="target",
    metrics=["ACCURACY"],
)

 

So far so good. My problem is now if I try to check the content of the louvain feature in the projected graph:

 

gds.graph.streamNodeProperties(pgraph, node_properties=["pr"])

 

It raises:

 

ClientError: Failed to invoke procedure `gds.graph.streamNodeProperties`: Caused by: java.lang.IllegalArgumentException: Expecting at least one node projection to contain property key(s) ['pr'].

 

I have also tried to run this code:

 

g, _ = gds.graph.project("testGraph", "Node", "LINK")
gds.pageRank.mutate(g, mutateProperty="pr")
gds.graph.streamNodeProperties(g, node_properties=["pr"])

 

which works as expected (returns a dataframe with louvain properties).

What am I doing wrong / did I misunderstood with the pipeline?

Any hint would be much appreciated 🙂

1 ACCEPTED SOLUTION

Hello @Estelle,
I see this post a bit late, but maybe it will still help you now.
The node property steps in the pipeline are only mutating the graphstore while the pipeline is running.
At the end of the pipeline we automatically cleanup the intermediate properties to allow running the same pipeline multiple times (maybe with some configuration changes).

You are not the first with this question, so its on our backlog to allow inspecting the features created inside a pipeline.
Currently, you can run the algorithms on their own (in mutate mode) and inspect the individual results manually.

View solution in original post

2 REPLIES 2

Hello @Estelle,
I see this post a bit late, but maybe it will still help you now.
The node property steps in the pipeline are only mutating the graphstore while the pipeline is running.
At the end of the pipeline we automatically cleanup the intermediate properties to allow running the same pipeline multiple times (maybe with some configuration changes).

You are not the first with this question, so its on our backlog to allow inspecting the features created inside a pipeline.
Currently, you can run the algorithms on their own (in mutate mode) and inspect the individual results manually.

Hey Florentin,

Thank you very much for the clarification, I still had not understood this so far, so your answer is definitely helpful!