Convert a tensor Slot to a Tid, recording it for later remapping.
(self, slot: Slot)
| 284 | raise KeyError(f"Unable to resolve placeholder {placeholder_name}") |
| 285 | |
| 286 | def slot_to_tid(self, slot: Slot) -> Tid: |
| 287 | """Convert a tensor Slot to a Tid, recording it for later remapping.""" |
| 288 | assert slot.id_type == IdType.Tensor |
| 289 | # Use local slot.idx as placeholder - will be remapped to global idx in build() |
| 290 | tid = Tid(idx=slot.idx) |
| 291 | self._tid_slot_map.append((tid, 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.""" |