(self, data_type: DataType)
| 849 | return LazyTensor(load, self.shape, data_type, f'convert({data_type}) {self.description}') |
| 850 | |
| 851 | def validate_conversion_to(self, data_type: DataType) -> None: |
| 852 | if data_type != self.data_type and data_type.name not in self.data_type.valid_conversions: |
| 853 | raise ValueError(f'Cannot validate conversion from {self.data_type} to {data_type}.') |
| 854 | |
| 855 | |
| 856 | LazyModel: TypeAlias = 'dict[str, LazyTensor]' |