code: def get_idx(self, arr:Collection, is_item:bool=True):
          "Fetch item or user (based on `is_item`) for all in `arr`. (Set model to `cpu` and no grad.)"
          m = self.model.eval().cpu()
          requires_grad(m,False)
          u_class,i_class = self.data.train_ds.x.classes.values()
          classes = i_class if is_item else u_class
          c2i = {v:k for k,v in enumerate(classes)}
          try: return tensor([c2i[o] for o in arr])
          except Exception as e: 
              print(f)
docs: Fetch item or user (based on `is_item`) for all in `arr`. (Set model to `cpu` and no grad.)