Skip to content

Conversation

@yu-ta-sato
Copy link
Collaborator

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:

  • Updated the type of edge_feature_cols in constructors and functions (e.g., __init__ in city2graph/base.py and city2graph/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]
  • Modified docstrings and comments to clarify that edge_feature_cols and related arguments should be keyed by edge type tuples, not relation strings, for heterogeneous graphs. [1] [2] [3] [4] [5]

Internal logic changes:

  • Changed logic in _process_hetero_edges and _extract_features to always look up feature columns by the full edge type tuple, ensuring correct feature extraction for all edge types. [1] [2]

Function argument consistency:

  • Updated function signatures for pyg_to_gdf, pyg_to_nx, and related functions to require additional_edge_cols dictionaries keyed by edge type tuples for heterogeneous graphs. [1] [2] [3]

Test updates:

  • Modified tests to use full edge type tuples when specifying edge feature columns and additional edge columns, ensuring test coverage matches the new requirements. [1] [2]

Related Issues

Is this pull request related to any existing issues? If so, please link them here. For example, Fixes #123 or Closes #456.

Checklist

  • I have read the Contributing Guide.
  • I have updated the documentation, if necessary.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • Pre-commit checks passed locally.

@yu-ta-sato yu-ta-sato merged commit d9f59b0 into main Jan 7, 2026
7 checks passed
@yu-ta-sato yu-ta-sato deleted the fix_edge_feature_cols branch January 7, 2026 04:11
@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant