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

Commit

Permalink
[docs] Reorganise API Reference (#555)
Browse files Browse the repository at this point in the history
* Add flash to docs

* Add flash.core.serve to docs

* Add todo extension

* Fix format

* Add /data to .gitignore

* Move tutorials out of API Reference

* Add noindex

* Exclude flash.* members from data API docs

* Update flash.core

* Add docstring to FlashCallback

* Remove callback note

* Remove flash.core.data_module.DataModule in favor of flash.DataModule

* Add missing docstring to Trainer's methods

* Update flash api ref

* Update flash.core api ref

* Don't remove docs/source/api

* api/{flash,core,data,image}

* api/{image,text,video,tabular,serve}

* udpate

* make clean before make docs

* Remove :ref: for now

* resolve bad-looking table

* Split classes and functions

* Shorten paths to class/func

* Update docs/source/_static/main.css

Co-authored-by: Ethan Harris <[email protected]>

* Fix docs build

Co-authored-by: Ethan Harris <[email protected]>
  • Loading branch information
akihironitta and ethanwharris authored Jul 13, 2021
1 parent 78867ad commit fc3263f
Show file tree
Hide file tree
Showing 36 changed files with 664 additions and 476 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ instance/

# Sphinx documentation
docs/_build/
docs/api/
docs/notebooks/
docs/source/api/generated/

# PyBuilder
target/
Expand Down Expand Up @@ -133,8 +136,6 @@ dmypy.json
# Pyre type checker
.pyre/

docs/notebooks/
docs/api/
titanic.csv
.vscode
.venv
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ clean:
rm -rf $(shell find . -name "mlruns")
rm -rf .mypy_cache
rm -rf .pytest_cache
rm -rf **/__pycache__
rm -rf ./docs/build
rm -rf ./docs/source/**/generated
rm -rf ./docs/source/api
3 changes: 3 additions & 0 deletions docs/source/_static/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.longtable col {
width: 50% !important;
}
14 changes: 14 additions & 0 deletions docs/source/_templates/classtemplate.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. role:: hidden
:class: hidden-section
.. currentmodule:: {{ module }}


{{ name | underline }}

.. autoclass:: {{ name }}
:members:


..
autogenerated from source/_templates/classtemplate.rst
note it does not have :inherited-members:
81 changes: 81 additions & 0 deletions docs/source/api/core.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
##########
flash.core
##########

.. contents::
:depth: 1
:local:
:backlinks: top

flash.core.classification
_________________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.classification.Classes
~flash.core.classification.ClassificationSerializer
~flash.core.classification.ClassificationTask
~flash.core.classification.FiftyOneLabels
~flash.core.classification.Labels
~flash.core.classification.Logits
~flash.core.classification.PredsClassificationSerializer
~flash.core.classification.Probabilities

flash.core.finetuning
_____________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.finetuning.FlashBaseFinetuning
~flash.core.finetuning.FreezeUnfreeze
~flash.core.finetuning.NoFreeze
~flash.core.finetuning.UnfreezeMilestones

flash.core.integration.fiftyone
_______________________________

.. autosummary::
:toctree: generated/
:nosignatures:

~flash.core.integrations.fiftyone.utils.visualize

flash.core.model
________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.model.BenchmarkConvergenceCI
~flash.core.model.CheckDependenciesMeta
~flash.core.model.Task

flash.core.registry
___________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.registry.FlashRegistry

Utilities
_________

.. autosummary::
:toctree: generated/
:nosignatures:

~flash.core.trainer.from_argparse_args
~flash.core.utilities.apply_func.get_callable_name
~flash.core.utilities.apply_func.get_callable_dict
~flash.core.model.predict_context
177 changes: 177 additions & 0 deletions docs/source/api/data.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
###############
flash.core.data
###############

.. contents::
:depth: 1
:local:
:backlinks: top

flash.core.data.auto_dataset
____________________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.data.auto_dataset.AutoDataset
~flash.core.data.auto_dataset.BaseAutoDataset
~flash.core.data.auto_dataset.IterableAutoDataset

flash.core.data.base_viz
________________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.data.base_viz.BaseVisualization

flash.core.data.batch
________________________

.. autosummary::
:toctree: generated/
:nosignatures:

~flash.core.data.batch.default_uncollate

flash.core.data.callback
________________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.data.callback.BaseDataFetcher
~flash.core.data.callback.ControlFlow
~flash.core.data.callback.FlashCallback

flash.core.data.data_module
___________________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.data.data_module.DataModule

flash.core.data.data_pipeline
_____________________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.data.data_pipeline.DataPipeline
~flash.core.data.data_pipeline.DataPipelineState

flash.core.data.data_source
___________________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.data.data_source.DatasetDataSource
~flash.core.data.data_source.DataSource
~flash.core.data.data_source.DefaultDataKeys
~flash.core.data.data_source.DefaultDataSources
~flash.core.data.data_source.FiftyOneDataSource
~flash.core.data.data_source.ImageLabelsMap
~flash.core.data.data_source.LabelsState
~flash.core.data.data_source.MockDataset
~flash.core.data.data_source.NumpyDataSource
~flash.core.data.data_source.PathsDataSource
~flash.core.data.data_source.SequenceDataSource
~flash.core.data.data_source.TensorDataSource

.. autosummary::
:toctree: generated/
:nosignatures:

~flash.core.data.data_source.has_file_allowed_extension
~flash.core.data.data_source.has_len
~flash.core.data.data_source.make_dataset

flash.core.data.process
_______________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.data.process.BasePreprocess
~flash.core.data.process.DefaultPreprocess
~flash.core.data.process.DeserializerMapping
~flash.core.data.process.Deserializer
~flash.core.data.process.Postprocess
~flash.core.data.process.Preprocess
~flash.core.data.process.SerializerMapping
~flash.core.data.process.Serializer

flash.core.data.properties
__________________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.data.properties.ProcessState
~flash.core.data.properties.Properties

flash.core.data.splits
______________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.data.splits.SplitDataset

flash.core.data.transforms
__________________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.data.transforms.ApplyToKeys
~flash.core.data.transforms.KorniaParallelTransforms

.. autosummary::
:toctree: generated/
:nosignatures:

~flash.core.data.transforms.merge_transforms
~flash.core.data.transforms.kornia_collate

flash.core.data.utils
_____________________

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.data.utils.CurrentFuncContext
~flash.core.data.utils.CurrentRunningStageContext
~flash.core.data.utils.CurrentRunningStageFuncContext
~flash.core.data.utils.FuncModule

.. autosummary::
:toctree: generated/
:nosignatures:

~flash.core.data.utils.convert_to_modules
~flash.core.data.utils.download_data
17 changes: 17 additions & 0 deletions docs/source/api/flash.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#####
flash
#####

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

~flash.core.data.data_source.DataSource
~flash.core.data.data_module.DataModule
~flash.core.data.callback.FlashCallback
~flash.core.data.process.Preprocess
~flash.core.data.process.Postprocess
~flash.core.data.process.Serializer
~flash.core.model.Task
~flash.core.trainer.Trainer
Loading

0 comments on commit fc3263f

Please sign in to comment.