lightning/docs/source-app/glossary/app_tree.rst

112 lines
3.4 KiB
ReStructuredText
Raw Normal View History

Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
.. _app_component_tree:
###################
App Component Tree
###################
**Audience:** Users who want to know how components can be composed with each other.
**Level:** Basic
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
----
**************************************
What is an Application Component Tree?
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
**************************************
Components can be nested to form component trees where the LightningFlows are its branches and LightningWorks are its leaves.
This design enables users to organize and maintain their code with more ease, but more importantly, this helps creating an ecosystem with re-usable components.
Here's a basic application with four flows and two works (associated tree structure):
.. figure:: https://pl-flash-data.s3.amazonaws.com/assets_lightning/tree.gif
:alt: Basic App Components
:width: 100 %
.. literalinclude:: ../code_samples/quickstart/app_comp.py
A Lightning app runs all flows into a single process. Its flows coordinate the execution of the works each running in their own independent processes.
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
----
***********************************************
How do I define my application component tree?
***********************************************
In order to define your application component tree, you need create a tree of components and attach them to your root flow.
You can attach your components in the **__init__** method of a flow.
.. code-block:: python
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
import lightning as L
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
class RootFlow(L.LightningFlow):
def __init__(self):
super().__init__()
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
# The `Work` component is attached here.
self.work = Work()
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
# The `NestedFlow` component is attached here.
self.nested_flow = NestedFlow()
Once done, simply add the root flow to a Lightning app as follows:
.. code-block:: python
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
app = L.LightningApp(RootFlow())
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
----
******************************************
Is my application component tree static?
******************************************
No, Lightning supports dynamic flows and works.
You can simply attach your components in the **run** method of a flow using the Python functions **hasattr**, **setattr**, and **getattr**.
.. code-block:: python
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
class RootFlow(L.LightningFlow):
def run(self):
if not hasattr(self, "work"):
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
# The `Work` component is attached here.
setattr(self, "work", Work())
# Run the `Work` component.
getattr(self, "work").run()
if not hasattr(self, "nested_flow"):
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
# The `NestedFlow` component is attached here.
setattr(self, "nested_flow", NestedFlow())
# Run the `NestedFlow` component.
getattr(self, "wonested_flowrk").run()
But it is usually more readable to use Lightning built-in :class:`~lightning_app.structures.Dict` or :class:`~lightning_app.structures.List` as follows:
.. code-block:: python
from lightning_app.structures import Dict
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
class RootFlow(L.LightningFlow):
def __init__(self):
super().__init__()
self.dict = Dict()
def run(self):
if "work" not in self.dict:
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
# The `Work` component is attached here.
self.dict["work"] = Work()
self.dict["work"].run()
if "nested_flow" not in self.dict:
Add `lightning_app` docs (#13656) * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update latest docs * remove image * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * ci * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * make * Update .gitignore Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update .github/workflows/docs-deploy.yml Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * Update docs/source-app/_templates/theme_variables.jinja Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/api_reference/api_references.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/code_samples/convert_pl_to_app/train.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server_app_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/get_started/training_with_apps.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/hpo/hpo.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/communication_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/model_server_app/model_server.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update docs/source-app/examples/github_repo_runner/app.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * update * update * update * update * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update * update Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
# The `NestedFlow` component is attached here.
self.dict["nested_flow"] = NestedFlow()
self.dict["nested_flow"].run()