Convert a value Slot to a Vid, recording it for later remapping.
(self, slot: Slot)
| 292 | return tid |
| 293 | |
| 294 | def slot_to_vid(self, slot: Slot) -> Vid: |
| 295 | """Convert a value Slot to a Vid, recording it for later remapping.""" |
| 296 | assert slot.id_type != IdType.Tensor |
| 297 | vid = Vid(idx=slot.idx) |
| 298 | self._vid_slot_map.append((vid, slot)) |
| 299 | return vid |
| 300 | |
| 301 | def to_int_or_vid(self, v: Union[int, Slot]) -> IntOrVid: |
| 302 | if isinstance(v, Slot): |
no test coverage detected