Custom types#

Flytekit ships with an extensible type system to make it easy for anyone to extend and add new types.

Note

To contribute a Flyte type, see the extensibility contribution guide.

StructuredDataset type#

StructuredDataset

This is the user facing StructuredDataset class.

StructuredDatasetEncoder

StructuredDatasetDecoder

File type#

FlyteFile

HDF5EncodedFile

This can be used to denote that the returned file is of type hdf5 and can be received by other tasks that accept an hdf5 format.

HTMLPage

Can be used to receive or return an HTMLPage.

JoblibSerializedFile

This File represents a file that was serialized using joblib.dump method can be loaded back using joblib.load.

JPEGImageFile

Can be used to receive or return an JPEGImage.

PDFFile

Can be used to receive or return an PDFFile.

PNGImageFile

Can be used to receive or return an PNGImage.

PythonPickledFile

This type can be used when a serialized Python pickled object is returned and shared between tasks.

PythonNotebook

This type is used to identify a Python notebook file.

SVGImageFile

Can be used to receive or return an SVGImage.

Directory type#

FlyteDirectory

TensorboardLogs

This type can be used to denote that the output is a folder that contains logs that can be loaded in TensorBoard.

TFRecordsDirectory

This type can be used to denote that the output is a folder that contains tensorflow record files.

Iterator type#

FlyteIterator

JSON

alias of Dict[str, Any] | List[Any] | bool | float | int | str

PyTorch type#

PyTorchCheckpoint

This class is helpful to save a checkpoint.

PyTorchCheckpointTransformer

TypeTransformer that supports serializing and deserializing checkpoint.

PyTorchModuleTransformer

PyTorchTensorTransformer

Tensorflow type#

TensorFlowRecordFileTransformer

TypeTransformer that supports serialising and deserialising to and from TFRecord file.

TensorFlowRecordsDirTransformer

TypeTransformer that supports serialising and deserialising to and from TFRecord directory.

Sklearn type#