Giter Club home page Giter Club logo

gnn's Introduction

TensorFlow GNN

Summary

TensorFlow GNN is a library to build Graph Neural Networks on the TensorFlow platform. It provides...

This library is an OSS port of a Google-internal library used in a broad variety of contexts, on homogeneous and heterogeneous graphs, and in conjunction with other scalable graph mining tools.

For background, please see our blog post and the TF-GNN paper (full citation below).

Quickstart

Google Colab lets you run TF-GNN demos from your browser, no installation required:

For all colabs and user guides, please see the Documentation overview page, which also links to the API docs.

Installation Instructions

The latest stable release of TensorFlow GNN is available from

pip install tensorflow-gnn

For installation from source, see our Developer Guide.

Key platform requirements:

  • TensorFlow 2.12 or higher, and any GPU drivers it needs [instructions].
  • Keras v2, as traditionally included with TensorFlow 2.x. TF-GNN does not work with the new multi-backend Keras v3.
    Users of TF2.16+ must also pip install tf-keras and set TF_USE_LEGACY_KERAS=1, see our Keras version guide for details.
  • Apache Beam for distributed graph sampling.

TF-GNN is developed and tested on Linux. Running on other platforms supported by TensorFlow may be possible.

Citation

When referencing this library in a paper, please cite the TF-GNN paper:

@article{tfgnn,
  author  = {Oleksandr Ferludin and Arno Eigenwillig and Martin Blais and
             Dustin Zelle and Jan Pfeifer and Alvaro Sanchez{-}Gonzalez and
             Wai Lok Sibon Li and Sami Abu{-}El{-}Haija and Peter Battaglia and
             Neslihan Bulut and Jonathan Halcrow and
             Filipe Miguel Gon{\c{c}}alves de Almeida and Pedro Gonnet and
             Liangze Jiang and Parth Kothari and Silvio Lattanzi and 
             Andr{\'{e}} Linhares and Brandon Mayer and Vahab Mirrokni and
             John Palowitch and Mihir Paradkar and Jennifer She and
             Anton Tsitsulin and Kevin Villela and Lisa Wang and David Wong and
             Bryan Perozzi},
  title   = {{TF-GNN:} Graph Neural Networks in TensorFlow},
  journal = {CoRR},
  volume  = {abs/2207.03522},
  year    = {2023},
  url     = {http://arxiv.org/abs/2207.03522},
}

gnn's People

Contributors

aferludin avatar anandolee avatar arjung avatar arnoegw avatar baharefatemi avatar brandonmayer avatar brianwieder avatar dgoekmen avatar dzelle avatar fchollet avatar gasteigerjo avatar gonnet avatar janpfeifer avatar jerub avatar kanglant avatar liangzejiang avatar mihirparadkar avatar neslihans avatar nkovela1 avatar phanein avatar rachaelstamakloe avatar rchen152 avatar rickeylev avatar samihaija avatar sibonli avatar tensorflower-gardener avatar thedebugger811 avatar xgfs avatar yilei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gnn's Issues

setup.py' nor 'pyproject.toml' found at Installation step 5

Thanks for putting the detailed installation step.

I follow the installation step at the read me web page. I maneuver to reach at the last step, which is 5:

  1. Install tensorflow_gnn

    $> cd tensorflow_gnn && python3 -m pip install .

I face the error message:

    ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.

The tensorflow_gnn folder looks like not haing the setup.py file. Should I use the setpu.py file at the gnn folder, which is the parent folder of the tensorflow_gnn?

Runtime environment:
    OS: Windows 10
    Virtual environment: Anaconda
    Bazel: 5.0
    Tensowflow: 2.7
    Python: 3.8.12

Understanding of "sizes" for edges in the case of more components

Here, at this link https://github.com/tensorflow/gnn/blob/main/tensorflow_gnn/graph/graph_tensor.py#L749 I tried to understand that example

  # A scalar graph tensor with edges between authors, papers and their venues
  # (journals or conferences). Each venue belongs to one graph component. The
  # 1st venue (1980519) has 2 authors and 3 papers.
  # The 2nd venue (9756463) has 2 authors and 1 paper.
  # The paper 0 is written by authors 0 and 2; paper 1 - by authors 0 and 1;
  # paper 2 - by author 2; paper 3 - by author 3.
  venues = tfgnn.GraphTensor.from_pieces(
      context=tfgnn.Context.from_fields(
          features={'venue': [1980519, 9756463]}),
      node_sets={
          'author': tfgnn.NodeSet.from_fields(sizes=[2, 2], features={}),
          'paper': tfgnn.NodeSet.from_fields(
              sizes=[3, 1], features={'year': [2018, 2017, 2017, 2022]})},
      edge_sets={
          'is_writen': tfgnn.EdgeSet.from_fields(
              sizes=[4, 2],
              features={},
              adjacency=tfgnn.Adjacency.from_indices(
                  source=('paper', [0, 1, 1, 0, 2, 3]),
                  target=('author', [0, 0, 1, 2, 3, 3])))})

I just don't understand this [4,2] part and the relation with source and target parts...

Is it like 4 means 4 papers and 2 means 2 authors, or this 2 comes from number of components (journals or conferences)?

I definitely see there are 6 edges present (4+2), but how to understand this 4 and 2 in this context?

From the part "paper 2 - by author 2; paper 3 - by author 3", we can see that there is one small mistake in this example, and that is in target part, it should be [0, 0, 1, 2, 2, 3] instead of [0, 0, 1, 2, 3, 3] (or maybe it is the case that paper 2 - by author 3)?

Now, how can we understand from these which paper belongs to 1th and which one to 2nd venue?

Supported dtypes?

Hi,

I was wondering if there was somewhere a list of all the dtypes that TF-GNN currently supports.

Not long ago, I read a quite in-depth guide on your package where the author reported that only "int32", "float32" and "string" are supported. If that's the case, I was wondering why, and if there are any scheduled plans to support more dtypes in the future.

I think having more dtypes would be valuable not to waste precious resources. For example, in the sample task depicted in the guide, the author had to represent (boolean) friendship edges with "int32" wasting 31 poor bits

Problems for binary heterogeneous graph classification with gat_v2.GATv2MPNNGraphUpdate

Following the pipeline shown in input pipeline and modeling, building model for a binary classification for the heterogeneous directed graph, with gat_v2.GATv2MPNNGraphUpdate, raising errors.
The following is my gnn model:

def gnn(graph):
    for i in range(2):
        graph = gat_v2.GATv2MPNNGraphUpdate(units=5, message_dim=5, num_heads=1, receiver_tag=tfgnn.SOURCE)(graph)
    return graph

While the graph spec after preprocess model is like:

GraphTensorSpec({'context': ContextSpec({'features': {'hidden_state': TensorSpec(shape=(None, 2), dtype=tf.float32, name=None)}, 'sizes': TensorSpec(shape=(None,), dtype=tf.int32, name=None)}, TensorShape([]), tf.int32, None), 
'node_sets': 
{'operate': NodeSetSpec({'features': {'hidden_state': TensorSpec(shape=(None, 9), dtype=tf.float32, name=None)}, 'sizes': TensorSpec(shape=(None,), dtype=tf.int32, name=None)}, TensorShape([]), tf.int32, None), 
'source': NodeSetSpec({'features': {'hidden_state': TensorSpec(shape=(None, 1), dtype=tf.float32, name=None)}, 'sizes': TensorSpec(shape=(None,), dtype=tf.int32, name=None)}, TensorShape([]), tf.int32, None)}, 
'edge_sets': 
{'op2op': EdgeSetSpec({'features': {}, 'sizes': TensorSpec(shape=(None,), dtype=tf.int32, name=None), 'adjacency': AdjacencySpec({'#index.0': TensorSpec(shape=(None,), dtype=tf.int32, name=None), '#index.1': TensorSpec(shape=(None,), dtype=tf.int32, name=None)}, TensorShape([]), tf.int32, {'#index.0': 'operate', '#index.1': 'operate'})}, TensorShape([]), tf.int32, None), 
'src2op': EdgeSetSpec({'features': {}, 'sizes': TensorSpec(shape=(None,), dtype=tf.int32, name=None), 'adjacency': AdjacencySpec({'#index.0': TensorSpec(shape=(None,), dtype=tf.int32, name=None), '#index.1': TensorSpec(shape=(None,), dtype=tf.int32, name=None)}, TensorShape([]), tf.int32, {'#index.0': 'source', '#index.1': 'operate'})}, TensorShape([]), tf.int32, None)}}, TensorShape([]), tf.int32, None)

Where there are 2 node sets, operate and source, while there is always 1 'source' node in each graph,
The classification model wanting to pool features from all nodes (both node sets), which is defined as:

model_input_spec, _, = dataset.element_spec  
model_input = tf.keras.layers.Input(type_spec=model_input_spec)
graph = gnn(model_input) # apply gnn model
pooled_features_s = tfgnn.keras.layers.Pool(tfgnn.CONTEXT, "mean", node_set_name="source")(graph)
pooled_features_op = tfgnn.keras.layers.Pool(tfgnn.CONTEXT, "mean", node_set_name="operate")(graph)
pooled_features = tf.keras.layers.concatenate([pooled_features_s, pooled_features_op])
logits = tf.keras.layers.Dense(1)(pooled_features)
model = tf.keras.Model(model_input, logits)

But when training following error raises:

File "/.../lib/python3.8/site-packages/tensorflow_gnn/graph/graph_tensor_ops.py", line 106, in broadcast_node_to_edges
      return tf.gather(node_value, adjacency[node_tag])
Node: 'model_6/graph_update_6/node_set_update_1/gat_v2_conv/GatherV2_1'
indices[157] = 224 is not in [0, 224)
	 [[{{node model_6/graph_update_6/node_set_update_1/gat_v2_conv/GatherV2_1}}]] [Op:__inference_train_function_30804]

The error pattern always turns that indices[xx] = yy is not in [0, yy). Could anyone please have a look? Thanks.

Normal Installation Fails

I am trying to install tensorflow_gnn in my own environment on MacOS Monterey. My Python version is 3.9 and I have Bazel, tensorflow and graphviz installed. The errors are the following:

Building wheels for collected packages: tensorflow-gnn, pygraphviz
  Building wheel for tensorflow-gnn (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [63 lines of output]
      running bdist_wheel
      running build
      running bazel_build
      Loading:
      Loading: 0 packages loaded
      Loading: 0 packages loaded
      Loading: 0 packages loaded
      Loading: 0 packages loaded
      Loading: 0 packages loaded
      Loading: 0 packages loaded
      INFO: Repository org_tensorflow instantiated at:
        /Users/joseperezcano/Desktop/IDAO_2022/tensorflow_gnn/WORKSPACE:7:9: in <toplevel>
        /Users/joseperezcano/Desktop/IDAO_2022/tensorflow_gnn/package/tfdep.bzl:7:17: in tf_setup
      Repository rule http_archive defined at:
        /private/var/tmp/_bazel_joseperezcano/9bb9c29a27614ceb3a61050e6f96bc44/external/bazel_tools/tools/build_defs/repo/http.bzl:364:31: in <toplevel>
      WARNING: Download from https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.6.0.tar.gz failed: class java.io.IOException Proxy address localhost:8080 is not a valid URL
      ERROR: An error occurred during the fetch of repository 'org_tensorflow':
         Traceback (most recent call last):
          File "/private/var/tmp/_bazel_joseperezcano/9bb9c29a27614ceb3a61050e6f96bc44/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
                  download_info = ctx.download_and_extract(
      Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.6.0.tar.gz] to /private/var/tmp/_bazel_joseperezcano/9bb9c29a27614ceb3a61050e6f96bc44/external/org_tensorflow/temp10782059563076960071/v2.6.0.tar.gz: Proxy address localhost:8080 is not a valid URL
      ERROR: /Users/joseperezcano/Desktop/IDAO_2022/tensorflow_gnn/WORKSPACE:7:9: fetching http_archive rule //external:org_tensorflow: Traceback (most recent call last):
          File "/private/var/tmp/_bazel_joseperezcano/9bb9c29a27614ceb3a61050e6f96bc44/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
                  download_info = ctx.download_and_extract(
      Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.6.0.tar.gz] to /private/var/tmp/_bazel_joseperezcano/9bb9c29a27614ceb3a61050e6f96bc44/external/org_tensorflow/temp10782059563076960071/v2.6.0.tar.gz: Proxy address localhost:8080 is not a valid URL
      ERROR: no such package '@org_tensorflow//tensorflow': java.io.IOException: Error downloading [https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.6.0.tar.gz] to /private/var/tmp/_bazel_joseperezcano/9bb9c29a27614ceb3a61050e6f96bc44/external/org_tensorflow/temp10782059563076960071/v2.6.0.tar.gz: Proxy address localhost:8080 is not a valid URL
      INFO: Elapsed time: 12,913s
      INFO: 0 processes.
      FAILED: Build did NOT complete successfully (0 packages loaded)
      ERROR: Build failed. Not running target
      FAILED: Build did NOT complete successfully (0 packages loaded)
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/Users/joseperezcano/Desktop/IDAO_2022/tensorflow_gnn/setup.py", line 152, in <module>
          setup(
        File "/Users/joseperezcano/Desktop/IDAO_2022/crystal/lib/python3.9/site-packages/setuptools/__init__.py", line 155, in setup
          return distutils.core.setup(**attrs)
        File "/Users/joseperezcano/Desktop/IDAO_2022/crystal/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
          return run_commands(dist)
        File "/Users/joseperezcano/Desktop/IDAO_2022/crystal/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
          dist.run_commands()
        File "/Users/joseperezcano/Desktop/IDAO_2022/crystal/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "/Users/joseperezcano/Desktop/IDAO_2022/crystal/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/Users/joseperezcano/Desktop/IDAO_2022/crystal/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/Users/joseperezcano/Desktop/IDAO_2022/crystal/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/Users/joseperezcano/Desktop/IDAO_2022/crystal/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/Users/joseperezcano/Desktop/IDAO_2022/crystal/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/Users/joseperezcano/Desktop/IDAO_2022/crystal/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/Users/joseperezcano/Desktop/IDAO_2022/crystal/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/Users/joseperezcano/Desktop/IDAO_2022/tensorflow_gnn/setup.py", line 86, in run
          subprocess.check_call(
        File "/usr/local/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/usr/local/bin/bazel', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '--macos_minimum_os=10.9', '//package:move_generated_files']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tensorflow-gnn
  Running setup.py clean for tensorflow-gnn
  Building wheel for pygraphviz (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [48 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-12-x86_64-3.9
      creating build/lib.macosx-12-x86_64-3.9/pygraphviz
      copying pygraphviz/scraper.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      copying pygraphviz/graphviz.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      copying pygraphviz/__init__.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      copying pygraphviz/agraph.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      copying pygraphviz/testing.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      creating build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_unicode.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_scraper.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_readwrite.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_string.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/__init__.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_html.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_node_attributes.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_drawing.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_repr_mimebundle.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_subgraph.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_close.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_edge_attributes.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_clear.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_layout.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_graph.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      running egg_info
      warning: no files found matching '*.png' under directory 'doc'
      warning: no files found matching '*.txt' under directory 'doc'
      warning: no files found matching '*.css' under directory 'doc'
      warning: no previously-included files matching '*~' found anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '.svn' found anywhere in distribution
      no previously-included directories found matching 'doc/build'
      writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
      copying pygraphviz/graphviz.i -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      copying pygraphviz/graphviz_wrap.c -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      running build_ext
      creating build/temp.macosx-12-x86_64-3.9
      creating build/temp.macosx-12-x86_64-3.9/pygraphviz
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/Users/joseperezcano/Desktop/IDAO_2022/crystal/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-12-x86_64-3.9/pygraphviz/graphviz_wrap.o
      pygraphviz/graphviz_wrap.c:2711:10: fatal error: 'graphviz/cgraph.h' file not found
      #include "graphviz/cgraph.h"
               ^~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/local/opt/llvm/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pygraphviz
  Running setup.py clean for pygraphviz
Failed to build tensorflow-gnn pygraphviz
Installing collected packages: pygraphviz, pydot, proto-plus, pillow, packaging, orjson, numpy, networkx, mock, kiwisolver, httplib2, googleapis-common-protos, google-crc32c, fonttools, fasteners, fastavro, dill, cycler, cachetools, scipy, pyarrow, oauth2client, matplotlib, libcst, hdfs, grpcio-gcp, google-resumable-media, google-auth, grpc-google-iam-v1, google-apitools, google-api-core, apache-beam, google-cloud-core, tensorflow-cpu, google-cloud-vision, google-cloud-videointelligence, google-cloud-spanner, google-cloud-recommendations-ai, google-cloud-pubsub, google-cloud-language, google-cloud-dlp, google-cloud-datastore, google-cloud-bigtable, google-cloud-bigquery-storage, google-cloud-bigquery, tensorflow-gnn
  Running setup.py install for pygraphviz ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for pygraphviz did not run successfully.
  │ exit code: 1
  ╰─> [50 lines of output]
      running install
      /Users/joseperezcano/Desktop/IDAO_2022/crystal/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-12-x86_64-3.9
      creating build/lib.macosx-12-x86_64-3.9/pygraphviz
      copying pygraphviz/scraper.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      copying pygraphviz/graphviz.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      copying pygraphviz/__init__.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      copying pygraphviz/agraph.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      copying pygraphviz/testing.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      creating build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_unicode.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_scraper.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_readwrite.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_string.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/__init__.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_html.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_node_attributes.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_drawing.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_repr_mimebundle.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_subgraph.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_close.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_edge_attributes.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_clear.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_layout.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      copying pygraphviz/tests/test_graph.py -> build/lib.macosx-12-x86_64-3.9/pygraphviz/tests
      running egg_info
      warning: no files found matching '*.png' under directory 'doc'
      warning: no files found matching '*.txt' under directory 'doc'
      warning: no files found matching '*.css' under directory 'doc'
      warning: no previously-included files matching '*~' found anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '.svn' found anywhere in distribution
      no previously-included directories found matching 'doc/build'
      writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
      copying pygraphviz/graphviz.i -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      copying pygraphviz/graphviz_wrap.c -> build/lib.macosx-12-x86_64-3.9/pygraphviz
      running build_ext
      creating build/temp.macosx-12-x86_64-3.9
      creating build/temp.macosx-12-x86_64-3.9/pygraphviz
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/Users/joseperezcano/Desktop/IDAO_2022/crystal/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-12-x86_64-3.9/pygraphviz/graphviz_wrap.o
      pygraphviz/graphviz_wrap.c:2711:10: fatal error: 'graphviz/cgraph.h' file not found
      #include "graphviz/cgraph.h"
               ^~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/local/opt/llvm/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pygraphviz

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

When trying to fix the pygraphviz error I also followed this thread and this one. But the errors are still the same.

I know there was an issue in #7 with one line in package/BUILD but that line is no longer in the file in the new version so that is not the problem. Please, any help is appreciated.

Same input different output every time

gt_input = _get_test_bidi_cycle_graph(tf.constant(
    [[1., 0., 0., 1.],
     [0., 1., 0., 2.],
     [0., 0., 1., 3.]]))

conv = gat_v2.GATv2Convolution(
    num_heads=1,
    per_head_channels=4,
    receiver_tag=const.TARGET,
    attention_activation="relu")

outputs = conv(gt_input, edge_set_name="edges")

outputs = tf.keras.backend.get_value(outputs)

The element values of outputs are very different for running every time, is it normal?

Support for bidirectional edges?

Hi,

I was wondering if there was a built-in way to flag an edge as bidirectional, rather than having to duplicate connections in the base data source (e.g., Pandas dataframe) between nodes

How to use tf.distribute.Strategy in TFGNN

I'd like to add tf.distribute.MirroredStrategy to keras_trainer.py and int_arithmetic_sampler_test.py. But when I added it according to Distributed training with Keras, the two .py demos didn't work. So, what should I do?

I remember the TF-GNN paper had introduced that for fast training and inference, deep graph models must be able to exploit parallel computations on specialized hardware. But the tutorials or demos haven't been given.

Could you please tell me where I can find some tutorials or demos, or tell me some methods to modify the above two demos? Or, just tell me the principle of the modification.

Accessing GATv2Convolution

I am somewhat confused by the way TensorFlow GNN exposes GATv2 and related layers. I see that both tfgnn.keras.layers.GATv2 and tfgnn.keras.layers.gat.gatv2.GATv2 are available, but what is the difference between them? tfgnn.keras.layers.gat.gatv2.GATv2AttentionPool is also available, but I can't seem to access GATv2GraphUpdate, GATv2EdgePool or GATv2Convolution from https://github.com/tensorflow/gnn/blob/main/tensorflow_gnn/graph/keras/layers/gat_v2.py , the latter of which also supports edge features (as opposed to the GATv2 that is exposed).

Also, I see in https://github.com/tensorflow/gnn/blob/main/tensorflow_gnn/graph/keras/keras_e2e_test.py there is a test self.assertIsSubclass(tfgnn.keras.layers.GATv2Convolution, Layer), but this of course fails.

Issues while using GraphSage layers

TryinG to use the following layers: https://github.com/tensorflow/gnn/blob/main/tensorflow_gnn/models/graph_sage/layers.py

Getting the following errors

While compilig the model,
WARNING:tensorflow:AutoGraph could not transform <function check_scalar_graph_piece at 0x7f70028b4160> and will run it as-is.

While calling model.fit() its showing the following warnings:
WARNING:tensorflow:Gradients do not exist for variables ['graph_update/node_set_update_1/graph_sage_aggregator_conv/dense_3/kernel:0', 'graph_update/node_set_update_1/graph_sage_next_state_1/bias:0', 'graph_update/node_set_update_1/graph_sage_next_state_1/dense_4/kernel:0'] when minimizing the loss. If you're using model.compile(), did you forget to provide a loss argument?

Can't consume part schemas

Because the node_sets and edge_sets are dynamic generated, the node types and edge types are different for different graph tensors, so the different node_sets and edge_sets should have the ability to use a part of a static schema, like:
edge_sets={'A-B': tfgnn.EdgeSetSpec()} or edge_sets={'B-C': tfgnn.EdgeSetSpec()} in program to use edge_sets={'A-B': tfgnn.EdgeSetSpec(), 'B-C': tfgnn.EdgeSetSpec()} in schema file.
But this will have the problem: f"generator yielded an element of {values_spec} where an element of {output_signature} was expected."

ROCm support

Hi! Do you support ROCm AMD GPUs for this GNN package?

Thanks!

Same input different output in every time

gt_input = _get_test_bidi_cycle_graph(tf.constant(
    [[1., 0., 0., 1.],
     [0., 1., 0., 2.],
     [0., 0., 1., 3.]]))

conv = gat_v2.GATv2Convolution(
    num_heads=1,
    per_head_channels=4,
    receiver_tag=const.TARGET,
    attention_activation="relu")

outputs = conv(gt_input, edge_set_name="edges")

outputs = tf.keras.backend.get_value(outputs)

The element values of outputs are very different for running every time, is it normal?

Schema visualization tool

Schemas can be complex and need visualization. A simple script could convert the schema to a networkx graph and generate an image with the graph visualization.

This can be a starting point:

import networkx as nx
import matplotlib.pyplot as plt


graph_schema = tfgnn.read_schema("schema.pbtxt")
graph = nx.DiGraph()

nodes = [
    name for name in graph_schema.node_sets.keys()
]
edges = [
    [e.source, e.target] for e in graph_schema.edge_sets.values()
]
edge_labels = {
    (e.source, e.target): name for name, e in graph_schema.edge_sets.items()
}

graph.add_nodes_from(nodes)
graph.add_edges_from(edges)

pos = nx.spring_layout(graph)

nx.draw(graph,
        pos=pos,
        node_size=1000,
        with_labels = True)

nx.draw_networkx_edge_labels(
    graph,
    pos=pos,
    edge_labels=edge_labels
)

plt.savefig("schema.png")

The above can generate a schema visualizations like this:
Unknown

Implement SE3 Transformers

Hi, I'm really excited for this library. I think some of the scalability tricks you have promised under the hood look exceptionally nice.

Building off of the GATv2 example, I'd really like to implement SE3 Transformers (https://arxiv.org/pdf/2006.10503.pdf)

I understand you have a roadmap, and this is an alpha, but I haven't found a SE3 implementation in tensorflow I like and this seems the most promising starting point.

I am able to compile and run tests (from my own branch). I can either try and hack something together for myself, or potentially layout a spec with someone from the team to do this.

Examples graphs

Please provide examples of training and usage with known academic graph datasets.
It would be worth to have the recent published TUDATASET benchmark for graph regression and classification, since it collects more than 100 hundred graph datasets.

Thanks for this library, cannot wait to try it!

Indices too big

Below error occors when training, and too many indices are bigger than 1000, but the indices are all smaller than 200 when construct the graph tensor. Why the indices in an adjacency can be changed? Would any one please advise any possible reason? Thanks.

graph_tensor_ops.py, line 109, in broadcast_node_to_edges
return tf.gather(node_value, adjacency[node_tag])
Node: 'model_2/graph_update/node_set_update_1/multi_head_attention_conv/GatherV2_6'
indices[77] = 387 is not in [0, 384)
[[{{node model_2/graph_update/node_set_update_1/multi_head_attention_conv/GatherV2_6}}]] [Op:__inference_train_function_20223]

Must pass exactly one of edge_set_name, node_set_name

Hi,

raise ValueError(
"Must pass exactly one of edge_set_name, node_set_name "
"for receiver_tag CONTEXT.")

This means only one type of nodes can be conv at a time? So need to conv many times for multiple types of nodes?

ValueError: Tensor conversion requested dtype variant

W tensorflow/core/framework/op_kernel.cc:1733] INVALID_ARGUMENT: ValueError: Tensor conversion requested dtype variant for Tensor with dtype int64: <tf.Tensor: shape=(1,), dtype=int64, numpy=array([1])>
Traceback (most recent call last):

File "/home/sidney/.javacpp/cache/cpython-3.10.2-1.5.7-linux-x86_64.jar/org/bytedeco/cpython/linux-x86_64/lib/python3.10/site-packages/tensorflow/python/ops/script_ops.py", line 270, in call
return func(device, token, args)

File "/home/sidney/.javacpp/cache/cpython-3.10.2-1.5.7-linux-x86_64.jar/org/bytedeco/cpython/linux-x86_64/lib/python3.10/site-packages/tensorflow/python/ops/script_ops.py", line 148, in call
outputs = self._call(device, args)

File "/home/sidney/.javacpp/cache/cpython-3.10.2-1.5.7-linux-x86_64.jar/org/bytedeco/cpython/linux-x86_64/lib/python3.10/site-packages/tensorflow/python/ops/script_ops.py", line 164, in _call
outputs = [

File "/home/sidney/.javacpp/cache/cpython-3.10.2-1.5.7-linux-x86_64.jar/org/bytedeco/cpython/linux-x86_64/lib/python3.10/site-packages/tensorflow/python/ops/script_ops.py", line 165, in
_maybe_copy_to_context_device(self._convert(x, dtype=dtype),

File "/home/sidney/.javacpp/cache/cpython-3.10.2-1.5.7-linux-x86_64.jar/org/bytedeco/cpython/linux-x86_64/lib/python3.10/site-packages/tensorflow/python/ops/script_ops.py", line 132, in _convert
return ops.convert_to_tensor(value, dtype=dtype)

File "/home/sidney/.javacpp/cache/cpython-3.10.2-1.5.7-linux-x86_64.jar/org/bytedeco/cpython/linux-x86_64/lib/python3.10/site-packages/tensorflow/python/profiler/trace.py", line 183, in wrapped
return func(*args, **kwargs)

File "/home/sidney/.javacpp/cache/cpython-3.10.2-1.5.7-linux-x86_64.jar/org/bytedeco/cpython/linux-x86_64/lib/python3.10/site-packages/tensorflow/python/framework/ops.py", line 1662, in convert_to_tensor
raise ValueError(

ValueError: Tensor conversion requested dtype variant for Tensor with dtype int64: <tf.Tensor: shape=(1,), dtype=int64, numpy=array([1])>

Citation

Is there a prefered way of citing this repository in academic articles? Could a .bib entry be provided either here or in the READMEmd?

Download from http://mirror.tensorflow.org/github.com/tensorflow/runtime/archive/b570a1921c9e55ac53c8972bd2bfd37cd0eb510d.tar.gz failed:

bazel: 3.7.2
pip: 21.2.4
python: 3.9.9

Running setup.py install for tensorflow-gnn: started
Running setup.py install for tensorflow-gnn: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-f4zi6o4f/setup.py'"'"'; file='"'"'/tmp/pip-req-build-f4zi6o4f/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-wlsd6gr1/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/tensorflow-gnn
cwd: /tmp/pip-req-build-f4zi6o4f/
Complete output (46 lines):
running install
running build
running bazel_build
Loading:
Loading: 0 packages loaded
WARNING: Download from http://mirror.tensorflow.org/github.com/tensorflow/runtime/archive/b570a1921c9e55ac53c8972bd2bfd37cd0eb510d.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
DEBUG: /root/.cache/bazel/_bazel_root/b4d19525ca49b6ef2846f4f7e84a4744/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
Analyzing: target //package:move_generated_files (0 packages loaded, 0 targets configured)
ERROR: /tmp/pip-req-build-f4zi6o4f/package/BUILD:10:10: no such target '//tensorflow_gnn/sampler:sampling_spec_pb2.py': target 'sampling_spec_pb2.py' not declared in package 'tensorflow_gnn/sampler' defined by /tmp/pip-req-build-f4zi6o4f/tensorflow_gnn/sampler/BUILD and referenced by '//package:move_generated_files'
ERROR: Analysis of target '//package:move_generated_files' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.114s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-f4zi6o4f/setup.py", line 152, in
setup(
File "/usr/local/lib/python3.9/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/local/lib/python3.9/distutils/command/install.py", line 546, in run
self.run_command('build')
File "/usr/local/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-f4zi6o4f/setup.py", line 86, in run
subprocess.check_call(
File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_calld)
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/bazel', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '//package:move_generated_files']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-f4zi6o4f/setup.py'"'"'; file='"'"'/tmp/pip-req-build-f4zi6o4f/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-wlsd6gr1/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/tensorflow-gnn Check the logs for full command output.
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.

Ways to update edge sets adjacency in training?

Hi,
I am able to update edge/node features while training and looking for a way to update the adjacency of edge sets (i.e. changing the whole graph structure). I am not sure whether this is achievable. It would be great to have some examples from you.
Thanks a lot

TF-GNN Colab Installation

  4 # Model builder initialization:

----> 5 gnn = tfgnn.keras.ConvGNNBuilder(
6 lambda edge_set_name: WeightedSumConvolution(),
7 lambda node_set_name: tfgnn.keras.layers.NextStateFromConcat(

AttributeError: module 'tensorflow_gnn' has no attribute 'keras'

Issues installing from source on macOS Big Sur 11.5.2

Hello,

I'm trying to install tensorflow_gnn on macOS Big Sur 11.5.2.

I have bazel and graphviz installed via Homebrew. I cloned the repo locally and installed TensorFlow 2.7.

Then I try to run this command as per the README:

cd tensorflow_gnn && python3 -m pip install .

I get this error:

(TensorFlow) rish $ cd tensorflow_gnn && python3 -m pip install .
Processing /Users/rishabhanand/Desktop/tfgnn-models/tensorflow_gnn
  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Requirement already satisfied: absl-py in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (0.13.0)
Requirement already satisfied: apache-beam[gcp]>=2.32 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (2.34.0)
Requirement already satisfied: grpcio in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (1.42.0)
Requirement already satisfied: matplotlib in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (3.4.2)
Requirement already satisfied: mock in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (4.0.3)
Requirement already satisfied: networkx in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (2.6.3)
Requirement already satisfied: numpy in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (1.19.5)
Requirement already satisfied: protobuf>=3.17 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (3.19.1)
Requirement already satisfied: pyarrow in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (5.0.0)
Requirement already satisfied: pygraphviz in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (1.7)
Requirement already satisfied: scipy in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (1.7.0)
Requirement already satisfied: six in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (1.15.0)
Requirement already satisfied: tensorflow-cpu>=2.7.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (2.7.0)
Requirement already satisfied: requests<3.0.0,>=2.24.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.25.1)
Requirement already satisfied: orjson<4.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (3.6.4)
Requirement already satisfied: pydot<2,>=1.2.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.4.2)
Requirement already satisfied: avro-python3!=1.9.2,<1.10.0,>=1.8.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.9.2.1)
Requirement already satisfied: future<1.0.0,>=0.18.2 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.18.2)
Requirement already satisfied: crcmod<2.0,>=1.7 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.7)
Requirement already satisfied: dill<0.3.2,>=0.3.1.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.3.1.1)
Requirement already satisfied: pytz>=2018.3 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2021.3)
Requirement already satisfied: fastavro<2,>=0.21.4 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.4.7)
Requirement already satisfied: pymongo<4.0.0,>=3.8.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (3.12.1)
Requirement already satisfied: python-dateutil<3,>=2.8.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.8.1)
Requirement already satisfied: typing-extensions<4,>=3.7.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (3.7.4.3)
Requirement already satisfied: oauth2client<5,>=2.0.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (4.1.3)
Requirement already satisfied: hdfs<3.0.0,>=2.1.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.6.0)
Requirement already satisfied: httplib2<0.20.0,>=0.8 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.19.1)
Requirement already satisfied: grpcio-gcp<1,>=0.2.2 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.2.2)
Requirement already satisfied: google-cloud-bigquery-storage>=2.6.3 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.10.1)
Requirement already satisfied: google-cloud-core<2,>=0.28.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.7.2)
Requirement already satisfied: google-cloud-bigtable<2,>=0.31.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.7.0)
Requirement already satisfied: google-cloud-videointelligence<2,>=1.8.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.16.1)
Requirement already satisfied: google-cloud-spanner<2,>=1.13.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.19.1)
Requirement already satisfied: google-cloud-recommendations-ai<=0.2.0,>=0.1.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.2.0)
Requirement already satisfied: google-cloud-bigquery<3,>=1.6.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.30.1)
Requirement already satisfied: cachetools<5,>=3.1.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (4.2.2)
Requirement already satisfied: google-cloud-vision<2,>=0.38.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.0.0)
Requirement already satisfied: google-apitools<0.5.32,>=0.5.31 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.5.31)
Requirement already satisfied: google-cloud-pubsub<2,>=0.39.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.7.0)
Requirement already satisfied: google-cloud-dlp<2,>=0.12.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.0.0)
Requirement already satisfied: google-cloud-datastore<2,>=1.8.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.15.3)
Requirement already satisfied: google-auth<3,>=1.18.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.32.0)
Requirement already satisfied: google-cloud-language<2,>=1.3.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.3.0)
Requirement already satisfied: fasteners>=0.14 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-apitools<0.5.32,>=0.5.31->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.16.3)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-auth<3,>=1.18.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.2.8)
Requirement already satisfied: setuptools>=40.3.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-auth<3,>=1.18.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (52.0.0.post20210125)
Requirement already satisfied: rsa<5,>=3.1.4 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-auth<3,>=1.18.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (4.7.2)
Requirement already satisfied: google-api-core[grpc]<3.0.0dev,>=1.29.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-cloud-bigquery<3,>=1.6.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.31.4)
Requirement already satisfied: google-resumable-media<3.0dev,>=0.6.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-cloud-bigquery<3,>=1.6.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.1.0)
Requirement already satisfied: packaging>=14.3 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-cloud-bigquery<3,>=1.6.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (21.3)
Requirement already satisfied: proto-plus>=1.10.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-cloud-bigquery<3,>=1.6.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.19.8)
Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.6.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-api-core[grpc]<3.0.0dev,>=1.29.0->google-cloud-bigquery<3,>=1.6.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.53.0)
Requirement already satisfied: libcst>=0.2.5 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-cloud-bigquery-storage>=2.6.3->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.3.21)
Requirement already satisfied: grpc-google-iam-v1<0.13dev,>=0.12.3 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-cloud-bigtable<2,>=0.31.1->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.12.3)
Requirement already satisfied: google-crc32c<2.0dev,>=1.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-resumable-media<3.0dev,>=0.6.0->google-cloud-bigquery<3,>=1.6.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.3.0)
Requirement already satisfied: docopt in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from hdfs<3.0.0,>=2.1.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.6.2)
Requirement already satisfied: pyparsing<3,>=2.4.2 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from httplib2<0.20.0,>=0.8->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.4.7)
Requirement already satisfied: typing-inspect>=0.4.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from libcst>=0.2.5->google-cloud-bigquery-storage>=2.6.3->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.7.1)
Requirement already satisfied: pyyaml>=5.2 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from libcst>=0.2.5->google-cloud-bigquery-storage>=2.6.3->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (6.0)
Requirement already satisfied: pyasn1>=0.1.7 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from oauth2client<5,>=2.0.1->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.4.8)
Requirement already satisfied: idna<3,>=2.5 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from requests<3.0.0,>=2.24.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from requests<3.0.0,>=2.24.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.26.5)
Requirement already satisfied: chardet<5,>=3.0.2 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from requests<3.0.0,>=2.24.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (4.0.0)
Requirement already satisfied: certifi>=2017.4.17 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from requests<3.0.0,>=2.24.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2021.5.30)
Requirement already satisfied: tensorflow-estimator<2.8,~=2.7.0rc0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (2.7.0)
Requirement already satisfied: keras<2.8,>=2.7.0rc0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (2.7.0)
Requirement already satisfied: h5py>=2.9.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (3.1.0)
Requirement already satisfied: flatbuffers<3.0,>=1.12 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.12)
Requirement already satisfied: gast<0.5.0,>=0.2.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (0.4.0)
Requirement already satisfied: libclang>=9.0.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (12.0.0)
Requirement already satisfied: google-pasta>=0.1.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (0.2.0)
Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.21.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (0.22.0)
Requirement already satisfied: astunparse>=1.6.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.6.3)
Requirement already satisfied: termcolor>=1.1.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.1.0)
Requirement already satisfied: wheel<1.0,>=0.32.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (0.36.2)
Requirement already satisfied: keras-preprocessing>=1.1.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.1.2)
Requirement already satisfied: opt-einsum>=2.3.2 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (3.3.0)
Requirement already satisfied: tensorboard~=2.6 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (2.7.0)
Requirement already satisfied: wrapt>=1.11.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.12.1)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.8.0)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (0.4.4)
Requirement already satisfied: werkzeug>=0.11.15 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (2.0.1)
Requirement already satisfied: markdown>=2.6.8 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (3.3.4)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (0.6.1)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.3.0)
Requirement already satisfied: oauthlib>=3.0.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (3.1.1)
Requirement already satisfied: mypy-extensions>=0.3.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from typing-inspect>=0.4.0->libcst>=0.2.5->google-cloud-bigquery-storage>=2.6.3->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.4.3)
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from matplotlib->tensorflow-gnn==0.1.0) (1.3.1)
Requirement already satisfied: cycler>=0.10 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from matplotlib->tensorflow-gnn==0.1.0) (0.10.0)
Requirement already satisfied: pillow>=6.2.0 in /Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages (from matplotlib->tensorflow-gnn==0.1.0) (8.2.0)
Building wheels for collected packages: tensorflow-gnn
  Building wheel for tensorflow-gnn (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/rishabhanand/miniconda3/envs/TensorFlow/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/setup.py'"'"'; __file__='"'"'/private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-wheel-mthpqja5
       cwd: /private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/
  Complete output (50 lines):
  running bdist_wheel
  running build
  running bazel_build
  Starting local Bazel server and connecting to it...
  Loading:
  Loading: 0 packages loaded
  Loading: 0 packages loaded
  Loading: 0 packages loaded
  DEBUG: /private/var/tmp/_bazel_rishabhanand/079daae8407a39d2a06054d5b945f048/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
  Loading: 0 packages loaded
  Loading: 0 packages loaded
  Loading: 0 packages loaded
  Loading: 0 packages loaded
  Analyzing: target //package:move_generated_files (1 packages loaded, 0 targets configured)
  ERROR: /private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/package/BUILD:10:10: no such target '//tensorflow_gnn/sampler:sampling_spec_pb2.py': target 'sampling_spec_pb2.py' not declared in package 'tensorflow_gnn/sampler' defined by /private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/tensorflow_gnn/sampler/BUILD and referenced by '//package:move_generated_files'
  ERROR: Analysis of target '//package:move_generated_files' failed; build aborted: Analysis failed
  INFO: Elapsed time: 29.988s
  INFO: 0 processes.
  FAILED: Build did NOT complete successfully (10 packages loaded, 10 targets configured)
  ERROR: Build failed. Not running target
  FAILED: Build did NOT complete successfully (10 packages loaded, 10 targets configured)
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/setup.py", line 152, in <module>
      setup(
    File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/setup.py", line 86, in run
      subprocess.check_call(
    File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/subprocess.py", line 373, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/usr/local/bin/bazel', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '--macos_minimum_os=10.9', '//package:move_generated_files']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for tensorflow-gnn
  Running setup.py clean for tensorflow-gnn
Failed to build tensorflow-gnn
Installing collected packages: tensorflow-gnn
    Running setup.py install for tensorflow-gnn ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/rishabhanand/miniconda3/envs/TensorFlow/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/setup.py'"'"'; __file__='"'"'/private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-record-0ma3o1eu/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rishabhanand/miniconda3/envs/TensorFlow/include/python3.9/tensorflow-gnn
         cwd: /private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/
    Complete output (45 lines):
    running install
    running build
    running bazel_build
    Loading:
    Loading: 0 packages loaded
    DEBUG: /private/var/tmp/_bazel_rishabhanand/079daae8407a39d2a06054d5b945f048/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
    Analyzing: target //package:move_generated_files (0 packages loaded, 0 targets configured)
    ERROR: /private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/package/BUILD:10:10: no such target '//tensorflow_gnn/sampler:sampling_spec_pb2.py': target 'sampling_spec_pb2.py' not declared in package 'tensorflow_gnn/sampler' defined by /private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/tensorflow_gnn/sampler/BUILD and referenced by '//package:move_generated_files'
    ERROR: Analysis of target '//package:move_generated_files' failed; build aborted: Analysis failed
    INFO: Elapsed time: 0.191s
    INFO: 0 processes.
    FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
    ERROR: Build failed. Not running target
    FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/setup.py", line 152, in <module>
        setup(
      File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/command/install.py", line 546, in run
        self.run_command('build')
      File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/setup.py", line 86, in run
        subprocess.check_call(
      File "/Users/rishabhanand/miniconda3/envs/TensorFlow/lib/python3.9/subprocess.py", line 373, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/usr/local/bin/bazel', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '--macos_minimum_os=10.9', '//package:move_generated_files']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/rishabhanand/miniconda3/envs/TensorFlow/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/setup.py'"'"'; __file__='"'"'/private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-req-build-kgqd2bkw/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/s5/g5knq0hd405dd5lx90_lshdc0000gn/T/pip-record-0ma3o1eu/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rishabhanand/miniconda3/envs/TensorFlow/include/python3.9/tensorflow-gnn Check the logs for full command output.
(TensorFlow) rish $ 

Any help here would be greatly appreciated! Are there any other prerequisites I need to run it smoothly / install from source?

Thank you!

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

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"]

Input to reshape is a tensor with 1800 values, but the requested shape has 2400 [Op:Reshape]

When I run the keras_minibatch_trainer.py in the anaconda environment by the below instruction, occasionally it gets this error - Input to reshape is a tensor with 1800 values, but the requested shape has 2400 [Op:Reshape]. According to the error info -
…int_arithmetic_sampler.py", line 530, in generate_subgraphs yield self.sample_sub_graph_tensor(, I think that it has something to do with int_arithmetic_sampler.py. But I don't know why. Could you please help me to resolve the problem?

(tf2.x) bit202@bit202-OMEN:~$ python /home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/keras_minibatch_trainer.py

Notice:
I have changed 33rd line code of keras_minibatch_trainer.py from from tensorflow_gnn.examples.in_memory import int_arithmetic_samplertoimport int_arithmetic_sampler. Because as a folder nametensorflow_gnn conflict with tensorflow_gnn lib.

Following is the log:

Epoch 7500/10000
1/1 [==============================] - ETA: 0s - loss: 1.0105 - acc: 0.71502022-10-25 10:49:59.399484: W tensorflow/core/framework/op_kernel.cc:1768] UNKNOWN: InvalidArgumentError: {{function_node __wrapped__Reshape_device_/job:localhost/replica:0/task:0/device:GPU:0}} Input to reshape is a tensor with 1800 values, but the requested shape has 2400 [Op:Reshape]
Traceback (most recent call last):

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/ops/script_ops.py", line 269, in __call__
    return func(device, token, args)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/ops/script_ops.py", line 147, in __call__
    outputs = self._call(device, args)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/ops/script_ops.py", line 154, in _call
    ret = self._func(*args)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py", line 642, in wrapper
    return func(*args, **kwargs)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 1107, in generator_py_func
    values = next(generator_state.get_iterator(iterator_id.numpy()))

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 530, in generate_subgraphs
    yield self.sample_sub_graph_tensor(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 604, in sample_sub_graph_tensor
    walk_tree = self.random_walk_tree(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 574, in random_walk_tree
    process_sampling_spec_topologically(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 194, in process_sampling_spec_topologically
    process_callback(node)

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 566, in process_sampling_op
    next_nodes = self.sample_one_hop(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 499, in sample_one_hop
    next_nodes = tf.reshape(next_nodes, source_nodes.shape + [sample_size])

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 54, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,

tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__Reshape_device_/job:localhost/replica:0/task:0/device:GPU:0}} Input to reshape is a tensor with 1800 values, but the requested shape has 2400 [Op:Reshape]


Traceback (most recent call last):
  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/keras_minibatch_trainer.py", line 136, in <module>
    app.run(main)
  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/keras_minibatch_trainer.py", line 118, in main
    keras_model.fit(
  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 54, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.UnknownError: Graph execution error:

2 root error(s) found.
  (0) UNKNOWN:  InvalidArgumentError: {{function_node __wrapped__Reshape_device_/job:localhost/replica:0/task:0/device:GPU:0}} Input to reshape is a tensor with 1800 values, but the requested shape has 2400 [Op:Reshape]
Traceback (most recent call last):

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/ops/script_ops.py", line 269, in __call__
    return func(device, token, args)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/ops/script_ops.py", line 147, in __call__
    outputs = self._call(device, args)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/ops/script_ops.py", line 154, in _call
    ret = self._func(*args)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py", line 642, in wrapper
    return func(*args, **kwargs)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 1107, in generator_py_func
    values = next(generator_state.get_iterator(iterator_id.numpy()))

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 530, in generate_subgraphs
    yield self.sample_sub_graph_tensor(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 604, in sample_sub_graph_tensor
    walk_tree = self.random_walk_tree(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 574, in random_walk_tree
    process_sampling_spec_topologically(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 194, in process_sampling_spec_topologically
    process_callback(node)

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 566, in process_sampling_op
    next_nodes = self.sample_one_hop(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 499, in sample_one_hop
    next_nodes = tf.reshape(next_nodes, source_nodes.shape + [sample_size])

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 54, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,

tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__Reshape_device_/job:localhost/replica:0/task:0/device:GPU:0}} Input to reshape is a tensor with 1800 values, but the requested shape has 2400 [Op:Reshape]


	 [[{{node EagerPyFunc}}]]
	 [[IteratorGetNext]]
	 [[IteratorGetNext/_14]]
  (1) UNKNOWN:  InvalidArgumentError: {{function_node __wrapped__Reshape_device_/job:localhost/replica:0/task:0/device:GPU:0}} Input to reshape is a tensor with 1800 values, but the requested shape has 2400 [Op:Reshape]
Traceback (most recent call last):

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/ops/script_ops.py", line 269, in __call__
    return func(device, token, args)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/ops/script_ops.py", line 147, in __call__
    outputs = self._call(device, args)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/ops/script_ops.py", line 154, in _call
    ret = self._func(*args)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py", line 642, in wrapper
    return func(*args, **kwargs)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 1107, in generator_py_func
    values = next(generator_state.get_iterator(iterator_id.numpy()))

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 530, in generate_subgraphs
    yield self.sample_sub_graph_tensor(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 604, in sample_sub_graph_tensor
    walk_tree = self.random_walk_tree(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 574, in random_walk_tree
    process_sampling_spec_topologically(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 194, in process_sampling_spec_topologically
    process_callback(node)

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 566, in process_sampling_op
    next_nodes = self.sample_one_hop(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 499, in sample_one_hop
    next_nodes = tf.reshape(next_nodes, source_nodes.shape + [sample_size])

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 54, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,

tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__Reshape_device_/job:localhost/replica:0/task:0/device:GPU:0}} Input to reshape is a tensor with 1800 values, but the requested shape has 2400 [Op:Reshape]


	 [[{{node EagerPyFunc}}]]
	 [[IteratorGetNext]]
0 successful operations.
0 derived errors ignored. [Op:__inference_test_function_109382]
2022-10-25 10:49:59.402005: W tensorflow/core/framework/op_kernel.cc:1768] UNKNOWN: InvalidArgumentError: {{function_node __wrapped__Reshape_device_/job:localhost/replica:0/task:0/device:GPU:0}} Input to reshape is a tensor with 2400 values, but the requested shape has 1800 [Op:Reshape]
Traceback (most recent call last):

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/ops/script_ops.py", line 269, in __call__
    return func(device, token, args)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/ops/script_ops.py", line 147, in __call__
    outputs = self._call(device, args)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/ops/script_ops.py", line 154, in _call
    ret = self._func(*args)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py", line 642, in wrapper
    return func(*args, **kwargs)

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 1107, in generator_py_func
    values = next(generator_state.get_iterator(iterator_id.numpy()))

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 530, in generate_subgraphs
    yield self.sample_sub_graph_tensor(

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 606, in sample_sub_graph_tensor
    return walk_tree.to_graph_tensor(self.gather_node_features_dict)

  File "/home/bit202/Programs/tensorflow_gnn/examples/in_memory_test2nd/int_arithmetic_sampler.py", line 319, in to_graph_tensor
    renumbered_dst = tf.searchsorted(unique_node_ids[dst_set_name], edges[1])

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None

  File "/home/bit202/Programs/anaconda3/envs/tf2.x/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 7209, in raise_from_not_ok_status
    raise core._status_to_exception(e) from None  # pylint: disable=protected-access

tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__Reshape_device_/job:localhost/replica:0/task:0/device:GPU:0}} Input to reshape is a tensor with 2400 values, but the requested shape has 1800 [Op:Reshape]

[win 10] Building wheel for tensorflow-gnn (setup.py) ... error

Building wheel for tensorflow-gnn (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\dell\Miniconda3\envs\tfgnn\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp_\setup.py'"'"'; file='"'"'C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp_\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\dell\AppData\Local\Temp\pip-wheel-64ktaxfy'
cwd: C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp_
Complete output (52 lines):
running bdist_wheel
running build
running bazel_build
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
DEBUG: C:/users/dell/bazel_dell/hwkq7w65/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
Loading: 0 packages loaded
Loading: 0 packages loaded
Analyzing: target //package:move_generated_files (1 packages loaded, 0 targets configured)
ERROR: C:/users/dell/appdata/local/temp/pip-req-build-dipdqlp
/package/BUILD:10:10: no such target '//tensorflow_gnn/sampler:sampling_spec_pb2.py': target 'sampling_spec_pb2.py' not declared in package 'tensorflow_gnn/sampler' defined by C:/users/dell/appdata/local/temp/pip-req-build-dipdqlp_/tensorflow_gnn/sampler/BUILD and referenced by '//package:move_generated_files'
ERROR: Analysis of target '//package:move_generated_files' failed; build aborted: Analysis failed
INFO: Elapsed time: 133.684s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (10 packages loaded, 10 targets configured)
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully (10 packages loaded, 10 targets configured)
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp_\setup.py", line 152, in
setup(
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\setuptools_init_.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp_\setup.py", line 86, in run
subprocess.check_call(
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['D:\bazel\bazel.exe', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '--copt=-DWIN32_LEAN_AND_MEAN', '//package:move_generated_files']' returned non-zero exit status 1.

ERROR: Failed building wheel for tensorflow-gnn
Running setup.py clean for tensorflow-gnn
Failed to build tensorflow-gnn
Installing collected packages: tensorflow-gnn
Running setup.py install for tensorflow-gnn ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\dell\Miniconda3\envs\tfgnn\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp_\setup.py'"'"'; file='"'"'C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp_\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\dell\AppData\Local\Temp\pip-record-bmf2pzwg\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\dell\Miniconda3\envs\tfgnn\Include\tensorflow-gnn'
cwd: C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp_
Complete output (45 lines):
running install
running build
running bazel_build
Loading:
Loading: 0 packages loaded
DEBUG: C:/users/dell/bazel_dell/hwkq7w65/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
Analyzing: target //package:move_generated_files (0 packages loaded, 0 targets configured)
ERROR: C:/users/dell/appdata/local/temp/pip-req-build-dipdqlp
/package/BUILD:10:10: no such target '//tensorflow_gnn/sampler:sampling_spec_pb2.py': target 'sampling_spec_pb2.py' not declared in package 'tensorflow_gnn/sampler' defined by C:/users/dell/appdata/local/temp/pip-req-build-dipdqlp_/tensorflow_gnn/sampler/BUILD and referenced by '//package:move_generated_files'
ERROR: Analysis of target '//package:move_generated_files' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.419s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp_\setup.py", line 152, in
setup(
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\setuptools_init_.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\command\install.py", line 546, in run
self.run_command('build')
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp_\setup.py", line 86, in run
subprocess.check_call(
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['D:\bazel\bazel.exe', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '--copt=-DWIN32_LEAN_AND_MEAN', '//package:move_generated_files']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\dell\Miniconda3\envs\tfgnn\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp_\setup.py'"'"'; file='"'"'C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp_\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\dell\AppData\Local\Temp\pip-record-bmf2pzwg\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\dell\Miniconda3\envs\tfgnn\Include\tensorflow-gnn' Check the logs for full command output.
Traceback (most recent call last):
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_main
.py", line 31, in
sys.exit(_main())
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_internal\cli\main.py", line 70, in main
return command.main(cmd_args)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_internal\cli\base_command.py", line 98, in main
return self.main(args)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\contextlib.py", line 126, in exit
next(self.gen)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_internal\cli\command_context.py", line 20, in main_context
yield
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\contextlib.py", line 532, in exit
raise exc_details[1]
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\contextlib.py", line 137, in exit
self.gen.throw(typ, value, traceback)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_internal\utils\temp_dir.py", line 75, in tempdir_registry
yield tempdir_registry
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\contextlib.py", line 517, in exit
if cb(*exc_details):
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\contextlib.py", line 126, in exit
next(self.gen)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_internal\utils\temp_dir.py", line 37, in global_tempdir_manager
tempdir_manager = old_tempdir_manager
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\contextlib.py", line 532, in exit
raise exc_details[1]
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\contextlib.py", line 517, in exit
if cb(*exc_details):
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_internal\utils\temp_dir.py", line 165, in exit
self.cleanup()
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_internal\utils\temp_dir.py", line 184, in cleanup
rmtree(self.path)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_vendor\tenacity_init
.py", line 326, in wrapped_f
return self(f, *args, **kw)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_vendor\tenacity_init
.py", line 406, in call
do = self.iter(retry_state=retry_state)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_vendor\tenacity_init
.py", line 362, in iter
raise retry_exc.reraise()
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_vendor\tenacity_init
.py", line 195, in reraise
raise self.last_attempt.result()
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\concurrent\futures_base.py", line 438, in result
return self.__get_result()
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\concurrent\futures_base.py", line 390, in __get_result
raise self.exception
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_vendor\tenacity_init
.py", line 409, in call
result = fn(*args, **kwargs)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\site-packages\pip_internal\utils\misc.py", line 135, in rmtree
shutil.rmtree(dir, ignore_errors=ignore_errors, onerror=rmtree_errorhandler)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\shutil.py", line 748, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\shutil.py", line 630, in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
File "C:\Users\dell\Miniconda3\envs\tfgnn\lib\shutil.py", line 628, in rmtree_unsafe
os.rmdir(path)
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\Users\dell\AppData\Local\Temp\pip-req-build-dipdqlp
'

install ERROR: ProtoCompile tensorflow_gnn/tools/sampled_stats_pb2.py failed: (Segmentation fault)

I managed to installl some days ago (removing the line package.BUILD)

As there are some new commits, I did a fresh clone of the repo and tried to install it, but get errors.

Additionally, a simple End-to-End-Example would really help.

... (all requirements successful)...
ERROR: Command errored out with exit status 1:
command: /Users/mess/dev/tf_gnn/.venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py'"'"'; file='"'"'/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-wheel-a_xckoy6
cwd: /Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/
Complete output (72 lines):
running bdist_wheel
running build
running bazel_build
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
DEBUG: /private/var/tmp/_bazel_mess/3337b4c6ebf30f562b96f3f7e3030ff3/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Analyzing: target //package:move_generated_files (1 packages loaded, 0 targets configured)
Analyzing: target //package:move_generated_files (31 packages loaded, 118 targets configured)
Analyzing: target //package:move_generated_files (32 packages loaded, 118 targets configured)
Analyzing: target //package:move_generated_files (38 packages loaded, 223 targets configured)
Analyzing: target //package:move_generated_files (38 packages loaded, 223 targets configured)
INFO: Analyzed target //package:move_generated_files (43 packages loaded, 731 targets configured).
INFO: Found 1 target...
[0 / 10] [Prepa] Creating source manifest for //package:move_generated_files ... (3 actions, 0 running)
[14 / 191] Compiling src/google/protobuf/compiler/java/java_file.cc [for host]; 3s darwin-sandbox ... (8 actions, 7 running)
[26 / 191] Compiling src/google/protobuf/compiler/php/php_generator.cc [for host]; 4s darwin-sandbox ... (8 actions, 7 running)
[38 / 191] Compiling src/google/protobuf/compiler/command_line_interface.cc [for host]; 4s darwin-sandbox ... (8 actions, 7 running)
[56 / 191] Compiling src/google/protobuf/compiler/cpp/cpp_file.cc [for host]; 2s darwin-sandbox ... (8 actions, 7 running)
[74 / 191] Compiling src/google/protobuf/util/internal/protostream_objectwriter.cc [for host]; 3s darwin-sandbox ... (8 actions, 7 running)
[92 / 191] Compiling src/google/protobuf/compiler/cpp/cpp_message.cc [for host]; 7s darwin-sandbox ... (8 actions, 7 running)
[112 / 191] Compiling src/google/protobuf/compiler/js/js_generator.cc [for host]; 9s darwin-sandbox ... (8 actions, 7 running)
[137 / 191] Compiling src/google/protobuf/descriptor.cc [for host]; 5s darwin-sandbox ... (8 actions, 7 running)
INFO: From Linking external/com_google_protobuf/libprotobuf_lite.lo [for host]:
/Library/Developer/CommandLineTools/usr/bin/libtool: file: bazel-out/host/bin/external/com_google_protobuf/_objs/protobuf_lite/io_win32.o has no symbols
[187 / 193] [Prepa] Linking external/com_google_protobuf/libprotobuf.lo [for host]
INFO: From Linking external/com_google_protobuf/libprotobuf.lo [for host]:
/Library/Developer/CommandLineTools/usr/bin/libtool: file: bazel-out/host/bin/external/com_google_protobuf/_objs/protobuf/error_listener.o has no symbols
ERROR: /Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/tensorflow_gnn/tools/BUILD:7:17: ProtoCompile tensorflow_gnn/tools/sampled_stats_pb2.py failed: (Segmentation fault): protoc failed: error executing command bazel-out/host/bin/external/com_google_protobuf/protoc '--python_out=bazel-out/darwin-opt/bin' -I. -Iexternal/com_google_protobuf/python -Ibazel-out/darwin-opt/bin/external/com_google_protobuf/python ... (remaining 1 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
Target //package:move_generated_files failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 84,704s, Critical Path: 16,88s
INFO: 193 processes: 10 internal, 183 darwin-sandbox.
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully
Traceback (most recent call last):
File "", line 1, in
File "/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py", line 152, in
setup(
File "/Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/setuptools/init.py", line 159, in setup
return distutils.core.setup(**attrs)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py", line 86, in run
subprocess.check_call(
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/bazel', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '--macos_minimum_os=10.9', '//package:move_generated_files']' returned non-zero exit status 1.

ERROR: Failed building wheel for tensorflow-gnn
Running setup.py clean for tensorflow-gnn
Failed to build tensorflow-gnn
Installing collected packages: tensorflow-gnn
Attempting uninstall: tensorflow-gnn
Found existing installation: tensorflow-gnn 0.1.0
Uninstalling tensorflow-gnn-0.1.0:
Successfully uninstalled tensorflow-gnn-0.1.0
Running setup.py install for tensorflow-gnn ... error
ERROR: Command errored out with exit status 1:
command: /Users/mess/dev/tf_gnn/.venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py'"'"'; file='"'"'/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-record-n5tjgybo/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mess/dev/tf_gnn/.venv/include/site/python3.9/tensorflow-gnn
cwd: /Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/
Complete output (53 lines):
running install
/Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running bazel_build
Loading:
Loading: 0 packages loaded
DEBUG: /private/var/tmp/_bazel_mess/3337b4c6ebf30f562b96f3f7e3030ff3/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
Analyzing: target //package:move_generated_files (0 packages loaded, 0 targets configured)
INFO: Analyzed target //package:move_generated_files (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
[0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
ERROR: /Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/tensorflow_gnn/tools/BUILD:7:17: ProtoCompile tensorflow_gnn/tools/sampled_stats_pb2.py failed: (Segmentation fault): protoc failed: error executing command bazel-out/host/bin/external/com_google_protobuf/protoc '--python_out=bazel-out/darwin-opt/bin' -I. -Iexternal/com_google_protobuf/python -Ibazel-out/darwin-opt/bin/external/com_google_protobuf/python ... (remaining 1 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
Target //package:move_generated_files failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0,617s, Critical Path: 0,06s
INFO: 5 processes: 5 internal.
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py", line 152, in <module>
    setup(
  File "/Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/setuptools/__init__.py", line 159, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/setuptools/command/install.py", line 68, in run
    return orig.install.run(self)
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/install.py", line 546, in run
    self.run_command('build')
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py", line 86, in run
    subprocess.check_call(
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/bazel', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '--macos_minimum_os=10.9', '//package:move_generated_files']' returned non-zero exit status 1.
----------------------------------------

Rolling back uninstall of tensorflow-gnn
Moving to /Users/mess/dev/tf_gnn/.venv/bin/tfgnn_generate_training_data
from /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-uninstall-x1qgplh2/tfgnn_generate_training_data
Moving to /Users/mess/dev/tf_gnn/.venv/bin/tfgnn_print_training_data
from /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-uninstall-x1qgplh2/tfgnn_print_training_data
Moving to /Users/mess/dev/tf_gnn/.venv/bin/tfgnn_sampled_stats
from /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-uninstall-x1qgplh2/tfgnn_sampled_stats
Moving to /Users/mess/dev/tf_gnn/.venv/bin/tfgnn_validate_graph_schema
from /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-uninstall-x1qgplh2/tfgnn_validate_graph_schema
Moving to /Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/tensorflow_gnn-0.1.0.dist-info/
from /Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/~ensorflow_gnn-0.1.0.dist-info
Moving to /Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/tensorflow_gnn/
from /Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/~ensorflow_gnn
ERROR: Command errored out with exit status 1: /Users/mess/dev/tf_gnn/.venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py'"'"'; file='"'"'/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-record-n5tjgybo/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mess/dev/tf_gnn/.venv/include/site/python3.9/tensorflow-gnn Check the logs for full command output.

How to get node_set_name dynamic?

tfgnn.gather_first_node(
graph_tensor, node_set_name=node_set_name, feature_name='label'
)

The node_set_name is dynamic for multiple node sets in a graph tensor, how to get the node set name dynamic?

Question about classification of paths in a graph

Hi,

I want to build a model that would classify paths in a graph. My current idea is to store in the GraphSchema context sequences of nodes indices with labels, then in the readout stage extract hidden edge features by these indices into a new sequence and then process that sequence with some Recurrent or Attention layer.

I wonder, would this idea work? My concern is that graph merging procedure that is made in batching would make indices invalid.

examples/in_memory programs import functions incorrectly.

In the examples/in_memory/tf_trainer.py file are the following lines (30-32).

from tensorflow_gnn.examples.in_memory import datasets
from tensorflow_gnn.examples.in_memory import models
from tensorflow_gnn.examples.in_memory import reader_utils

The tfgnn installed package doesn't have an examples directory so these lines fail. Removing the strings from tensorflow_gnn.examples.in_memory , and importing locally will run.

installation fails for tensorflow-gpu

When attempting to install from pip I get this error:

Could not find a version that satisfies the requirement tensorflow-cpu>=2.7.0 (from tensorflow-gnn) (from versions: 2.8.0rc0)

Admittedly, I have tensorflow-gpu installed. Is this library supposed to be specific to the cpu version?

setup error

bazel 1.0.0

unbutu: Ubuntu 5.4.0-6ubuntu1~16.04.10

tensorflow: 2.7

python: 3.9.6

When i execute the statement "python3 -m pip install ." I got the error as follow:

Requirement already satisfied: absl-py in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (1.0.0)
Requirement already satisfied: apache-beam[gcp]>=2.32 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (2.34.0)
Requirement already satisfied: grpcio in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (1.42.0)
Requirement already satisfied: matplotlib in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (3.5.0)
Requirement already satisfied: mock in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (4.0.3)
Requirement already satisfied: networkx in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (2.6.3)
Requirement already satisfied: numpy in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (1.20.3)
Requirement already satisfied: protobuf>=3.17 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (3.19.1)
Requirement already satisfied: pyarrow in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (5.0.0)
Requirement already satisfied: pygraphviz in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (1.7)
Requirement already satisfied: scipy in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (1.7.3)
Requirement already satisfied: six in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (1.16.0)
Requirement already satisfied: tensorflow-cpu>=2.7.0 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-gnn==0.1.0) (2.7.0)
Requirement already satisfied: avro-python3!=1.9.2,<1.10.0,>=1.8.1 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.9.2.1)
Requirement already satisfied: crcmod<2.0,>=1.7 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.7)
Requirement already satisfied: dill<0.3.2,>=0.3.1.1 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.3.1.1)
Requirement already satisfied: fastavro<2,>=0.21.4 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.4.7)
Requirement already satisfied: future<1.0.0,>=0.18.2 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.18.2)
Requirement already satisfied: hdfs<3.0.0,>=2.1.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.6.0)
Requirement already satisfied: httplib2<0.20.0,>=0.8 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.19.1)
Requirement already satisfied: pymongo<4.0.0,>=3.8.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (3.12.1)
Requirement already satisfied: oauth2client<5,>=2.0.1 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (4.1.3)
Requirement already satisfied: pydot<2,>=1.2.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.4.2)
Requirement already satisfied: python-dateutil<3,>=2.8.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.8.2)
Requirement already satisfied: pytz>=2018.3 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2021.3)
Requirement already satisfied: requests<3.0.0,>=2.24.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.26.0)
Requirement already satisfied: typing-extensions<4,>=3.7.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (3.10.0.2)
Requirement already satisfied: orjson<4.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (3.6.4)
Requirement already satisfied: cachetools<5,>=3.1.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (4.2.4)
Requirement already satisfied: google-apitools<0.5.32,>=0.5.31 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.5.31)
Requirement already satisfied: google-auth<3,>=1.18.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.35.0)
Requirement already satisfied: google-cloud-datastore<2,>=1.8.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.15.3)
Requirement already satisfied: google-cloud-pubsub<2,>=0.39.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.7.0)
Requirement already satisfied: google-cloud-bigquery<3,>=1.6.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.30.1)
Requirement already satisfied: google-cloud-bigquery-storage>=2.6.3 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.10.1)
Requirement already satisfied: google-cloud-core<2,>=0.28.1 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.7.2)
Requirement already satisfied: google-cloud-bigtable<2,>=0.31.1 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.7.0)
Requirement already satisfied: google-cloud-spanner<2,>=1.13.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.19.1)
Requirement already satisfied: grpcio-gcp<1,>=0.2.2 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.2.2)
Requirement already satisfied: google-cloud-dlp<2,>=0.12.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.0.0)
Requirement already satisfied: google-cloud-language<2,>=1.3.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.3.0)
Requirement already satisfied: google-cloud-videointelligence<2,>=1.8.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.16.1)
Requirement already satisfied: google-cloud-vision<2,>=0.38.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.0.0)
Requirement already satisfied: google-cloud-recommendations-ai<=0.2.0,>=0.1.0 in /usr/local/python3/lib/python3.9/site-packages (from apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.2.0)
Requirement already satisfied: fasteners>=0.14 in /usr/local/python3/lib/python3.9/site-packages (from google-apitools<0.5.32,>=0.5.31->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.16.3)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/python3/lib/python3.9/site-packages (from google-auth<3,>=1.18.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.2.8)
Requirement already satisfied: setuptools>=40.3.0 in /usr/local/python3/lib/python3.9/site-packages (from google-auth<3,>=1.18.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (56.0.0)
Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/python3/lib/python3.9/site-packages (from google-auth<3,>=1.18.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (4.8)
Requirement already satisfied: google-resumable-media<3.0dev,>=0.6.0 in /usr/local/python3/lib/python3.9/site-packages (from google-cloud-bigquery<3,>=1.6.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.1.0)
Requirement already satisfied: google-api-core[grpc]<3.0.0dev,>=1.29.0 in /usr/local/python3/lib/python3.9/site-packages (from google-cloud-bigquery<3,>=1.6.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.31.4)
Requirement already satisfied: proto-plus>=1.10.0 in /usr/local/python3/lib/python3.9/site-packages (from google-cloud-bigquery<3,>=1.6.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.19.8)
Requirement already satisfied: packaging>=14.3 in /usr/local/python3/lib/python3.9/site-packages (from google-cloud-bigquery<3,>=1.6.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (21.3)
Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.6.0 in /usr/local/python3/lib/python3.9/site-packages (from google-api-core[grpc]<3.0.0dev,>=1.29.0->google-cloud-bigquery<3,>=1.6.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.53.0)
Requirement already satisfied: libcst>=0.2.5 in /usr/local/python3/lib/python3.9/site-packages (from google-cloud-bigquery-storage>=2.6.3->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.3.23)
Requirement already satisfied: grpc-google-iam-v1<0.13dev,>=0.12.3 in /usr/local/python3/lib/python3.9/site-packages (from google-cloud-bigtable<2,>=0.31.1->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.12.3)
Requirement already satisfied: google-crc32c<2.0dev,>=1.0 in /usr/local/python3/lib/python3.9/site-packages (from google-resumable-media<3.0dev,>=0.6.0->google-cloud-bigquery<3,>=1.6.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.3.0)
Requirement already satisfied: docopt in /usr/local/python3/lib/python3.9/site-packages (from hdfs<3.0.0,>=2.1.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.6.2)
Requirement already satisfied: pyparsing<3,>=2.4.2 in /usr/local/python3/lib/python3.9/site-packages (from httplib2<0.20.0,>=0.8->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.4.7)
Requirement already satisfied: typing-inspect>=0.4.0 in /usr/local/python3/lib/python3.9/site-packages (from libcst>=0.2.5->google-cloud-bigquery-storage>=2.6.3->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.7.1)
Requirement already satisfied: pyyaml>=5.2 in /usr/local/python3/lib/python3.9/site-packages (from libcst>=0.2.5->google-cloud-bigquery-storage>=2.6.3->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (6.0)
Requirement already satisfied: pyasn1>=0.1.7 in /usr/local/python3/lib/python3.9/site-packages (from oauth2client<5,>=2.0.1->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.4.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/python3/lib/python3.9/site-packages (from requests<3.0.0,>=2.24.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2021.10.8)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/python3/lib/python3.9/site-packages (from requests<3.0.0,>=2.24.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (1.26.7)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/python3/lib/python3.9/site-packages (from requests<3.0.0,>=2.24.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/python3/lib/python3.9/site-packages (from requests<3.0.0,>=2.24.0->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (2.0.8)
Requirement already satisfied: h5py>=2.9.0 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (3.6.0)
Requirement already satisfied: keras<2.8,>=2.7.0rc0 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (2.7.0)
Requirement already satisfied: astunparse>=1.6.0 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.6.3)
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.1.0)
Requirement already satisfied: gast<0.5.0,>=0.2.1 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (0.4.0)
Requirement already satisfied: wrapt>=1.11.0 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.13.3)
Requirement already satisfied: wheel<1.0,>=0.32.0 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (0.37.0)
Requirement already satisfied: google-pasta>=0.1.1 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (0.2.0)
Requirement already satisfied: flatbuffers<3.0,>=1.12 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (2.0)
Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.21.0 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (0.22.0)
Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (3.3.0)
Requirement already satisfied: tensorflow-estimator<2.8,=2.7.0rc0 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (2.7.0)
Requirement already satisfied: tensorboard
=2.6 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (2.7.0)
Requirement already satisfied: keras-preprocessing>=1.1.1 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.1.2)
Requirement already satisfied: libclang>=9.0.1 in /usr/local/python3/lib/python3.9/site-packages (from tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (12.0.0)
Requirement already satisfied: markdown>=2.6.8 in /usr/local/python3/lib/python3.9/site-packages (from tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (3.3.6)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/python3/lib/python3.9/site-packages (from tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (0.4.6)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /usr/local/python3/lib/python3.9/site-packages (from tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (0.6.1)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/python3/lib/python3.9/site-packages (from tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.8.0)
Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/python3/lib/python3.9/site-packages (from tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (2.0.2)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/python3/lib/python3.9/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (1.3.0)
Requirement already satisfied: importlib-metadata>=4.4 in /usr/local/python3/lib/python3.9/site-packages (from markdown>=2.6.8->tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (4.8.2)
Requirement already satisfied: zipp>=0.5 in /usr/local/python3/lib/python3.9/site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (3.6.0)
Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/python3/lib/python3.9/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.6->tensorflow-cpu>=2.7.0->tensorflow-gnn==0.1.0) (3.1.1)
Requirement already satisfied: mypy-extensions>=0.3.0 in /usr/local/python3/lib/python3.9/site-packages (from typing-inspect>=0.4.0->libcst>=0.2.5->google-cloud-bigquery-storage>=2.6.3->apache-beam[gcp]>=2.32->tensorflow-gnn==0.1.0) (0.4.3)
Requirement already satisfied: fonttools>=4.22.0 in /usr/local/python3/lib/python3.9/site-packages (from matplotlib->tensorflow-gnn==0.1.0) (4.28.2)
Requirement already satisfied: cycler>=0.10 in /usr/local/python3/lib/python3.9/site-packages (from matplotlib->tensorflow-gnn==0.1.0) (0.11.0)
Requirement already satisfied: pillow>=6.2.0 in /usr/local/python3/lib/python3.9/site-packages (from matplotlib->tensorflow-gnn==0.1.0) (8.4.0)
Requirement already satisfied: setuptools-scm>=4 in /usr/local/python3/lib/python3.9/site-packages (from matplotlib->tensorflow-gnn==0.1.0) (6.3.2)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/python3/lib/python3.9/site-packages (from matplotlib->tensorflow-gnn==0.1.0) (1.3.2)
Requirement already satisfied: tomli>=1.0.0 in /usr/local/python3/lib/python3.9/site-packages (from setuptools-scm>=4->matplotlib->tensorflow-gnn==0.1.0) (1.2.2)
Building wheels for collected packages: tensorflow-gnn
Building wheel for tensorflow-gnn (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-nf5s7_74/setup.py'"'"'; file='"'"'/tmp/pip-req-build-nf5s7_74/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-8jo1b0me
cwd: /tmp/pip-req-build-nf5s7_74/
Complete output (35 lines):
running bdist_wheel
running build
running bazel_build
Starting local Bazel server and connecting to it...
ERROR: Unrecognized option: --experimental_repo_remote_exec
INFO: Writing tracer profile to '/root/.cache/bazel/_bazel_root/958b14b9bd3acfff4092d0b52e211899/command.profile.gz'
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-nf5s7_74/setup.py", line 152, in
setup(
File "/usr/local/python3/lib/python3.9/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/python3/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/python3/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/python3/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/python3/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/usr/local/python3/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/python3/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/python3/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/python3/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/python3/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-nf5s7_74/setup.py", line 86, in run
subprocess.check_call(
File "/usr/local/python3/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/bazel', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '//package:move_generated_files']' returned non-zero exit status 2.

ERROR: Failed building wheel for tensorflow-gnn
Running setup.py clean for tensorflow-gnn
Failed to build tensorflow-gnn
Installing collected packages: tensorflow-gnn
Running setup.py install for tensorflow-gnn ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-nf5s7_74/setup.py'"'"'; file='"'"'/tmp/pip-req-build-nf5s7_74/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-rsfpi3kt/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/python3/include/python3.9/tensorflow-gnn
cwd: /tmp/pip-req-build-nf5s7_74/
Complete output (36 lines):
running install
running build
running bazel_build
ERROR: Unrecognized option: --experimental_repo_remote_exec
INFO: Writing tracer profile to '/root/.cache/bazel/_bazel_root/958b14b9bd3acfff4092d0b52e211899/command.profile.gz'
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-nf5s7_74/setup.py", line 152, in
setup(
File "/usr/local/python3/lib/python3.9/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/python3/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/python3/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/python3/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/python3/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/local/python3/lib/python3.9/distutils/command/install.py", line 546, in run
self.run_command('build')
File "/usr/local/python3/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/python3/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/python3/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/python3/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/python3/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-nf5s7_74/setup.py", line 86, in run
subprocess.check_call(
File "/usr/local/python3/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/bazel', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '//package:move_generated_files']' returned non-zero exit status 2.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-nf5s7_74/setup.py'"'"'; file='"'"'/tmp/pip-req-build-nf5s7_74/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-rsfpi3kt/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/python3/include/python3.9/tensorflow-gnn Check the logs for full command output.

Imports

Hi, I am following your tutorials on Colab to start diving into GNN, but the code doesn't allow me to import tensorflow_gnn.in_memory and I get the error ModuleNotFoundError: No module named 'tensorflow_gnn.in_memory'.

Recommended way to save graph data on TFRecords

Hey,
I saw that in the examples you saved the data not in TFRecords. I am working on a project where we save the dataset on TFRecords. We have a lot of graphs and we save each graph in 1 TFRecord at the moment. The bottleneck is the time to load the TFRecord, so we are thinking to save multiple graphs in 1 TFRecord. What is the recommended way to do this? In the latter case, the issue is when we load using tf.data.Dataset, we can't find a way to batch them per graph (since we want to load 1 batch = 1 entire graph otherwise the graphs will be truncated). Do you have any idea? Thanks

To use local file

How to use local file tensorflow-2.7.0.tar.gz and DO NOT download from below bazel settings:

"""Dependency on TensorFlow for build."""

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

def tf_setup():
"""Define tensorflow>=2.7.0 dependency for Bazel build."""
http_archive(
name = "org_tensorflow",
sha256 = "41b32eeaddcbc02b0583660bcf508469550e4cd0f86b22d2abe72dfebeacde0f",
urls = [
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.7.0.tar.gz",
],
strip_prefix = "tensorflow-2.7.0",
)

The tutorial code in document data_prep.md doesn't work

In the doc 'data_prep.md' , it seems like the code piece graph = tfgnn.random_graph_tensor_from_schema(schema) in the first code block raises an error that there's no such callable function (with tfgnn version=0.3.0).

details:

AttributeError: module 'tensorflow_gnn' has no attribute 'random_graph_tensor_from_schema'

Link Detection

Hi,

Sorry if I've missed it but I'm looking for examples or docs around building a gnn for link detection. The docs that I've found center around node / context classification. Is link classification supported? Are there examples available for this sort of task using tf-gnn yet?

Thanks,
Tim

How to calculate similarity between the two graphs?

I have to learn similarity between graphs using deep learning. I have many samples (~500k) of graphs. Graphs have ~5000 nodes and ~4000 edges in the average.

How can I compute similarity score between two graphs? I am thinking:

  • convert graphs into vectors using Graph2Vec embedding
  • then compare them using various similarity calculating techniques like cosine similarity.

I would really appreciate if I can get some feedback whether this is the correct way to approach this problem or not.

Apple M1 installation issue

I'm trying to install tensoflow_gnn on my apple m1 but I got the error message:

`beppe2hd@192 gnnInvestigation % pip install tensorflow_gnn
Collecting tensorflow_gnn
Using cached tensorflow_gnn-0.2.1-py3-none-any.whl (364 kB)
Collecting pyarrow
Using cached pyarrow-9.0.0-cp39-cp39-macosx_11_0_arm64.whl (21.6 MB)
Collecting apache-beam
Using cached apache-beam-2.40.0.zip (2.8 MB)
Preparing metadata (setup.py) ... done
Collecting networkx
Using cached networkx-2.8.5-py3-none-any.whl (2.0 MB)
Collecting tensorflow_gnn
Using cached tensorflow_gnn-0.2.0-py3-none-any.whl (364 kB)
Using cached tensorflow_gnn-0.1.0-py3-none-any.whl (196 kB)
Collecting scipy
Using cached scipy-1.9.0-cp39-cp39-macosx_12_0_arm64.whl (29.9 MB)
Collecting matplotlib
Downloading matplotlib-3.5.3-cp39-cp39-macosx_11_0_arm64.whl (7.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.2/7.2 MB 6.5 MB/s eta 0:00:00
Requirement already satisfied: numpy in /Users/beppe2hd/miniforge3/envs/gnnInvestigation/lib/python3.9/site-packages (from tensorflow_gnn) (1.22.4)
Requirement already satisfied: protobuf>=3.17 in /Users/beppe2hd/miniforge3/envs/gnnInvestigation/lib/python3.9/site-packages (from tensorflow_gnn) (3.19.4)
Collecting pygraphviz
Downloading pygraphviz-1.9.zip (119 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 119.9/119.9 kB 2.9 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: six in /Users/beppe2hd/miniforge3/envs/gnnInvestigation/lib/python3.9/site-packages (from tensorflow_gnn) (1.15.0)
Requirement already satisfied: grpcio in /Users/beppe2hd/miniforge3/envs/gnnInvestigation/lib/python3.9/site-packages (from tensorflow_gnn) (1.48.0)
ERROR: Cannot install tensorflow-gnn==0.1.0, tensorflow-gnn==0.2.0 and tensorflow-gnn==0.2.1 because these package versions have conflicting dependencies.

The conflict is caused by:
tensorflow-gnn 0.2.1 depends on tensorflow>=2.7.0
tensorflow-gnn 0.2.0 depends on tensorflow>=2.7.0
tensorflow-gnn 0.1.0 depends on tensorflow-cpu>=2.7.0

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts`

I'm currently used the tensoflow installation proposed at https://developer.apple.com/metal/tensorflow-plugin/ that install the version 2.9.2
import tensorflow as tf tf.__version__ '2.9.2'

but it seems that tensor flow gun does not correctly detect the tensor flow version.

Also the manual installation produce similar error

Is there a readthedocs.io docs website coming soon?

Hello!

Thanks for building this 😄 I was hoping to know when there'll be a documentation website (say, something on readthedocs.io). I'm aware that there are markdown files in docs/ but it'd be awesome to have a docs site to see things more clearly.

I'm available to help develop the docs if needed as well.

Thanks!

Serving model with kserve

Hi Team,

I am looking for the serving gnn model with kserve. Also, it is possible to take list or numpy array as a input while preprocessing.
Actually, I want to pass list as input and while serving that list got converted into json which is the input for the request.post in kserving.

I am following below pattern.
image

tensorflow:Gradients do not exist for variables

When I try to change the feature name from hidden_state to other, i meet a mistake. The program shows that WARNING:tensorflow:Gradients do not exist for variables ['gnn/essay_model/graph_update/edge_set_update/next_state_from_concat/dense_3/kernel:0', 'gnn/essay_model/graph_update/edge_set_update/next_state_from_concat/dense_3/bias:0', 'gnn/essay_model/graph_update/node_set_update/next_state_from_concat_1/dense_4/kernel:0', 'gnn/essay_model/graph_update/node_set_update/next_state_from_concat_1/dense_4/bias:0'] when minimizing the loss. If you're using model.compile(), did you forget to provide a lossargument?

following is error code:

node_set = tfgnn.NodeSet.from_fields(
                sizes=[node_num],
                features={
                    'node_feature': node_feature, 
                }
            )

edge_set = tfgnn.EdgeSet.from_fields(
                sizes=[edge_num],
                features={
                    'edge_feature': tf.convert_to_tensor(edge_feature, dtype=tf.float32)},
                adjacency=tfgnn.Adjacency.from_indices(
                    source=('node', adjacency[:, 0]),
                    target=('node', adjacency[:, 1])
                ),
            )

context = tfgnn.Context.from_fields(features=None)

graph_tensor = tfgnn.GraphTensor.from_pieces(
                node_sets={'node': node_set},
                edge_sets={'edge': edge_set},
                context=context,
            )



model = tfgnn.keras.layers.GraphUpdate(
            edge_sets={
                "edge": tfgnn.keras.layers.EdgeSetUpdate(
                    edge_input_feature=['edge_feature'],
                    node_input_feature='node_feature',
                    next_state=tfgnn.keras.layers.NextStateFromConcat(tf.keras.layers.Dense(2)))
            },
            node_sets={
                "node": tfgnn.keras.layers.NodeSetUpdate(
                    edge_set_inputs={"edge": tfgnn.keras.layers.Pool(tfgnn.TARGET, "sum")},
                    node_input_feature='node_feature',
                    next_state=tfgnn.keras.layers.NextStateFromConcat(
                        tf.keras.layers.Dense(264)
                    ),
                )
            },
        )

however, when i use the hidden_state as the feature name, i will not meet this question. following is code

node_set = tfgnn.NodeSet.from_fields(
                sizes=[node_num],
                features={
                    'hidden_state': node_feature, 
                }
            )

edge_set = tfgnn.EdgeSet.from_fields(
                sizes=[edge_num],
                features={
                    'hidden_state': tf.convert_to_tensor(edge_feature, dtype=tf.float32)},
                adjacency=tfgnn.Adjacency.from_indices(
                    source=('node', adjacency[:, 0]),
                    target=('node', adjacency[:, 1])
                ),
            )

context = tfgnn.Context.from_fields(features=None)

graph_tensor = tfgnn.GraphTensor.from_pieces(
                node_sets={'node': node_set},
                edge_sets={'edge': edge_set},
                context=context,
            )



model = tfgnn.keras.layers.GraphUpdate(
           
     edge_sets={
                "edge": tfgnn.keras.layers.EdgeSetUpdate(
                    next_state=tfgnn.keras.layers.NextStateFromConcat(tf.keras.layers.Dense(2)))
            },
            node_sets={
                "node": tfgnn.keras.layers.NodeSetUpdate(
                    edge_set_inputs={"edge": tfgnn.keras.layers.Pool(tfgnn.TARGET, "sum")}
                    next_state=tfgnn.keras.layers.NextStateFromConcat(
                        tf.keras.layers.Dense(264)
                    ),
                )
            },
        )


I do not understand why this question happend. And how could i solve this question?

I am forward to your help. Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.