def __init__(self, k):
    """Sets the value of k to track up to.

    Args:
      k (int): metric tracks top-1 to top-k.
    """
    self._k = k
    self._num_top_i_successes = {"total": [0] * k, "eviction": [0] * k}
    self._num_accesses = {"total": 0, "eviction": 0}