-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CS224W - Adds TransD KGE, and Bernoulli corruption strategy for all KGE #9864
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes pyg-team#9744 --------- Co-authored-by: rusty1s <[email protected]>
Before the fix, tensors can only be concatenated over `dim=0`. The `dim` argument was not used by any operation in the function. This update allows the tensors to be concatenated over any given dimension. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…am#9743) Provide a clear error message for error in pyg-team#4554
Matplotlib arrows don't have a source and a destination. They have a text and a dot. As the [example](https://matplotlib.org/stable/gallery/text_labels_and_annotations/fancyarrow_demo.html) shows, a `<-` arrow points from the dot to the text and `->` points from the text to the dot. <img width="153" alt="Screenshot 2024-11-11 at 15 47 24" src="https://github.com/user-attachments/assets/7a8333d3-6c58-46b2-a47b-ae6c6afff87d"> `_visualize_graph_via_networkx()` sets `xy=pos[src]` and `xytext=pos[dst]`, so we want arrows from the dot (`xy`) to the text (`xytext`). That's the `<-` arrow. This can also be confirmed by comparing the visualization to the GraphViz version. The arrows go the other way. Or just looking at the data and the picture, haha! It took me a while to figure out that it's not my graph that's messed up! 😅
…ral mesh elements (pyg-team#9776) Now transforms 2D triangular elements/faces with shape [3,n] to as well as 3D tetrahedral elements with shape [4,n] to edges of shape [2,n]. Including pytest case for face input with shape [4,n] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: rusty1s <[email protected]>
…pyg-team#9748) This patch adds support of torch_delaunay package, which works with Torch tensors. The new implementation uses `torch_delaunay` package if it is installed (by default), and then falls back to the `scipy` implementation otherwise. --------- Co-authored-by: rusty1s <[email protected]>
…yg-team#9756) Example use case: ```python from torch_geometric.utils import k_hop_subgraph import torch edge_index = torch.tensor([[1, 2, 3], [0, 1, 1]]) # get the 2-hop neighbors of node 0 in the directed graph. _, edge_index, _, edge_mask = k_hop_subgraph(0, 2, edge_index, relabel_nodes=False, directed=True) ``` This gives the following result: Expected Outcome: ```python >>> edge_index tensor([[1, 2, 3], [0, 1, 1]]) >>> edge_mask tensor([True, True, True]) ``` Actual Outcome: ```python >>> edge_index tensor([[2, 3], [1, 1]]) >>> edge_mask tensor([False, True, True]) ``` This stems from the fact that the line `torch.index_select(node_mask, 0, row, out=edge_mask)` overwrites `edge_mask`, effectively only marking the edges used in the final hop as `True`. To fix this, I have added `preserved_edge_mask ` that will mark the edges used in each hop as `True`. --------- Co-authored-by: rusty1s <[email protected]>
Removes `TensorAttr.fully_specify` which was originally added in pyg-team#4534. --------- Co-authored-by: rusty1s <[email protected]>
Fixed the typo in the description of NeighborLoader.
reopened pyg-team#9591 Feature summary: - Add GLEM as GNN & LLM Co-training model to PyG - adapt GLEM's LM to AutoModelForSequenceClassification from transformers - Lora support - LM/LLM support - ogbn-products/ogbn-arxiv testing finished - TAGDataset can be used as a wrapper class for any node classification dataset in PyG with LM tokenizer and associate raw text - external prediction as pseudo labels supported --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Rishi Puri <[email protected]> Co-authored-by: Akihiro Nitta <[email protected]>
### Issue - pyg-team#9694 - pyg-team#9698 ### Feature Summary - Add `MoleculeGPTDataset` - Add `MoleculeGPT` as GNN & LLM Co-training model to PyG - Add an example for training and testing - Split the PR into 3 sub-PRs (pyg-team#9723, pyg-team#9724, pyg-team#9725) - Limited hardware resources, can't load `lmsys/vicuna-7b-v1.5`, use `TinyLlama/TinyLlama-1.1B-Chat-v0.1` instead, and the full training pipeline was not tested --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Giovanni Gatti <[email protected]> Co-authored-by: Rishi Puri <[email protected]>
### Issue - pyg-team#9694 - pyg-team#9700 ### Feature Summary - Add `GitMolDataset` - Add `GITMol` as GNN & LLM Co-training model to PyG - Add an example for pre-training - Limited hardware resources, so the full training pipeline was not tested - Multi modal cross attention shares the same weight, not aligned with the original paper --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Rishi Puri <[email protected]>
…xamples) (pyg-team#9666) Follow up to [PR 9597](pyg-team#9597). Includes multiple changes related to LLM+GNN experiments and scaling up to a remote backend. Including: - LargeGraphIndexer for building a large knowledge graph locally from multiple samples in an arbitrary dataset - Remote Backend Loader and examples for deploying a Retrieval algorithm to a third party backend FeatureStore or GraphStore - NVTX profiling tools for nsys users - Quality of Life improvements and benchmarking scripts for G-Retriever. Updates using these for WebQSP will be moved to a seperate PR UPDATE: PR is being broken up into smaller PRs. These can be previewed here: - zaristei#6 - zaristei#7 - zaristei#8 --------- Co-authored-by: Zack Aristei <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Zachary Aristei <[email protected]> Co-authored-by: Rishi Puri <[email protected]>
…ion (pyg-team#9807) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
baching -> batching
Updated to use new NGC CUDA DL base image. Some differences: 1. /workspace is the working directory 2. Python libs removed that were not included in NGC PyG image: `torch_scatter torch_sparse torch_cluster torch_spline_conv torchnet==0.0.4 h5py torchnet ` 3. Using latest stable versions for graphviz and torch --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Rishi Puri <[email protected]>
This reverts commit eef03e5.
Fix some issues with the docstrings of LargeGraphIndexer. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Zachary Aristei <[email protected]>
To avoid issues when node types contain the `EDGE_TYPE_STR_SPLIT` delimiter. --------- Co-authored-by: rusty1s <[email protected]>
This reverts commit e20f018.
Sorry for all the extra auto-added reviewers! Was trying to fix the timeline with suggestion in https://stackoverflow.com/questions/16306012/github-pull-request-showing-commits-that-are-already-in-target-branch Abandoning this in favor of #9866 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements TransD and Bernoulli corruption strategy (used in TransD and TransH papers).
Details
examples/kge_fb15k_237.py
, also adding duration calculation thereBenchmarks
I was only able to compare it to TransE on
examples/kge_fb15k_237.py
and do 3 runs each, but even without any hyperparameter tuning, findings seem fairly consistent with paper, i.e. significant improvements in all metrics [colab]: