Shortcuts

The Docs

The final step is to add some docs. For each Task in Flash, we have a docs page in docs/source/reference. You should create a .rst file there with the following:

  • a brief description of the task

  • the predict example

  • the finetuning example

  • any relevant API reference

Here are the contents of docs/source/reference/template.rst which breaks down each of these steps:


.. _template:

########
Template
########

********
The Task
********

Here you should add a description of your task. For example:
Classification is the task of assigning one of a number of classes to each data point.

------

*******
Example
*******

.. note::

    Here you should add a short intro to your example, and then use ``literalinclude`` to add it.
    To make it simple, you can fill in this template.

Let's look at the task of <describe the task> using the <data set used in the example>.
The dataset contains <describe the data>.
Here's an outline:

.. code-block::

    <present the folder structure of the data or some data samples here>

Once we've downloaded the data using :func:`~flash.core.data.download_data`, we create the <link to the DataModule with ``:class:``>.
We select a pre-trained backbone to use for our <link to the Task with ``:class:``> and finetune on the <name of the data set> data.
We then use the trained <link to the Task with ``:class:``> for inference.
Finally, we save the model.
Here's the full example:

<include the example with ``literalinclude``>

.. literalinclude:: ../../../flash_examples/template.py
    :language: python
    :lines: 14-

Here’s the rendered doc page!


Once the docs are done, it’s finally time to open a PR and wait for some reviews!


Congratulations on adding your first Task to Flash, we hope to see you again soon!

Read the Docs v: 0.5.1
Versions
latest
stable
0.5.1
0.5.0
0.4.0
0.3.2
0.3.1
0.3.0
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0post1
docs-fix_build
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.