graphlearn_torch/python/distributed/dist_link_neighbor_loader.py [130:142]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    if (self.neg_sampling is not None and self.neg_sampling.is_binary()
            and edge_label is not None and edge_label.min() == 0):
      # Increment labels such that `zero` now denotes "negative".
      edge_label = edge_label + 1

    if (self.neg_sampling is not None and self.neg_sampling.is_triplet()
        and edge_label is not None):
      raise ValueError("'edge_label' needs to be undefined for "
                       "'triplet'-based negative sampling. Please use "
                       "`src_index`, `dst_pos_index` and "
                       "`neg_pos_index` of the returned mini-batch "
                       "instead to differentiate between positive and "
                       "negative samples.")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



graphlearn_torch/python/loader/link_loader.py [120:132]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    if (self.neg_sampling is not None and self.neg_sampling.is_binary()
        and edge_label is not None and edge_label.min() == 0):
      # Increment labels such that `zero` now denotes "negative".
      edge_label = edge_label + 1

    if (self.neg_sampling is not None and self.neg_sampling.is_triplet()
            and edge_label is not None):
      raise ValueError("'edge_label' needs to be undefined for "
                        "'triplet'-based negative sampling. Please use "
                        "`src_index`, `dst_pos_index` and "
                        "`neg_pos_index` of the returned mini-batch "
                        "instead to differentiate between positive and "
                        "negative samples.")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



