Typing utils
Utilities to help annotate the types of values in the project.
HydraConfigFor
module-attribute
#
HydraConfigFor = Builds[type[T]]
Type annotation to say "a hydra config that returns an object of type T when instantiated".
DataModule #
Bases: Protocol[BatchType]
Protocol that shows the minimal attributes / methods of the LightningDataModule
class.
This is used to type hint the batches that are yielded by the DataLoaders.
is_sequence_of #
Used to check (and tell the type checker) that object
is a sequence of items of this
type.