Skip to content

Commit

Permalink
Update docstring of remove_target_edge_type (#845)
Browse files Browse the repository at this point in the history
*Issue #, if available:*
#835 

*Description of changes:*


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.

---------

Co-authored-by: Xiang Song <[email protected]>
  • Loading branch information
classicsong and Xiang Song authored May 20, 2024
1 parent 1ba9928 commit 001b43a
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 @@ -1695,9 +1695,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 @@ -1706,6 +1713,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 001b43a

Please sign in to comment.