MCPcopy Create free account
hub / github.com/Pints-AI/1.5-Pints / validate_conversion_to

Method validate_conversion_to

tokenizer/convert/convert.py:665–667  ·  view source on GitHub ↗
(self, data_type: DataType)

Source from the content-addressed store, hash-verified

663 return LazyTensor(load, self.shape, data_type, f'convert({data_type}) {self.description}')
664
665 def validate_conversion_to(self, data_type: DataType) -> None:
666 if data_type != self.data_type and data_type.name not in self.data_type.valid_conversions:
667 raise ValueError(f'Cannot validate conversion from {self.data_type} to {data_type}.')
668
669
670LazyModel: TypeAlias = 'dict[str, LazyTensor]'

Callers 1

astypeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected