class_docstr: Ranking model for groupwise scoring functions.
class_docstr_tok: ["Ranking","model","for","groupwise","scoring","functions","."]
docstr: Updates the internal scatter/gather indices.
docstr_tok: ["Updates","the","internal","scatter\/gather","indices","."]
code: def _update_scatter_gather_indices(self, is_valid, mode, params):
      """Updates the internal scatter/gather indices."""
      num_shuffles = _get_params(mode, params)
      if self._group_size == 1:
          shuffle = False
          num_shuffles = None
      elif mode == tf_estimator.ModeKeys.PREDICT:
          shuffle = num_shuffles is not None
      else:
          shuffle = True
  
      # Shuffle the indices the `num_shuffles` times and concat shuffled indices.
      num_shuffles = num_shuffles or 1
      assert num_shuffles > 0, "Invalid num_shuffles: {}".format(
          num_shuffles
      )
      if shuffle:
          tf.compat.v1.logging.info(
              "Number of shuffles: {}".format(num_shuffles)
          )
      indices_shuffled = []
      # Use fixed ops-level seeds so that the randomness is controlled by the
      # graph-level seed.
      for i in range(num_shuffles):
          indices_shuffled.append(
              _form_group_indices_nd(
                  is_valid,
                  self._group_size,
                  shuffle=shuffle,
                  seed=i + 77,
              )
          )
      feature_gather_indices_list, indices_mask_list = zip(
          *indices_shuffled
      )
      self._feature_gather_indices = tf.concat(
          feature_gather_indices_list, 1
      )
      self._indices_mask = tf.concat(indices_mask_list, 1)
      self._score_scatter_indices = self._feature_gather_indices
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import six
  import tensorflow
  from tensorflow import estimator
  from tensorflow.python.util import function_utils
  from tensorflow_ranking.python import feature
  from tensorflow_ranking.python import utils
label_desc: Use image node_id 2 for calling the _GroupwiseRankingModel obj's underlying member method code with example usage: obj._update_scatter_gather_indices(is_valid, mode, params) without return types