Fix edge_feature_cols in gdf_to_pyg and #104
Merged
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.
Description
Updates how edge feature columns are specified and handled throughout the codebase to improve consistency and correctness for heterogeneous graphs. The main change is that edge feature columns are now always keyed by the full edge type tuple (
(src, relation, dst)) instead of just the relation string.Edge feature column specification and usage:
edge_feature_colsin constructors and functions (e.g.,__init__incity2graph/base.pyandcity2graph/graph.py,gdf_to_pyg,_process_hetero_edges,_store_hetero_metadata, etc.) to require dictionaries keyed by full edge type tuples for heterogeneous graphs. [1] [2] [3] [4] [5]edge_feature_colsand related arguments should be keyed by edge type tuples, not relation strings, for heterogeneous graphs. [1] [2] [3] [4] [5]Internal logic changes:
_process_hetero_edgesand_extract_featuresto always look up feature columns by the full edge type tuple, ensuring correct feature extraction for all edge types. [1] [2]Function argument consistency:
pyg_to_gdf,pyg_to_nx, and related functions to requireadditional_edge_colsdictionaries keyed by edge type tuples for heterogeneous graphs. [1] [2] [3]Test updates:
Related Issues
Is this pull request related to any existing issues? If so, please link them here. For example,
Fixes #123orCloses #456.Checklist