Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Latest commit

 

History

History
41 lines (28 loc) · 1.84 KB

optional.rst

File metadata and controls

41 lines (28 loc) · 1.84 KB

Optional Extras

Organize your transforms in transforms.py

It can be useful to define your ~flash.core.data.io.input_transform.InputTransform in an input_transform.py file. Here's an example from image/classification/input_transform.py:

../../../flash/image/classification/input_transform.py

Add outputs to your Task

We recommend that you do most of the heavy lifting in the ~flash.core.data.io.output_transform.OutputTransform. Specifically, it should include any formatting and transforms that should always be applied to the predictions. If you want to support different use cases that require different prediction formats, you should add some ~flash.core.data.io.output.Output implementations in an output.py file.

Some good examples are in flash/core/classification.py. Here's the ~flash.core.classification.ClassesOutput ~flash.core.data.io.output.Output:

../../../flash/core/classification.py

Alternatively, here's the ~flash.core.classification.LogitsOutput ~flash.core.data.io.output.Output:

../../../flash/core/classification.py

Take a look at predictions to learn more.


Once you've added any optional extras, it's time to create some examples showing your task in action! <contributing_examples>