apache_beam.typehints.pytorch_type_compatibility module

class apache_beam.typehints.pytorch_type_compatibility.PytorchBatchConverter(batch_type, element_type, dtype, element_shape=(), partition_dimension=0)[source]

Bases: apache_beam.typehints.batch.BatchConverter

static from_typehints(element_type, batch_type) → Optional[apache_beam.typehints.pytorch_type_compatibility.PytorchBatchConverter][source]
produce_batch(elements)[source]
explode_batch(batch)[source]

Convert an instance of B to Generator[E].

combine_batches(batches)[source]
get_length(batch)[source]
estimate_byte_size(batch)[source]
class apache_beam.typehints.pytorch_type_compatibility.PytorchTypeHint[source]

Bases: object

class PytorchTypeConstraint(dtype, shape=())[source]

Bases: apache_beam.typehints.typehints.TypeConstraint

type_check(batch)[source]