batch_operations
Operations done at batch time defined here.
Classes
AlbumentationsImageTransformation
class AlbumentationsImageTransformation( *, name: str = None, output: bool = False, arg: Any, step: DataSplit, transformations: list[Union[str, dict[str, _JSONDict]]],):
Represents image transformations done on a single column at batch time.
Arguments
arg
: The argument to the transformation.name
: The name of the transformation. If not provided a unique name will be generated from the class name.output
: Whether or not this transformation should be included in the final output. Defaults to False.step
: Denotes whether transformations should be performed at training, validation or test time.transformations
: list of transformations to be performed in order as one transformation.
Raises
TransformationRegistryError
: If the transformation name is already in use.TransformationRegistryError
: If the transformation name hasn't been provided and the transformation is not registered.ValueError
: If theoutput
is set to False.
Method generated by attrs for class AlbumentationsImageTransformation.
Ancestors
Variables
- static
transformations : list
Static methods
schema
def schema() ‑> marshmallow.schema.Schema:
Inherited from:
Gets an instance of the Schema associated with this Transformation.
Raises
TypeError
: If the transformation doesn't have aTransformationSchema
as the schema.
Methods
get_callable
def get_callable( self,) ‑> bitfount.transformations.batch_operations._AlbumentationsAugmentation:
Returns callable which performs the transformations.
Returns The callable to perform transformations.
BatchTimeOperation
class BatchTimeOperation( *, name: str = None, output: bool = False, arg: Any, step: DataSplit,):
Class just to denote that transformation will happen at batch time.
All batch time operations must be unary operations.
Arguments
arg
: The argument to the transformation.name
: The name of the transformation. If not provided a unique name will be generated from the class name.output
: Whether or not this transformation should be included in the final output. Defaults to False.step
: Denotes whether transformations should be performed at training, validation or test time.
Raises
TransformationRegistryError
: If the transformation name is already in use.TransformationRegistryError
: If the transformation name hasn't been provided and the transformation is not registered.
Method generated by attrs for class BatchTimeOperation.
Ancestors
Static methods
schema
def schema() ‑> marshmallow.schema.Schema:
Inherited from:
Gets an instance of the Schema associated with this Transformation.
Raises
TypeError
: If the transformation doesn't have aTransformationSchema
as the schema.