From 001b43a659062ad39a7923601eee6415c7268f36 Mon Sep 17 00:00:00 2001 From: "xiang song(charlie.song)" Date: Mon, 20 May 2024 09:58:14 -0700 Subject: [PATCH] Update docstring of remove_target_edge_type (#845) *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 --- python/graphstorm/config/argument.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/python/graphstorm/config/argument.py b/python/graphstorm/config/argument.py index 7955815d39..6e982c8fc8 100644 --- a/python/graphstorm/config/argument.py +++ b/python/graphstorm/config/argument.py @@ -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"): @@ -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