MCPcopy Index your code
hub / github.com/microsoft/BitNet / validate_conversion_to

Method validate_conversion_to

utils/convert.py:851–853  ·  view source on GitHub ↗
(self, data_type: DataType)

Source from the content-addressed store, hash-verified

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
856LazyModel: TypeAlias = 'dict[str, LazyTensor]'

Callers 1

astypeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected