pytorch_geometric
pytorch_geometric copied to clipboard
LLM-Enhanced Text-Attributed Graph (TAG) Representation Learning
PR for #9361.
I have skipped the Design Choices section from the README. You can find the Design Choices section here. I can include it if necessary.
Please let me know if any changes are required.
Pre-commit Issue
Due to the pre-commit configuration for the torch_geometric package, the isort hook removes the newline between the external library imports and the tape package library imports. For example, in train.py:
import copy
from dataclasses import is_dataclass
from typing import Optional
import numpy as np
import pandas as pd
import torch
from jsonargparse import ActionConfigFile, ArgumentParser
from tape.config import DatasetName, FeatureType
from tape.dataset.dataset import GraphDataset
from tape.dataset.llm.engine import LlmOfflineEngineArgs, LlmOnlineEngineArgs
from tape.dataset.lm_encoder import LmEncoderArgs
from tape.gnn_model import NodeClassifierArgs
from tape.trainer.gnn_trainer import GnnTrainer, GnnTrainerArgs
from tape.utils import profile_execution
It also disrupts the order of imports. For example, in gnn_trainer.py:
from dataclasses import dataclass
from typing import Literal, Optional
import torch
from tape.dataset.dataset import GraphDataset
from tape.gnn_model import NodeClassifier, NodeClassifierArgs
from torch_geometric.data import Data