gnn icon indicating copy to clipboard operation
gnn copied to clipboard

AttributeError: 'GraphTensor' object has no attribute 'values'

Open yarri-oss opened this issue 3 years ago • 1 comments

It looks like this example file uses an older syntax for GraphTensor and might need to be updated:

Specifically this line contains the attribute 'values'

def transform_fn(gt: tfgnn.GraphTensor) -> tfgnn.GraphTensor:
  values = gt.values
  # Remove string fields.
  del values.context["seed_id"]

yarri-oss avatar Nov 05 '21 18:11 yarri-oss

Indeed the examples directory still has the old syntax, and is also partly missing.

We are finishing to update some parts of the library and graph sampler, and then we will work on examples. I'll leave the issue open for now.

janpfeifer avatar Nov 08 '21 10:11 janpfeifer

TF-GNN has a number of good Colab tutorials for a while now.

The reported file examples/citeseer/graph_tensor_example.py indeed is broken as @yarri-oss and @janpfeifer described, so I have deleted it with PR https://github.com/tensorflow/gnn/commit/ee912b2109e3df3849b831708799c29b0f936069.

arnoegw avatar Mar 27 '23 14:03 arnoegw