Skip to content

Commit

Permalink
Merge branch 'master' into multi-task
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiang Song committed May 20, 2024
2 parents bcb9d1d + 001b43a commit 5db0f74
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions python/graphstorm/config/argument.py
Original file line number Diff line number Diff line change
Expand Up @@ -2040,9 +2040,16 @@ def target_etype(self):
def remove_target_edge_type(self):
""" Whether to remove the training target edge type for message passing.
Will set the fanout of training target edge type as zero
Will set the fanout of training target edge type as zero. Only used
with edge classification.
Only used with edge classification
If the edge classification is to predict the existence of an edge between
two nodes, we should remove the target edge in the message passing to
avoid information leak.
If it's to predict some attributes associated with an edge, we may not need
to remove the target edge.
Since we don't know what to predict, to be safe, we should remove the target
edge in message passing by default.
"""
# pylint: disable=no-member
if hasattr(self, "_remove_target_edge_type"):
Expand All @@ -2051,6 +2058,10 @@ def remove_target_edge_type(self):

# By default, remove training target etype during
# message passing to avoid information leakage
logging.warning("remove_target_edge_type is set to True by default. "
"If your edge classification task is not predicting "
"the existence of the target edge, we suggest you to "
"set it to False.")
return True

@property
Expand Down

0 comments on commit 5db0f74

Please sign in to comment.