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

Overview

TensorFlow GNN

This is an early (alpha) release to get community feedback. It's under active development and we may break API compatibility in the future.

TensorFlow GNN is a library to build Graph Neural Networks on the TensorFlow platform. It contains the following components:

  • A high-level Keras-style API to create GNN models that can easily be composed with other types of models. GNNs are often used in combination with ranking, deep-retrieval (dual-encoders) or mixed with other types of models (image, text, etc.)

  • GNN API for heterogeneous graphs. Many of the graph problems we approach at Google and in the real world contain different types of nodes and edges. Hence the emphasis in heterogeneous models.

  • A well-defined schema to declare the topology of a graph, and tools to validate it. It describes the shape of its training data and serves to guide other tools.

  • A GraphTensor composite tensor type which holds graph data, can be batched, and has efficient graph manipulation functionality available.

  • A library of operations on the GraphTensor structure:

    • Various efficient broadcast and pooling operations on nodes and edges, and related tools.

    • A library of standard baked convolutions, that can be easily extended by ML engineers/researchers.

    • A high-level API for product engineers to quickly build GNN models without necessarily worrying about its details.

  • A set of tools used to convert graph datasets and sample from large graphs.

  • An encoding of graph-shaped training data on file, as well as a library used to parse this data into a data structure your model can extract the various features.

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.

Installation Instructions

Installation from source.

This is currently the only way to install the preview release of tensorflow_gnn. A virtual environment is highly recommended.

  1. Clone tensorflow_gnn

    $> git clone https://github.com/tensorflow/gnn.git tensorflow_gnn

  2. Install TensorFlow

    TF-GNN currently uses tf.ExtensionTypes, which is a feature of TensorFlow 2.7. As such, you will need to install TensorFlow build, following the instructions here: https://www.tensorflow.org/install/pip.

    $> pip install tensorflow

  3. Install Bazel

    Bazel is required to build the source of this package. Follow the instructions here to install Bazel for your OS: https://docs.bazel.build/versions/main/install.html

  4. Install GraphViz

    This package uses GraphViz for visualization tools. Installation instructions vary depending on your operating system. E.g. for Ubuntu:

    $> sudo apt-get install graphviz graphviz-dev

  5. Install tensorflow_gnn

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

Comments
  • Examples graphs

    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!

    opened by loretoparisi 18
  • Issues installing from source on macOS Big Sur 11.5.2

    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!

    opened by rish-16 15
  • ModuleNotFoundError: No module named 'tensorflow_gnn.proto.graph_schema_pb2'

    ModuleNotFoundError: No module named 'tensorflow_gnn.proto.graph_schema_pb2'

    ModuleNotFoundError: No module named 'tensorflow_gnn.proto.graph_schema_pb2' when run gat_v2_test.py. Where is the graph_schema_pb2 file? it is py or proto file?

    opened by SidneyLann 12
  • To use local file

    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", )

    opened by SidneyLann 9
  • Normal Installation Fails

    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.

    opened by Jerry-Master 7
  • installation fails for tensorflow-gpu

    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?

    opened by BrannonKing 4
  • setup error

    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.

    opened by yifenzhong1920 4
  • Download from http://mirror.tensorflow.org/github.com/tensorflow/runtime/archive/b570a1921c9e55ac53c8972bd2bfd37cd0eb510d.tar.gz failed:

    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.

    opened by littleforce163 4
  • Indices too big

    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]

    opened by SidneyLan 3
  • Problems for binary heterogeneous graph classification with gat_v2.GATv2MPNNGraphUpdate

    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.

    opened by Hanc1999 2
  • How to get node_set_name dynamic?

    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?

    opened by SidneyLann 2
  • Understanding of

    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?

    opened by alem88 0
  • The tutorial code in document data_prep.md doesn't work

    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'

    opened by Hanc1999 1
  • How to use  tf.distribute.Strategy in TFGNN

    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.

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

    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]
    
    opened by ly3106 2
Releases(v0.4.1)
  • v0.4.1(Jan 6, 2023)

  • v0.4.0(Dec 16, 2022)

  • v0.4.0rc2(Nov 27, 2022)

  • v0.4.0rc1(Nov 27, 2022)

    Removes explicit requirement for google-vizier to stay compatible with google Colab.

    Full Changelog: https://github.com/tensorflow/gnn/compare/v0.4.0rc0...v0.4.0rc1

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0rc0(Nov 23, 2022)

    What's Changed

    • Expose tfgnn.dataset_from_generator helper. by @copybara-service in https://github.com/tensorflow/gnn/pull/115
    • Add triple converter for RDF-style input. by @copybara-service in https://github.com/tensorflow/gnn/pull/119
    • Doc fix: The the intro page describes GNNs in some generality. by @copybara-service in https://github.com/tensorflow/gnn/pull/123
    • Enables disabled runner tests from RNG changes in Keras by @copybara-service in https://github.com/tensorflow/gnn/pull/122
    • Fixes error with named features in homogeneous constructor by @copybara-service in https://github.com/tensorflow/gnn/pull/121
    • Let DatasetProviders raise FileNotFoundError if no files match pattern. by @copybara-service in https://github.com/tensorflow/gnn/pull/139
    • Helper function for random reordering within segment ids. by @copybara-service in https://github.com/tensorflow/gnn/pull/135
    • Updates Bazel dep to 2.8.0. by @copybara-service in https://github.com/tensorflow/gnn/pull/150
    • In a GraphTensor guide example, add tf.constant(...) to clarify by @copybara-service in https://github.com/tensorflow/gnn/pull/162
    • Shorten function name to_sampling_spec to build, maintaining backward-compatibility. by @copybara-service in https://github.com/tensorflow/gnn/pull/159
    • Add streaming API to read Unigraph artifacts (node sets, edge sets) as iterables. by @copybara-service in https://github.com/tensorflow/gnn/pull/166
    • Unsupervised (i.e.: model generated target vs. dataset generated label) refactors. by @copybara-service in https://github.com/tensorflow/gnn/pull/165
    • Check checkpoint_options.checkpoint_dir: it may be unfilled in a caller's checkpoint_options. by @copybara-service in https://github.com/tensorflow/gnn/pull/172
    • Multitask refactors. by @copybara-service in https://github.com/tensorflow/gnn/pull/181
    • s/class_id/sparse_class_id/g by @copybara-service in https://github.com/tensorflow/gnn/pull/189
    • Make runner/examples/ogbn/mag/train.py parametric in the GNN model type. by @copybara-service in https://github.com/tensorflow/gnn/pull/191
    • Fix typo. by @copybara-service in https://github.com/tensorflow/gnn/pull/192
    • Use strings to set BQ read method. by @copybara-service in https://github.com/tensorflow/gnn/pull/199
    • Fix a typo/ by @copybara-service in https://github.com/tensorflow/gnn/pull/206
    • Local tf import to avoid global session. by @copybara-service in https://github.com/tensorflow/gnn/pull/208

    Full Changelog: https://github.com/tensorflow/gnn/compare/v0.3.0...v0.4.0rc0

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Sep 20, 2022)

    What's Changed

    • An initial version of transformer-style multi-head attention. in https://github.com/tensorflow/gnn/pull/55
    • Add TPUStrategy support to the runner. in https://github.com/tensorflow/gnn/pull/51
    • Add a keys variant for transformer-style multi-head attention. in https://github.com/tensorflow/gnn/pull/56
    • Enable dataflow prime and add edge_aggregation_method choice to example. in https://github.com/tensorflow/gnn/pull/68
    • Fix typos in gnn_modelling.md by @dgoekmen in https://github.com/tensorflow/gnn/pull/70
    • In type spec deserialization, ensure class DType in https://github.com/tensorflow/gnn/pull/83
    • Integer mathematics (i.e., TPU-friendly) for adding self-loops on GraphTensors. in https://github.com/tensorflow/gnn/pull/75
    • Export symbol tfgnn.is_ragged_tensor(). in https://github.com/tensorflow/gnn/pull/87
    • Add per-class metrics for multi-class classification. in https://github.com/tensorflow/gnn/pull/81
    • Initial support for graph pieces shapes relaxation (nodes and edges). Helper function to easy dataset creation from scalar graph pieces generator. in https://github.com/tensorflow/gnn/pull/84
    • Adds tfgnn.keras.layers.AddSelfLoops in https://github.com/tensorflow/gnn/pull/86
    • Remove tfgnn.keras.layers.TotalSize in favor of .total_size and in https://github.com/tensorflow/gnn/pull/96
    • Improve the error message when num_classes and class_names are both None. in https://github.com/tensorflow/gnn/pull/99
    • Compute SizeConstraints for TPU padding before calling distribute_datasets_from_function. in https://github.com/tensorflow/gnn/pull/77
    • Builder pattern for SamplingSpec proto. in https://github.com/tensorflow/gnn/pull/104
    • Ensure that L2 regularization for GCN is correctly [de]serialized. in https://github.com/tensorflow/gnn/pull/105
    • Pin google-api-core version due to protobuf v4.21.0 tensorflow incompatibility. in https://github.com/tensorflow/gnn/pull/109

    New Contributors

    • @dgoekmen made their first contribution in https://github.com/tensorflow/gnn/pull/70

    Full Changelog: https://github.com/tensorflow/gnn/compare/v0.2.0.dev1...v0.3.0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.1(Jul 19, 2022)

    Removes GCP dependencies from setup.py and updates apache-beam.

    Full Changelog: https://github.com/tensorflow/gnn/compare/v0.2.0...v0.2.1

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Jul 4, 2022)

    Summary

    • Added 3 popular model architectures from literature (GATv2, GraphSAGE, and GCN) and a commonly-used MPNN architecture from within Google.
    • Adds an orchestrator toolkit for low-code solutions on common graph learning tasks
    • Added a flexible sampler implementation which supports edge-based and node-based sampling.

    Full Changelog: https://github.com/tensorflow/gnn/compare/v0.2.0.dev1...v0.2.0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0rc0(Jun 29, 2022)

  • v0.2.0.dev1(May 31, 2022)

    Pre-release for v0.2.0 of TensorFlow GNN with example models (GCN, GATv2, GraphSAGE) and a runner.

    This is a v0 release, with no API compatibility guarantees.

    Source code(tar.gz)
    Source code(zip)
Owner
null
DIR-GNN - Discovering Invariant Rationales for Graph Neural Networks

DIR-GNN "Discovering Invariant Rationales for Graph Neural Networks" (ICLR 2022)

Ying-Xin (Shirley) Wu 70 Nov 13, 2022
A graph neural network (GNN) model to predict protein-protein interactions (PPI) with no sample features

A graph neural network (GNN) model to predict protein-protein interactions (PPI) with no sample features

null 2 Jul 25, 2022
A Research-oriented Federated Learning Library and Benchmark Platform for Graph Neural Networks. Accepted to ICLR'2021 - DPML and MLSys'21 - GNNSys workshops.

FedGraphNN: A Federated Learning System and Benchmark for Graph Neural Networks A Research-oriented Federated Learning Library and Benchmark Platform

FedML-AI 175 Dec 1, 2022
A static analysis library for computing graph representations of Python programs suitable for use with graph neural networks.

python_graphs This package is for computing graph representations of Python programs for machine learning applications. It includes the following modu

Google Research 258 Dec 29, 2022
Lightweight library to build and train neural networks in Theano

Lasagne Lasagne is a lightweight library to build and train neural networks in Theano. Its main features are: Supports feed-forward networks such as C

Lasagne 3.8k Dec 29, 2022
Lightweight library to build and train neural networks in Theano

Lasagne Lasagne is a lightweight library to build and train neural networks in Theano. Its main features are: Supports feed-forward networks such as C

Lasagne 3.8k Feb 11, 2021
The source code of the paper "Understanding Graph Neural Networks from Graph Signal Denoising Perspectives"

GSDN-F and GSDN-EF This repository provides a reference implementation of GSDN-F and GSDN-EF as described in the paper "Understanding Graph Neural Net

Guoji Fu 18 Nov 14, 2022
Some tentative models that incorporate label propagation to graph neural networks for graph representation learning in nodes, links or graphs.

Some tentative models that incorporate label propagation to graph neural networks for graph representation learning in nodes, links or graphs.

zshicode 1 Nov 18, 2021
On Size-Oriented Long-Tailed Graph Classification of Graph Neural Networks

On Size-Oriented Long-Tailed Graph Classification of Graph Neural Networks We provide the code (in PyTorch) and datasets for our paper "On Size-Orient

Zemin Liu 4 Jun 18, 2022
QA-GNN: Question Answering using Language Models and Knowledge Graphs

QA-GNN: Question Answering using Language Models and Knowledge Graphs This repo provides the source code & data of our paper: QA-GNN: Reasoning with L

Michihiro Yasunaga 434 Jan 4, 2023
Distance Encoding for GNN Design

Distance-encoding for GNN design This repository is the official PyTorch implementation of the DEGNN and DEAGNN framework reported in the paper: Dista

null 172 Nov 8, 2022
Geometric Vector Perceptron --- a rotation-equivariant GNN for learning from biomolecular structure

Geometric Vector Perceptron Code to accompany Learning from Protein Structure with Geometric Vector Perceptrons by B Jing, S Eismann, P Suriana, RJL T

Dror Lab 85 Dec 29, 2022
GNN-based Recommendation Benchma

GRecX A Fair Benchmark for GNN-based Recommendation Preliminary Comparison DiffNet-Yelp dataset (featureless) Algo nDCG@5 nDCG@10 nDCG@15 MF 0.158707

null 73 Oct 17, 2022
Geometric Vector Perceptrons --- a rotation-equivariant GNN for learning from biomolecular structure

Geometric Vector Perceptron Implementation of equivariant GVP-GNNs as described in Learning from Protein Structure with Geometric Vector Perceptrons b

Dror Lab 142 Dec 29, 2022
TensorFlow Ranking is a library for Learning-to-Rank (LTR) techniques on the TensorFlow platform

TensorFlow Ranking is a library for Learning-to-Rank (LTR) techniques on the TensorFlow platform

null 2.6k Jan 4, 2023
Graph Neural Networks with Keras and Tensorflow 2.

Welcome to Spektral Spektral is a Python library for graph deep learning, based on the Keras API and TensorFlow 2. The main goal of this project is to

Daniele Grattarola 2.2k Jan 8, 2023
This is an open-source toolkit for Heterogeneous Graph Neural Network(OpenHGNN) based on DGL [Deep Graph Library] and PyTorch.

This is an open-source toolkit for Heterogeneous Graph Neural Network(OpenHGNN) based on DGL [Deep Graph Library] and PyTorch.

BUPT GAMMA Lab 519 Jan 2, 2023
An easy way to build PyTorch datasets. Modularly build datasets and automatically cache processed results

EasyDatas An easy way to build PyTorch datasets. Modularly build datasets and automatically cache processed results Installation pip install git+https

Ximing Yang 4 Dec 14, 2021
HeatNet is a python package that provides tools to build, train and evaluate neural networks designed to predict extreme heat wave events globally on daily to subseasonal timescales.

HeatNet HeatNet is a python package that provides tools to build, train and evaluate neural networks designed to predict extreme heat wave events glob

Google Research 6 Jul 7, 2022