code: def nonref_concordance(
      logits: np.ndarray,
      one_hot_targets: np.ndarray,
  ) -> Dict[str, float]:
      """Computes non-reference concordance.
  
      Non reference concordance treats heterozygous and homozygous alternate
      genotypes as equivalent.
  
      Args:
        logits: float array; Output of model in shape [batch, ..., num_classes].
        one_hot_targets: Multi hot vector of shape [batch, ..., num_classes].
  
      Returns:
        The value of non reference concordance.
      """
  
      preds = np.not_equal(np.argmax(logits, axis=-1), 0)
      targets = np.not_equal(np.argmax(one_hot_targets, axis=-1), 0)
      correct = np.equal(preds, targets)
  
      return {
          "nonref_concordance": np.divide(np.sum(correct), len(preds))
      }
  
file_path: scenic/scenic/projects/svvit/metrics.py
imports: from typing import Optional, List, Dict
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: nonref_concordance(logits, one_hot_targets) and returns: dict