From 0be025e8b7bcc8855ea9df24d9447fa6814f74a1 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Mon, 13 Feb 2023 18:59:02 +0900 Subject: [PATCH] rename docs/source-app & adjust docs links for lightning (#16676) * update CI * config / import * lightning_app imports * source/ dir * html * ci: dirs * pr * req dir * on push * rename * drop * cleaning --- .github/CODEOWNERS | 14 +- .github/checkgroup.yml | 2 +- .github/labeler.yml | 2 +- .github/workflows/docs-checks.yml | 47 +- .github/workflows/docs-deploy.yml | 13 +- .gitignore | 4 +- .pre-commit-config.yaml | 6 +- Makefile | 6 +- .../api/lightning_app.core.LightningApp.rst | 10 - .../api/lightning_app.core.LightningFlow.rst | 10 - .../api/lightning_app.core.LightningWork.rst | 10 - docs/{source-app => source}/Makefile | 0 .../_static/copybutton.js | 0 .../_static/images/icon.svg | 0 .../_static/images/logo-large.svg | 0 .../_static/images/logo-small.svg | 0 .../_static/images/logo.png | Bin .../_static/images/logo.svg | 0 docs/{source-app => source}/_static/main.css | 0 .../_templates/classtemplate.rst | 0 .../_templates/classtemplate_no_index.rst | 0 .../_templates/layout.html | 0 .../_templates/theme_variables.jinja | 0 .../api_reference/components.rst | 2 +- .../api_reference/core.rst | 2 +- .../api_reference/frontend.rst | 2 +- .../api_reference/runners.rst | 2 +- .../api_reference/storage.rst | 2 +- docs/{source-app => source}/basics.rst | 20 +- .../cloud/customize_a_lightning_cluster.rst | 0 .../code_samples/basics/0.py | 0 .../code_samples/basics/1.py | 0 .../code_samples/convert_pl_to_app/app.py | 0 .../convert_pl_to_app/requirements.txt | 0 .../code_samples/convert_pl_to_app/train.py | 0 .../code_samples/quickstart/__init__.py | 0 .../code_samples/quickstart/app/__init__.py | 0 .../code_samples/quickstart/app/app_0.py | 0 .../code_samples/quickstart/app/app_1.py | 0 .../code_samples/quickstart/app_01.py | 0 .../code_samples/quickstart/app_02.py | 0 .../code_samples/quickstart/app_03.py | 0 .../code_samples/quickstart/app_comp.py | 0 .../quickstart/hello_world/app.py | 0 .../quickstart/hello_world/app_ui.py | 0 .../quickstart/hello_world/ui/index.html | 0 docs/{source-app => source}/conf.py | 18 +- .../{source-app => source}/contribute_app.rst | 0 .../core_api/lightning_app/app.py | 0 .../core_api/lightning_app/communication.rst | 0 .../lightning_app/communication_content.rst | 2 +- .../lightning_app/compute_content.rst | 4 +- .../core_api/lightning_app/dynamic_work.rst | 0 .../lightning_app/dynamic_work_content.rst | 6 +- .../core_api/lightning_app/index.rst | 0 .../core_api/lightning_app/lightning_app.rst | 2 +- .../core_api/lightning_flow.rst | 2 +- .../core_api/lightning_work/compute.rst | 0 .../lightning_work/compute_content.rst | 4 +- .../lightning_work/handling_app_exception.rst | 0 .../handling_app_exception_content.rst | 0 .../core_api/lightning_work/index.rst | 0 .../lightning_work/lightning_work.rst | 2 +- .../core_api/lightning_work/payload.rst | 0 .../lightning_work/payload_content.rst | 0 .../core_api/lightning_work/status.rst | 0 .../lightning_work/status_content.rst | 0 .../core_api/overview.rst} | 0 .../examples/dag/dag.rst | 2 +- .../examples/dag/dag_from_scratch.rst | 0 .../examples/data_explore_app.rst | 0 .../examples/etl_app.rst | 0 .../examples/file_server/app.py | 2 +- .../examples/file_server/file_server.rst | 0 .../file_server/file_server_content.rst | 0 .../file_server/file_server_step_1.rst | 0 .../file_server/file_server_step_2.rst | 2 +- .../file_server/file_server_step_3.rst | 0 .../file_server/file_server_step_4.rst | 2 +- .../examples/github_repo_runner/app.py | 0 .../github_repo_runner/github_repo_runner.rst | 2 +- .../github_repo_runner_content.rst | 0 .../github_repo_runner_step_1.rst | 0 .../github_repo_runner_step_2.rst | 2 +- .../github_repo_runner_step_3.rst | 0 .../github_repo_runner_step_4.rst | 0 .../github_repo_runner_step_5.rst | 4 +- .../examples/hands_on_example.rst | 0 .../{source-app => source}/examples/index.rst | 0 .../examples/model_server_app/app.py | 0 .../model_server_app/load_testing.rst | 0 .../model_server_app/locust_component.py | 0 .../examples/model_server_app/locustfile.py | 0 .../examples/model_server_app/model_server.py | 0 .../model_server_app/model_server.rst | 0 .../model_server_app/model_server_app.rst | 0 .../model_server_app_content.rst | 0 .../putting_everything_together.rst | 2 +- .../examples/model_server_app/train.py | 0 .../examples/model_server_app/train.rst | 2 +- .../examples/research_demo_app.rst | 0 .../get_started/add_an_interactive_demo.rst | 0 .../get_started/build_model.rst | 0 .../get_started/go_beyond_training.rst | 0 .../go_beyond_training_content.rst | 0 .../jumpstart_from_app_gallery.rst | 0 .../jumpstart_from_component_gallery.rst | 0 .../get_started/training_with_apps.rst | 2 +- .../get_started/what_app_can_do.rst | 0 .../glossary/app_tree.rst | 4 +- .../glossary/aws_arn.rst | 0 .../glossary/build_config/build_config.rst | 0 .../build_config/build_config_advanced.rst | 4 +- .../build_config/build_config_basic.rst | 4 +- .../build_config_intermediate.rst | 8 +- .../glossary/command_lines/command_lines.rst | 0 docs/{source-app => source}/glossary/dag.rst | 0 .../glossary/debug_app.rst | 0 .../glossary/distributed_fe.rst | 0 .../glossary/distributed_hardware.rst | 0 .../glossary/environment_variables.rst | 0 .../glossary/event_loop.rst | 0 .../glossary/fault_tolerance.rst | 0 .../{source-app => source}/glossary/index.rst | 0 .../glossary/ios_and_android.rst | 0 .../glossary/lightning_app_overview/index.rst | 0 .../{source-app => source}/glossary/mount.rst | 0 .../glossary/restful_api/restful_api.rst | 0 .../glossary/scheduling.rst | 14 +- .../glossary/secrets.rst | 0 .../glossary/sharing_components.rst | 0 .../glossary/storage/differences.rst | 2 +- .../glossary/storage/drive.rst | 0 .../glossary/storage/drive_content.rst | 12 +- .../glossary/storage/drive_content_old.rst | 12 +- .../glossary/storage/path.rst | 14 +- .../glossary/storage/storage.rst | 2 +- .../glossary/use_local_lightning.rst | 0 docs/{source-app => source}/index.rst | 0 .../install/install_beginner.rst | 0 .../install/installation.rst | 0 docs/{source-app => source}/install/mac.bash | 0 docs/{source-app => source}/install/pip.bash | 0 .../install/windows.bash | 0 docs/{source-app => source}/intro.rst | 0 docs/{source-app => source}/landing_app.py | 0 .../landing_app_run.bash | 0 .../levels/advanced/index.rst | 0 .../levels/advanced/level_16.rst | 0 .../levels/advanced/level_17.rst | 0 .../levels/advanced/level_18.rst | 0 .../levels/advanced/level_19.rst | 0 .../levels/advanced/level_20.rst | 0 .../advanced/start_dynamic_components.rst | 0 .../levels/basic/build_a_dag.rst | 0 .../basic/build_a_lightning_component.rst | 0 .../levels/basic/create_a_model_demo.rst | 0 .../levels/basic/deploy_ai_model_api.rst | 0 .../hello_components/code_run_cloud.bash | 0 .../code_run_cloud_setup.bash | 0 .../code_run_cloud_yours.bash | 0 .../code_run_cloud_yours_setup.bash | 0 .../hello_components/code_run_local.bash | 0 .../code_run_local_setup.bash | 0 .../basic/hello_components/deploy_model.py | 0 .../basic/hello_components/hello_world.py | 0 .../basic/hello_components/hello_world_gpu.py | 0 .../basic/hello_components/multi_node.py | 0 .../basic/hello_components/pl_multinode.py | 0 .../basic/hello_components/pt_multinode.py | 0 .../basic/hello_components/run_ptl_script.py | 0 .../basic/hello_components/streamlit_demo.py | 0 .../hello_components/terraform_example.bash | 0 .../basic/hello_components/train_ptl.py | 0 .../basic/hello_components/train_pytorch.py | 0 .../levels/basic/hello_components/xgboost.py | 0 .../basic/hello_components/xgboost_gpu.py | 0 .../levels/basic/hero_components.rst | 0 .../levels/basic/hero_run.rst | 0 .../levels/basic/hero_run_setup.rst | 0 .../levels/basic/index.rst | 0 .../levels/basic/key_features/accelerators.py | 0 .../levels/basic/key_features/auto_timeout.py | 0 .../basic/key_features/custom_container.py | 0 .../levels/basic/key_features/idle_machine.py | 0 .../basic/key_features/massive_dataset.py | 0 .../levels/basic/key_features/mount_data.py | 0 .../levels/basic/key_features/spot.py | 0 ...al_lightning_component_implementations.rst | 0 .../run_jupyter_notebook_on_the_cloud.rst | 0 .../levels/basic/run_on_aws_account.rst | 0 .../basic/save_money_on_cloud_costs.rst | 0 .../basic/scripts/toy_app_1_component.py | 0 .../basic/scripts/toy_app_1_component_pdb.py | 0 .../basic/train_pytorch_on_the_cloud.rst | 0 .../levels/expert/index.rst | 0 .../connect_lightning_components.rst | 0 .../intermediate/debug_a_lightning_app.rst | 0 .../debug_app_scripts/debug_app.py | 0 .../intermediate/debug_app_scripts/toy_app.py | 0 .../debug_app_scripts/toy_app_1_component.py | 0 .../toy_app_1_component_pdb.py | 0 .../embed_web_ui_into_lightningwork.rst | 0 .../levels/intermediate/index.rst | 0 .../levels/intermediate/level_12.rst | 0 .../level_2_scripts/code_run_cloud.bash | 0 .../level_2_scripts/code_run_local.bash | 0 .../intermediate/level_2_scripts/hello_app.py | 0 .../level_2_scripts/hello_app_auto_scale.py | 0 .../level_2_scripts/hello_app_cron.py | 0 .../level_2_scripts/hello_app_scheduler.py | 0 .../level_2_scripts/multi_cloud.bash | 0 .../level_2_scripts/organized_app_python.py | 0 .../intermediate/level_2_scripts/tr.bash | 0 .../levels/intermediate/level_9.rst | 0 .../run_lightning_work_in_parallel.rst | 0 .../levels/intermediate/scripts/.storage/a | Bin .../intermediate/scripts/.storage/embeddings | Bin .../levels/intermediate/scripts/a | Bin .../levels/intermediate/scripts/comms_1.py | 0 .../levels/intermediate/scripts/debug_app.py | 0 .../levels/intermediate/scripts/embeddings | Bin .../levels/intermediate/scripts/toy_app.py | 0 .../intermediate/scripts/toy_payload.py | 0 .../intermediate/scripts/two_comms_non_ml.py | 0 .../intermediate/scripts/two_work_comms.py | 0 .../share_files_between_components.rst | 0 ...variables_between_lightning_components.rst | 0 .../start_from_lightning_app_templates.rst | 0 docs/{source-app => source}/make.bat | 0 .../moving_to_the_cloud.rst | 12 +- docs/{source-app => source}/quickstart.rst | 0 docs/{source-app => source}/testing.rst | 12 +- .../ui_and_frontends.rst | 0 .../access_app_state/access_app_state.rst | 0 .../workflows/add_components/index.rst | 0 .../workflows/add_server/any_server.rst | 0 .../workflows/add_server/flask_basic.rst | 0 .../workflows/add_server/index.rst | 0 .../workflows/add_server/index_content.rst | 0 .../workflows/add_web_link.rst | 0 .../add_web_ui/angular_js_intermediate.rst | 0 .../workflows/add_web_ui/dash/basic.rst | 0 .../workflows/add_web_ui/dash/index.rst | 0 .../add_web_ui/dash/intermediate.rst | 0 .../add_web_ui/dash/intermediate_plot.py | 0 .../add_web_ui/dash/intermediate_state.py | 0 .../workflows/add_web_ui/example_app.rst | 0 .../add_web_ui/glossary_front_end.rst | 0 .../workflows/add_web_ui/glossary_ui.rst | 0 .../workflows/add_web_ui/gradio/basic.rst | 8 +- .../workflows/add_web_ui/gradio/index.rst | 0 .../add_web_ui/gradio/intermediate.rst | 0 .../workflows/add_web_ui/html/basic.rst | 0 .../workflows/add_web_ui/html/index.rst | 0 .../add_web_ui/html/intermediate.rst | 0 .../workflows/add_web_ui/index.rst | 0 .../workflows/add_web_ui/index_content.rst | 0 .../integrate_any_javascript_framework.rst | 0 .../workflows/add_web_ui/jupyter_basic.rst | 0 .../workflows/add_web_ui/justpy/index.rst | 0 .../workflows/add_web_ui/panel/basic.rst | 0 .../workflows/add_web_ui/panel/index.rst | 0 .../add_web_ui/panel/intermediate.rst | 420 +++++++++--------- ...ommunicate_between_react_and_lightning.rst | 0 .../react/connect_react_and_lightning.rst | 0 .../react/create_react_template.rst | 0 .../workflows/add_web_ui/react/index.rst | 0 .../react/react_development_workflow.rst | 0 .../workflows/add_web_ui/streamlit/basic.rst | 0 .../workflows/add_web_ui/streamlit/index.rst | 0 .../add_web_ui/streamlit/intermediate.rst | 0 .../add_web_ui/vue_js_intermediate.rst | 0 .../arrange_tabs/arrange_app_basic.rst | 0 .../arrange_tabs/arrange_app_intermediate.rst | 0 .../workflows/arrange_tabs/index.rst | 0 .../workflows/arrange_tabs/index_content.rst | 0 .../build_command_line_interface/app.py | 0 .../build_command_line_interface/cli.rst | 2 +- .../cli_client.rst | 0 .../commands/__init__.py | 0 .../commands/notebook/__init__.py | 0 .../commands/notebook/run.py | 0 .../example_command.py | 0 .../build_command_line_interface/index.rst | 0 .../index_content.rst | 0 .../post_example.py | 0 .../from_pytorch_lightning_script.rst | 0 .../build_lightning_app/from_scratch.rst | 0 .../from_scratch_content.rst | 0 .../workflows/build_lightning_app/index.rst | 0 .../build_lightning_app/index_content.rst | 0 .../build_lightning_component/basic.rst | 0 .../from_scratch_component_content.rst | 0 .../build_lightning_component/index.rst | 0 .../index_content.rst | 0 .../intermediate.rst | 0 .../publish_a_component.rst | 0 .../workflows/build_rest_api/add_api.rst | 2 +- .../workflows/build_rest_api/index.rst | 0 .../build_rest_api/index_content.rst | 0 .../workflows/build_rest_api/models.py | 0 .../workflows/build_rest_api/post_example.py | 0 .../build_rest_api/post_example_pydantic.py | 0 .../build_rest_api/request_validation.rst | 0 .../workflows/byoc/aws_cli.rst | 0 .../workflows/byoc/aws_console.rst | 0 .../workflows/byoc/create_cluster.rst | 0 .../workflows/byoc/delete_cluster.rst | 0 .../workflows/byoc/index.rst | 0 .../workflows/byoc/run_on_cluster.rst | 0 .../workflows/debug_locally.rst | 0 .../workflows/enable_fault_tolerance.rst | 0 .../workflows/extend_app.rst | 0 .../workflows/index.rst | 0 .../workflows/mount_cloud_object_store.rst | 22 +- .../run_app_on_cloud/cloud_files.rst | 0 .../workflows/run_app_on_cloud/index.rst | 0 .../run_app_on_cloud/index_content.rst | 0 .../run_app_on_cloud/lightning_cloud.rst | 0 .../workflows/run_app_on_cloud/on_prem.rst | 0 .../run_app_on_cloud/on_your_own_machine.rst | 0 .../workflows/run_app_snippet.rst | 0 .../run_components_on_different_hardware.rst | 0 .../workflows/run_on_private_cloud.rst | 0 .../workflows/run_work_in_parallel.rst | 0 .../run_work_in_parallel_content.rst | 0 .../workflows/run_work_once.rst | 0 .../workflows/run_work_once_content.rst | 4 +- .../workflows/schedule_apps.rst | 0 .../workflows/scripts/parallel/toy_app.py | 0 .../scripts/parallel/toy_parallel.py | 0 .../scripts/parallel/toy_two_parallel.py | 0 .../parallel/toy_two_parallel_not_started.py | 0 .../workflows/share_app.rst | 0 .../share_files_between_components.rst | 8 +- .../share_files_between_components/app.py | 0 .../workflows/ssh/index.rst | 0 .../workflows/test_an_app.rst | 0 src/lightning/app/cli/app-template/.gitignore | 8 +- .../app/cli/component-template/.gitignore | 8 +- .../serve/test_model_inference_api.py | 2 +- 342 files changed, 391 insertions(+), 409 deletions(-) delete mode 100644 docs/source-app/api_reference/api/lightning_app.core.LightningApp.rst delete mode 100644 docs/source-app/api_reference/api/lightning_app.core.LightningFlow.rst delete mode 100644 docs/source-app/api_reference/api/lightning_app.core.LightningWork.rst rename docs/{source-app => source}/Makefile (100%) rename docs/{source-app => source}/_static/copybutton.js (100%) rename docs/{source-app => source}/_static/images/icon.svg (100%) rename docs/{source-app => source}/_static/images/logo-large.svg (100%) rename docs/{source-app => source}/_static/images/logo-small.svg (100%) rename docs/{source-app => source}/_static/images/logo.png (100%) rename docs/{source-app => source}/_static/images/logo.svg (100%) rename docs/{source-app => source}/_static/main.css (100%) rename docs/{source-app => source}/_templates/classtemplate.rst (100%) rename docs/{source-app => source}/_templates/classtemplate_no_index.rst (100%) rename docs/{source-app => source}/_templates/layout.html (100%) rename docs/{source-app => source}/_templates/theme_variables.jinja (100%) rename docs/{source-app => source}/api_reference/components.rst (95%) rename docs/{source-app => source}/api_reference/core.rst (90%) rename docs/{source-app => source}/api_reference/frontend.rst (91%) rename docs/{source-app => source}/api_reference/runners.rst (88%) rename docs/{source-app => source}/api_reference/storage.rst (97%) rename docs/{source-app => source}/basics.rst (89%) rename docs/{source-app => source}/cloud/customize_a_lightning_cluster.rst (100%) rename docs/{source-app => source}/code_samples/basics/0.py (100%) rename docs/{source-app => source}/code_samples/basics/1.py (100%) rename docs/{source-app => source}/code_samples/convert_pl_to_app/app.py (100%) rename docs/{source-app => source}/code_samples/convert_pl_to_app/requirements.txt (100%) rename docs/{source-app => source}/code_samples/convert_pl_to_app/train.py (100%) rename docs/{source-app => source}/code_samples/quickstart/__init__.py (100%) rename docs/{source-app => source}/code_samples/quickstart/app/__init__.py (100%) rename docs/{source-app => source}/code_samples/quickstart/app/app_0.py (100%) rename docs/{source-app => source}/code_samples/quickstart/app/app_1.py (100%) rename docs/{source-app => source}/code_samples/quickstart/app_01.py (100%) rename docs/{source-app => source}/code_samples/quickstart/app_02.py (100%) rename docs/{source-app => source}/code_samples/quickstart/app_03.py (100%) rename docs/{source-app => source}/code_samples/quickstart/app_comp.py (100%) rename docs/{source-app => source}/code_samples/quickstart/hello_world/app.py (100%) rename docs/{source-app => source}/code_samples/quickstart/hello_world/app_ui.py (100%) rename docs/{source-app => source}/code_samples/quickstart/hello_world/ui/index.html (100%) rename docs/{source-app => source}/conf.py (97%) rename docs/{source-app => source}/contribute_app.rst (100%) rename docs/{source-app => source}/core_api/lightning_app/app.py (100%) rename docs/{source-app => source}/core_api/lightning_app/communication.rst (100%) rename docs/{source-app => source}/core_api/lightning_app/communication_content.rst (98%) rename docs/{source-app => source}/core_api/lightning_app/compute_content.rst (86%) rename docs/{source-app => source}/core_api/lightning_app/dynamic_work.rst (100%) rename docs/{source-app => source}/core_api/lightning_app/dynamic_work_content.rst (97%) rename docs/{source-app => source}/core_api/lightning_app/index.rst (100%) rename docs/{source-app => source}/core_api/lightning_app/lightning_app.rst (77%) rename docs/{source-app => source}/core_api/lightning_flow.rst (72%) rename docs/{source-app => source}/core_api/lightning_work/compute.rst (100%) rename docs/{source-app => source}/core_api/lightning_work/compute_content.rst (94%) rename docs/{source-app => source}/core_api/lightning_work/handling_app_exception.rst (100%) rename docs/{source-app => source}/core_api/lightning_work/handling_app_exception_content.rst (100%) rename docs/{source-app => source}/core_api/lightning_work/index.rst (100%) rename docs/{source-app => source}/core_api/lightning_work/lightning_work.rst (78%) rename docs/{source-app => source}/core_api/lightning_work/payload.rst (100%) rename docs/{source-app => source}/core_api/lightning_work/payload_content.rst (100%) rename docs/{source-app => source}/core_api/lightning_work/status.rst (100%) rename docs/{source-app => source}/core_api/lightning_work/status_content.rst (100%) rename docs/{source-app/core_api/core_api.rst => source/core_api/overview.rst} (100%) rename docs/{source-app => source}/examples/dag/dag.rst (97%) rename docs/{source-app => source}/examples/dag/dag_from_scratch.rst (100%) rename docs/{source-app => source}/examples/data_explore_app.rst (100%) rename docs/{source-app => source}/examples/etl_app.rst (100%) rename docs/{source-app => source}/examples/file_server/app.py (99%) rename docs/{source-app => source}/examples/file_server/file_server.rst (100%) rename docs/{source-app => source}/examples/file_server/file_server_content.rst (100%) rename docs/{source-app => source}/examples/file_server/file_server_step_1.rst (100%) rename docs/{source-app => source}/examples/file_server/file_server_step_2.rst (96%) rename docs/{source-app => source}/examples/file_server/file_server_step_3.rst (100%) rename docs/{source-app => source}/examples/file_server/file_server_step_4.rst (97%) rename docs/{source-app => source}/examples/github_repo_runner/app.py (100%) rename docs/{source-app => source}/examples/github_repo_runner/github_repo_runner.rst (87%) rename docs/{source-app => source}/examples/github_repo_runner/github_repo_runner_content.rst (100%) rename docs/{source-app => source}/examples/github_repo_runner/github_repo_runner_step_1.rst (100%) rename docs/{source-app => source}/examples/github_repo_runner/github_repo_runner_step_2.rst (97%) rename docs/{source-app => source}/examples/github_repo_runner/github_repo_runner_step_3.rst (100%) rename docs/{source-app => source}/examples/github_repo_runner/github_repo_runner_step_4.rst (100%) rename docs/{source-app => source}/examples/github_repo_runner/github_repo_runner_step_5.rst (90%) rename docs/{source-app => source}/examples/hands_on_example.rst (100%) rename docs/{source-app => source}/examples/index.rst (100%) rename docs/{source-app => source}/examples/model_server_app/app.py (100%) rename docs/{source-app => source}/examples/model_server_app/load_testing.rst (100%) rename docs/{source-app => source}/examples/model_server_app/locust_component.py (100%) rename docs/{source-app => source}/examples/model_server_app/locustfile.py (100%) rename docs/{source-app => source}/examples/model_server_app/model_server.py (100%) rename docs/{source-app => source}/examples/model_server_app/model_server.rst (100%) rename docs/{source-app => source}/examples/model_server_app/model_server_app.rst (100%) rename docs/{source-app => source}/examples/model_server_app/model_server_app_content.rst (100%) rename docs/{source-app => source}/examples/model_server_app/putting_everything_together.rst (95%) rename docs/{source-app => source}/examples/model_server_app/train.py (100%) rename docs/{source-app => source}/examples/model_server_app/train.rst (94%) rename docs/{source-app => source}/examples/research_demo_app.rst (100%) rename docs/{source-app => source}/get_started/add_an_interactive_demo.rst (100%) rename docs/{source-app => source}/get_started/build_model.rst (100%) rename docs/{source-app => source}/get_started/go_beyond_training.rst (100%) rename docs/{source-app => source}/get_started/go_beyond_training_content.rst (100%) rename docs/{source-app => source}/get_started/jumpstart_from_app_gallery.rst (100%) rename docs/{source-app => source}/get_started/jumpstart_from_component_gallery.rst (100%) rename docs/{source-app => source}/get_started/training_with_apps.rst (98%) rename docs/{source-app => source}/get_started/what_app_can_do.rst (100%) rename docs/{source-app => source}/glossary/app_tree.rst (96%) rename docs/{source-app => source}/glossary/aws_arn.rst (100%) rename docs/{source-app => source}/glossary/build_config/build_config.rst (100%) rename docs/{source-app => source}/glossary/build_config/build_config_advanced.rst (94%) rename docs/{source-app => source}/glossary/build_config/build_config_basic.rst (95%) rename docs/{source-app => source}/glossary/build_config/build_config_intermediate.rst (89%) rename docs/{source-app => source}/glossary/command_lines/command_lines.rst (100%) rename docs/{source-app => source}/glossary/dag.rst (100%) rename docs/{source-app => source}/glossary/debug_app.rst (100%) rename docs/{source-app => source}/glossary/distributed_fe.rst (100%) rename docs/{source-app => source}/glossary/distributed_hardware.rst (100%) rename docs/{source-app => source}/glossary/environment_variables.rst (100%) rename docs/{source-app => source}/glossary/event_loop.rst (100%) rename docs/{source-app => source}/glossary/fault_tolerance.rst (100%) rename docs/{source-app => source}/glossary/index.rst (100%) rename docs/{source-app => source}/glossary/ios_and_android.rst (100%) rename docs/{source-app => source}/glossary/lightning_app_overview/index.rst (100%) rename docs/{source-app => source}/glossary/mount.rst (100%) rename docs/{source-app => source}/glossary/restful_api/restful_api.rst (100%) rename docs/{source-app => source}/glossary/scheduling.rst (93%) rename docs/{source-app => source}/glossary/secrets.rst (100%) rename docs/{source-app => source}/glossary/sharing_components.rst (100%) rename docs/{source-app => source}/glossary/storage/differences.rst (94%) rename docs/{source-app => source}/glossary/storage/drive.rst (100%) rename docs/{source-app => source}/glossary/storage/drive_content.rst (96%) rename docs/{source-app => source}/glossary/storage/drive_content_old.rst (94%) rename docs/{source-app => source}/glossary/storage/path.rst (96%) rename docs/{source-app => source}/glossary/storage/storage.rst (92%) rename docs/{source-app => source}/glossary/use_local_lightning.rst (100%) rename docs/{source-app => source}/index.rst (100%) rename docs/{source-app => source}/install/install_beginner.rst (100%) rename docs/{source-app => source}/install/installation.rst (100%) rename docs/{source-app => source}/install/mac.bash (100%) rename docs/{source-app => source}/install/pip.bash (100%) rename docs/{source-app => source}/install/windows.bash (100%) rename docs/{source-app => source}/intro.rst (100%) rename docs/{source-app => source}/landing_app.py (100%) rename docs/{source-app => source}/landing_app_run.bash (100%) rename docs/{source-app => source}/levels/advanced/index.rst (100%) rename docs/{source-app => source}/levels/advanced/level_16.rst (100%) rename docs/{source-app => source}/levels/advanced/level_17.rst (100%) rename docs/{source-app => source}/levels/advanced/level_18.rst (100%) rename docs/{source-app => source}/levels/advanced/level_19.rst (100%) rename docs/{source-app => source}/levels/advanced/level_20.rst (100%) rename docs/{source-app => source}/levels/advanced/start_dynamic_components.rst (100%) rename docs/{source-app => source}/levels/basic/build_a_dag.rst (100%) rename docs/{source-app => source}/levels/basic/build_a_lightning_component.rst (100%) rename docs/{source-app => source}/levels/basic/create_a_model_demo.rst (100%) rename docs/{source-app => source}/levels/basic/deploy_ai_model_api.rst (100%) rename docs/{source-app => source}/levels/basic/hello_components/code_run_cloud.bash (100%) rename docs/{source-app => source}/levels/basic/hello_components/code_run_cloud_setup.bash (100%) rename docs/{source-app => source}/levels/basic/hello_components/code_run_cloud_yours.bash (100%) rename docs/{source-app => source}/levels/basic/hello_components/code_run_cloud_yours_setup.bash (100%) rename docs/{source-app => source}/levels/basic/hello_components/code_run_local.bash (100%) rename docs/{source-app => source}/levels/basic/hello_components/code_run_local_setup.bash (100%) rename docs/{source-app => source}/levels/basic/hello_components/deploy_model.py (100%) rename docs/{source-app => source}/levels/basic/hello_components/hello_world.py (100%) rename docs/{source-app => source}/levels/basic/hello_components/hello_world_gpu.py (100%) rename docs/{source-app => source}/levels/basic/hello_components/multi_node.py (100%) rename docs/{source-app => source}/levels/basic/hello_components/pl_multinode.py (100%) rename docs/{source-app => source}/levels/basic/hello_components/pt_multinode.py (100%) rename docs/{source-app => source}/levels/basic/hello_components/run_ptl_script.py (100%) rename docs/{source-app => source}/levels/basic/hello_components/streamlit_demo.py (100%) rename docs/{source-app => source}/levels/basic/hello_components/terraform_example.bash (100%) rename docs/{source-app => source}/levels/basic/hello_components/train_ptl.py (100%) rename docs/{source-app => source}/levels/basic/hello_components/train_pytorch.py (100%) rename docs/{source-app => source}/levels/basic/hello_components/xgboost.py (100%) rename docs/{source-app => source}/levels/basic/hello_components/xgboost_gpu.py (100%) rename docs/{source-app => source}/levels/basic/hero_components.rst (100%) rename docs/{source-app => source}/levels/basic/hero_run.rst (100%) rename docs/{source-app => source}/levels/basic/hero_run_setup.rst (100%) rename docs/{source-app => source}/levels/basic/index.rst (100%) rename docs/{source-app => source}/levels/basic/key_features/accelerators.py (100%) rename docs/{source-app => source}/levels/basic/key_features/auto_timeout.py (100%) rename docs/{source-app => source}/levels/basic/key_features/custom_container.py (100%) rename docs/{source-app => source}/levels/basic/key_features/idle_machine.py (100%) rename docs/{source-app => source}/levels/basic/key_features/massive_dataset.py (100%) rename docs/{source-app => source}/levels/basic/key_features/mount_data.py (100%) rename docs/{source-app => source}/levels/basic/key_features/spot.py (100%) rename docs/{source-app => source}/levels/basic/real_lightning_component_implementations.rst (100%) rename docs/{source-app => source}/levels/basic/run_jupyter_notebook_on_the_cloud.rst (100%) rename docs/{source-app => source}/levels/basic/run_on_aws_account.rst (100%) rename docs/{source-app => source}/levels/basic/save_money_on_cloud_costs.rst (100%) rename docs/{source-app => source}/levels/basic/scripts/toy_app_1_component.py (100%) rename docs/{source-app => source}/levels/basic/scripts/toy_app_1_component_pdb.py (100%) rename docs/{source-app => source}/levels/basic/train_pytorch_on_the_cloud.rst (100%) rename docs/{source-app => source}/levels/expert/index.rst (100%) rename docs/{source-app => source}/levels/intermediate/connect_lightning_components.rst (100%) rename docs/{source-app => source}/levels/intermediate/debug_a_lightning_app.rst (100%) rename docs/{source-app => source}/levels/intermediate/debug_app_scripts/debug_app.py (100%) rename docs/{source-app => source}/levels/intermediate/debug_app_scripts/toy_app.py (100%) rename docs/{source-app => source}/levels/intermediate/debug_app_scripts/toy_app_1_component.py (100%) rename docs/{source-app => source}/levels/intermediate/debug_app_scripts/toy_app_1_component_pdb.py (100%) rename docs/{source-app => source}/levels/intermediate/embed_web_ui_into_lightningwork.rst (100%) rename docs/{source-app => source}/levels/intermediate/index.rst (100%) rename docs/{source-app => source}/levels/intermediate/level_12.rst (100%) rename docs/{source-app => source}/levels/intermediate/level_2_scripts/code_run_cloud.bash (100%) rename docs/{source-app => source}/levels/intermediate/level_2_scripts/code_run_local.bash (100%) rename docs/{source-app => source}/levels/intermediate/level_2_scripts/hello_app.py (100%) rename docs/{source-app => source}/levels/intermediate/level_2_scripts/hello_app_auto_scale.py (100%) rename docs/{source-app => source}/levels/intermediate/level_2_scripts/hello_app_cron.py (100%) rename docs/{source-app => source}/levels/intermediate/level_2_scripts/hello_app_scheduler.py (100%) rename docs/{source-app => source}/levels/intermediate/level_2_scripts/multi_cloud.bash (100%) rename docs/{source-app => source}/levels/intermediate/level_2_scripts/organized_app_python.py (100%) rename docs/{source-app => source}/levels/intermediate/level_2_scripts/tr.bash (100%) rename docs/{source-app => source}/levels/intermediate/level_9.rst (100%) rename docs/{source-app => source}/levels/intermediate/run_lightning_work_in_parallel.rst (100%) rename docs/{source-app => source}/levels/intermediate/scripts/.storage/a (100%) rename docs/{source-app => source}/levels/intermediate/scripts/.storage/embeddings (100%) rename docs/{source-app => source}/levels/intermediate/scripts/a (100%) rename docs/{source-app => source}/levels/intermediate/scripts/comms_1.py (100%) rename docs/{source-app => source}/levels/intermediate/scripts/debug_app.py (100%) rename docs/{source-app => source}/levels/intermediate/scripts/embeddings (100%) rename docs/{source-app => source}/levels/intermediate/scripts/toy_app.py (100%) rename docs/{source-app => source}/levels/intermediate/scripts/toy_payload.py (100%) rename docs/{source-app => source}/levels/intermediate/scripts/two_comms_non_ml.py (100%) rename docs/{source-app => source}/levels/intermediate/scripts/two_work_comms.py (100%) rename docs/{source-app => source}/levels/intermediate/share_files_between_components.rst (100%) rename docs/{source-app => source}/levels/intermediate/share_variables_between_lightning_components.rst (100%) rename docs/{source-app => source}/levels/intermediate/start_from_lightning_app_templates.rst (100%) rename docs/{source-app => source}/make.bat (100%) rename docs/{source-app => source}/moving_to_the_cloud.rst (91%) rename docs/{source-app => source}/quickstart.rst (100%) rename docs/{source-app => source}/testing.rst (95%) rename docs/{source-app => source}/ui_and_frontends.rst (100%) rename docs/{source-app => source}/workflows/access_app_state/access_app_state.rst (100%) rename docs/{source-app => source}/workflows/add_components/index.rst (100%) rename docs/{source-app => source}/workflows/add_server/any_server.rst (100%) rename docs/{source-app => source}/workflows/add_server/flask_basic.rst (100%) rename docs/{source-app => source}/workflows/add_server/index.rst (100%) rename docs/{source-app => source}/workflows/add_server/index_content.rst (100%) rename docs/{source-app => source}/workflows/add_web_link.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/angular_js_intermediate.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/dash/basic.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/dash/index.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/dash/intermediate.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/dash/intermediate_plot.py (100%) rename docs/{source-app => source}/workflows/add_web_ui/dash/intermediate_state.py (100%) rename docs/{source-app => source}/workflows/add_web_ui/example_app.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/glossary_front_end.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/glossary_ui.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/gradio/basic.rst (95%) rename docs/{source-app => source}/workflows/add_web_ui/gradio/index.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/gradio/intermediate.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/html/basic.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/html/index.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/html/intermediate.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/index.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/index_content.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/integrate_any_javascript_framework.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/jupyter_basic.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/justpy/index.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/panel/basic.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/panel/index.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/panel/intermediate.rst (96%) rename docs/{source-app => source}/workflows/add_web_ui/react/communicate_between_react_and_lightning.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/react/connect_react_and_lightning.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/react/create_react_template.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/react/index.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/react/react_development_workflow.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/streamlit/basic.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/streamlit/index.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/streamlit/intermediate.rst (100%) rename docs/{source-app => source}/workflows/add_web_ui/vue_js_intermediate.rst (100%) rename docs/{source-app => source}/workflows/arrange_tabs/arrange_app_basic.rst (100%) rename docs/{source-app => source}/workflows/arrange_tabs/arrange_app_intermediate.rst (100%) rename docs/{source-app => source}/workflows/arrange_tabs/index.rst (100%) rename docs/{source-app => source}/workflows/arrange_tabs/index_content.rst (100%) rename docs/{source-app => source}/workflows/build_command_line_interface/app.py (100%) rename docs/{source-app => source}/workflows/build_command_line_interface/cli.rst (98%) rename docs/{source-app => source}/workflows/build_command_line_interface/cli_client.rst (100%) rename docs/{source-app => source}/workflows/build_command_line_interface/commands/__init__.py (100%) rename docs/{source-app => source}/workflows/build_command_line_interface/commands/notebook/__init__.py (100%) rename docs/{source-app => source}/workflows/build_command_line_interface/commands/notebook/run.py (100%) rename docs/{source-app => source}/workflows/build_command_line_interface/example_command.py (100%) rename docs/{source-app => source}/workflows/build_command_line_interface/index.rst (100%) rename docs/{source-app => source}/workflows/build_command_line_interface/index_content.rst (100%) rename docs/{source-app => source}/workflows/build_command_line_interface/post_example.py (100%) rename docs/{source-app => source}/workflows/build_lightning_app/from_pytorch_lightning_script.rst (100%) rename docs/{source-app => source}/workflows/build_lightning_app/from_scratch.rst (100%) rename docs/{source-app => source}/workflows/build_lightning_app/from_scratch_content.rst (100%) rename docs/{source-app => source}/workflows/build_lightning_app/index.rst (100%) rename docs/{source-app => source}/workflows/build_lightning_app/index_content.rst (100%) rename docs/{source-app => source}/workflows/build_lightning_component/basic.rst (100%) rename docs/{source-app => source}/workflows/build_lightning_component/from_scratch_component_content.rst (100%) rename docs/{source-app => source}/workflows/build_lightning_component/index.rst (100%) rename docs/{source-app => source}/workflows/build_lightning_component/index_content.rst (100%) rename docs/{source-app => source}/workflows/build_lightning_component/intermediate.rst (100%) rename docs/{source-app => source}/workflows/build_lightning_component/publish_a_component.rst (100%) rename docs/{source-app => source}/workflows/build_rest_api/add_api.rst (86%) rename docs/{source-app => source}/workflows/build_rest_api/index.rst (100%) rename docs/{source-app => source}/workflows/build_rest_api/index_content.rst (100%) rename docs/{source-app => source}/workflows/build_rest_api/models.py (100%) rename docs/{source-app => source}/workflows/build_rest_api/post_example.py (100%) rename docs/{source-app => source}/workflows/build_rest_api/post_example_pydantic.py (100%) rename docs/{source-app => source}/workflows/build_rest_api/request_validation.rst (100%) rename docs/{source-app => source}/workflows/byoc/aws_cli.rst (100%) rename docs/{source-app => source}/workflows/byoc/aws_console.rst (100%) rename docs/{source-app => source}/workflows/byoc/create_cluster.rst (100%) rename docs/{source-app => source}/workflows/byoc/delete_cluster.rst (100%) rename docs/{source-app => source}/workflows/byoc/index.rst (100%) rename docs/{source-app => source}/workflows/byoc/run_on_cluster.rst (100%) rename docs/{source-app => source}/workflows/debug_locally.rst (100%) rename docs/{source-app => source}/workflows/enable_fault_tolerance.rst (100%) rename docs/{source-app => source}/workflows/extend_app.rst (100%) rename docs/{source-app => source}/workflows/index.rst (100%) rename docs/{source-app => source}/workflows/mount_cloud_object_store.rst (82%) rename docs/{source-app => source}/workflows/run_app_on_cloud/cloud_files.rst (100%) rename docs/{source-app => source}/workflows/run_app_on_cloud/index.rst (100%) rename docs/{source-app => source}/workflows/run_app_on_cloud/index_content.rst (100%) rename docs/{source-app => source}/workflows/run_app_on_cloud/lightning_cloud.rst (100%) rename docs/{source-app => source}/workflows/run_app_on_cloud/on_prem.rst (100%) rename docs/{source-app => source}/workflows/run_app_on_cloud/on_your_own_machine.rst (100%) rename docs/{source-app => source}/workflows/run_app_snippet.rst (100%) rename docs/{source-app => source}/workflows/run_components_on_different_hardware.rst (100%) rename docs/{source-app => source}/workflows/run_on_private_cloud.rst (100%) rename docs/{source-app => source}/workflows/run_work_in_parallel.rst (100%) rename docs/{source-app => source}/workflows/run_work_in_parallel_content.rst (100%) rename docs/{source-app => source}/workflows/run_work_once.rst (100%) rename docs/{source-app => source}/workflows/run_work_once_content.rst (98%) rename docs/{source-app => source}/workflows/schedule_apps.rst (100%) rename docs/{source-app => source}/workflows/scripts/parallel/toy_app.py (100%) rename docs/{source-app => source}/workflows/scripts/parallel/toy_parallel.py (100%) rename docs/{source-app => source}/workflows/scripts/parallel/toy_two_parallel.py (100%) rename docs/{source-app => source}/workflows/scripts/parallel/toy_two_parallel_not_started.py (100%) rename docs/{source-app => source}/workflows/share_app.rst (100%) rename docs/{source-app => source}/workflows/share_files_between_components.rst (92%) rename docs/{source-app => source}/workflows/share_files_between_components/app.py (100%) rename docs/{source-app => source}/workflows/ssh/index.rst (100%) rename docs/{source-app => source}/workflows/test_an_app.rst (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dd9443de6f90e..567d1e5c4be10 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -22,10 +22,10 @@ /docs/source-pytorch/index.rst @williamfalcon @lantiga /docs/source-pytorch/levels @williamfalcon @RobertLaurella /docs/source-pytorch/expertise_levels @williamfalcon @RobertLaurella -/docs/source-app/ @williamfalcon @RobertLaurella @tchaton @awaelchli -/docs/source-app/conf.py @borda @awaelchli @carmocca -/docs/source-app/index.rst @williamfalcon @lantiga -/docs/source-app/expertise_levels @williamfalcon @RobertLaurella +/docs/source/ @williamfalcon @RobertLaurella @tchaton @awaelchli +/docs/source/conf.py @borda @awaelchli @carmocca +/docs/source/index.rst @williamfalcon @lantiga +/docs/source/expertise_levels @williamfalcon @RobertLaurella # PyTorch Lightning /src/lightning/pytorch @williamfalcon @awaelchli @carmocca @justusschock @@ -40,9 +40,9 @@ /src/lightning/pytorch/core/module.py @williamfalcon @tchaton @awaelchli @carmocca # Lightning Fabric -/src/lightning/fabric @awaelchli @carmocca @justusschock -/src/lightning_fabric @awaelchli @carmocca @justusschock -/tests/tests_fabric @awaelchli @carmocca @justusschock +/src/lightning/fabric @awaelchli @carmocca @justusschock +/src/lightning_fabric @awaelchli @carmocca @justusschock +/tests/tests_fabric @awaelchli @carmocca @justusschock # Lightning App /src/lightning/app @tchaton @lantiga @awaelchli @hhsecond @ethanwharris diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index 69fff70a746e6..e5f553abf8fd4 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -309,7 +309,7 @@ subprojects: - ".actions/**" - "src/lightning/app/**" - "src/lightning_app/*" - - "docs/source-app/**" + - "docs/source/**" - ".github/workflows/docs-checks.yml" - "requirements/docs.txt" - "requirements/app/**" diff --git a/.github/labeler.yml b/.github/labeler.yml index 953db13adcec0..9800eac4bc92e 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -5,7 +5,7 @@ app: - 'tests/integrations_app/**' - 'tests/integrations_app_examples/**' - 'examples/app_*/**' - - 'docs/source-app/**' + - 'docs/source/**' - 'requirements/app/**' pl: diff --git a/.github/workflows/docs-checks.yml b/.github/workflows/docs-checks.yml index dbd356e33d675..57423f6870bad 100644 --- a/.github/workflows/docs-checks.yml +++ b/.github/workflows/docs-checks.yml @@ -27,6 +27,10 @@ defaults: run: shell: bash +env: + FREEZE_REQUIREMENTS: "1" + TORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html" + jobs: make-doctest: runs-on: ubuntu-latest @@ -35,9 +39,7 @@ jobs: strategy: fail-fast: false matrix: - pkg-name: ["app", "pytorch"] - env: - FREEZE_REQUIREMENTS: "1" + pkg-name: ["lightning", "pytorch"] steps: - uses: actions/checkout@v3 with: @@ -45,14 +47,14 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - uses: aws-actions/configure-aws-credentials@v1 - if: ${{ matrix.pkg-name == 'app' }} + if: ${{ matrix.pkg-name == 'lightning' }} with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_ID }} aws-region: us-east-1 - run: aws s3 sync s3://sphinx-packages/ pypi/ - if: ${{ matrix.pkg-name == 'app' }} + if: ${{ matrix.pkg-name == 'lightning' }} # Note: This uses an internal pip API and may not always work # https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow @@ -65,29 +67,34 @@ jobs: - name: Install LAI package # This is needed as App docs is heavily using/referring to lightning package - if: ${{ matrix.pkg-name == 'app' }} + if: ${{ matrix.pkg-name == 'lightning' }} run: | - pip install -e . -U -v -f https://download.pytorch.org/whl/cpu/torch_stable.html -f pypi + pip install -e . -U -v -f pypi -f ${TORCH_URL} - name: Adjust docs refs - if: ${{ matrix.pkg-name == 'app' }} + if: ${{ matrix.pkg-name == 'lightning' }} run: | pip install -q -r .actions/requirements.txt python .actions/assistant.py copy_replace_imports --source_dir="./docs" \ --source_import="pytorch_lightning,lightning_fabric" \ --target_import="lightning.pytorch,lightning.fabric" + - name: adjust paths + run: | + python -c "n = '${{ matrix.pkg-name }}' ; print('DOCS_DIR=source' + {'lightning': '', 'pytorch': '-pytorch'}.get(n))" >> $GITHUB_ENV + python -c "n = '${{ matrix.pkg-name }}' ; print('REQ_DIR=' + {'lightning': 'app'}.get(n, n))" >> $GITHUB_ENV + - name: Install this package env: PACKAGE_NAME: ${{ matrix.pkg-name }} run: | - pip install -e .[extra,cloud,ui] -U -r requirements/${{ matrix.pkg-name }}/docs.txt -f pypi + pip install -e .[extra,cloud,ui] -U -r requirements/${{ env.REQ_DIR }}/docs.txt -f pypi -f ${TORCH_URL} pip list - name: Test Documentation env: SPHINX_MOCK_REQUIREMENTS: 0 - working-directory: ./docs/source-${{ matrix.pkg-name }} + working-directory: ./docs/${{ env.DOCS_DIR }} run: | make doctest make coverage @@ -99,9 +106,7 @@ jobs: strategy: fail-fast: false matrix: - pkg-name: ["app", "pytorch"] - env: - FREEZE_REQUIREMENTS: "1" + pkg-name: ["lightning", "pytorch"] steps: - uses: actions/checkout@v3 with: @@ -124,26 +129,30 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/pip - key: docs-make-${{ matrix.pkg-name }}-${{ hashFiles('requirements/${{ matrix.pkg-name }}/*.txt') }} - restore-keys: docs-make-${{ matrix.pkg-name }}- + key: docs-make-${{ hashFiles('requirements/${{ matrix.pkg-name }}/*.txt') }} + restore-keys: docs-make- + + - name: adjust paths + run: | + python -c "n = '${{ matrix.pkg-name }}' ; print('DOCS_DIR=source' + {'lightning': '', 'pytorch': '-pytorch'}.get(n))" >> $GITHUB_ENV + python -c "n = '${{ matrix.pkg-name }}' ; print('REQ_DIR=' + {'lightning': 'app'}.get(n, n))" >> $GITHUB_ENV - name: Install package & dependencies env: PACKAGE_NAME: ${{ matrix.pkg-name }} run: | pip --version - pip install -e . -U -r requirements/${{ matrix.pkg-name }}/docs.txt \ - -f https://download.pytorch.org/whl/cpu/torch_stable.html -f pypi + pip install -e . -U -r requirements/${{ env.REQ_DIR }}/docs.txt -f pypi -f ${TORCH_URL} pip list shell: bash - name: Make Documentation - working-directory: ./docs/source-${{ matrix.pkg-name }} + working-directory: ./docs/${{ env.DOCS_DIR }} run: | make html --debug --jobs $(nproc) SPHINXOPTS="-W --keep-going" - name: Check External Links in Sphinx Documentation (Optional) - working-directory: ./docs/source-${{ matrix.pkg-name }} + working-directory: ./docs/${{ env.DOCS_DIR }} run: | make linkcheck continue-on-error: true diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index d705896b77e25..73a9ff975eb62 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -39,20 +39,21 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/pip - key: deploy-docs-pip-${{ hashFiles('requirements/app/*.txt') }} + key: deploy-docs-pip-${{ hashFiles('requirements/**/*.txt') }} restore-keys: deploy-docs-pip- - name: Install package & dependencies env: FREEZE_REQUIREMENTS: 1 + TORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html" run: | pip --version - pip install -e . --quiet -r requirements/app/docs.txt \ - -f https://download.pytorch.org/whl/cpu/torch_stable.html -f pypi + pip install -e . -r requirements/app/docs.txt \ + -f ${TORCH_URL} -f pypi pip list - name: Make Documentation - working-directory: ./docs/source-app + working-directory: ./docs/source run: | # First run the same pipeline as Read-The-Docs make clean @@ -69,12 +70,14 @@ jobs: single-commit: true # you'd prefer to have a single commit on the deployment branch instead of full history if: github.event_name == 'push' && github.ref == 'refs/heads/master' - - name: 'Authenticate to Google Cloud' + - name: Authenticate to Google Cloud + if: github.event_name == 'push' uses: google-github-actions/auth@v1 with: credentials_json: ${{ secrets.GCS_SA_KEY }} - name: Setup gcloud + if: github.event_name == 'push' uses: google-github-actions/setup-gcloud@v1 with: project_id: ${{ secrets.GCS_PROJECT }} diff --git a/.gitignore b/.gitignore index dc909922ff25b..ebacb453f9ec3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,8 @@ lightning_logs/ .vscode/ # Documentations -docs/source-app/generated -docs/source-app/*/generated +docs/source/generated +docs/source/*/generated docs/source-pytorch/api docs/source-pytorch/*.md docs/source-pytorch/generated diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b9041192b5948..52c72c7e6e380 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -71,21 +71,21 @@ repos: hooks: - id: isort name: Format imports - exclude: docs/source-app + exclude: docs/source - repo: https://github.com/psf/black rev: 22.12.0 hooks: - id: black name: Format code - exclude: docs/source-app + exclude: docs/source - repo: https://github.com/asottile/blacken-docs rev: 1.13.0 hooks: - id: blacken-docs args: [--line-length=120] - exclude: docs/source-app + exclude: docs/source - repo: https://github.com/executablebooks/mdformat rev: 0.7.16 diff --git a/Makefile b/Makefile index ccf5780c364f0..9401378149c36 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,8 @@ clean: rm -rf ./docs/source-pytorch/generated rm -rf ./docs/source-pytorch/*/generated rm -rf ./docs/source-pytorch/api - rm -rf ./docs/source-app/generated - rm -rf ./docs/source-app/*/generated + rm -rf ./docs/source/generated + rm -rf ./docs/source/*/generated rm -rf build rm -rf dist rm -rf *.egg-info @@ -45,7 +45,7 @@ test: clean docs: clean pip install -e . --quiet -r requirements/app/docs.txt - cd docs/source-app && $(MAKE) html + cd docs/source && $(MAKE) html update: git submodule update --init --recursive --remote diff --git a/docs/source-app/api_reference/api/lightning_app.core.LightningApp.rst b/docs/source-app/api_reference/api/lightning_app.core.LightningApp.rst deleted file mode 100644 index 8f0a39b44d535..0000000000000 --- a/docs/source-app/api_reference/api/lightning_app.core.LightningApp.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. role:: hidden - :class: hidden-section -.. currentmodule:: lightning_app.core - - -LightningApp -============ - -.. autoclass:: LightningApp - :members: diff --git a/docs/source-app/api_reference/api/lightning_app.core.LightningFlow.rst b/docs/source-app/api_reference/api/lightning_app.core.LightningFlow.rst deleted file mode 100644 index d305b42d6fc38..0000000000000 --- a/docs/source-app/api_reference/api/lightning_app.core.LightningFlow.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. role:: hidden - :class: hidden-section -.. currentmodule:: lightning_app.core - - -LightningFlow -============= - -.. autoclass:: LightningFlow - :members: diff --git a/docs/source-app/api_reference/api/lightning_app.core.LightningWork.rst b/docs/source-app/api_reference/api/lightning_app.core.LightningWork.rst deleted file mode 100644 index 77965e2146757..0000000000000 --- a/docs/source-app/api_reference/api/lightning_app.core.LightningWork.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. role:: hidden - :class: hidden-section -.. currentmodule:: lightning_app.core - - -LightningWork -============= - -.. autoclass:: LightningWork - :members: diff --git a/docs/source-app/Makefile b/docs/source/Makefile similarity index 100% rename from docs/source-app/Makefile rename to docs/source/Makefile diff --git a/docs/source-app/_static/copybutton.js b/docs/source/_static/copybutton.js similarity index 100% rename from docs/source-app/_static/copybutton.js rename to docs/source/_static/copybutton.js diff --git a/docs/source-app/_static/images/icon.svg b/docs/source/_static/images/icon.svg similarity index 100% rename from docs/source-app/_static/images/icon.svg rename to docs/source/_static/images/icon.svg diff --git a/docs/source-app/_static/images/logo-large.svg b/docs/source/_static/images/logo-large.svg similarity index 100% rename from docs/source-app/_static/images/logo-large.svg rename to docs/source/_static/images/logo-large.svg diff --git a/docs/source-app/_static/images/logo-small.svg b/docs/source/_static/images/logo-small.svg similarity index 100% rename from docs/source-app/_static/images/logo-small.svg rename to docs/source/_static/images/logo-small.svg diff --git a/docs/source-app/_static/images/logo.png b/docs/source/_static/images/logo.png similarity index 100% rename from docs/source-app/_static/images/logo.png rename to docs/source/_static/images/logo.png diff --git a/docs/source-app/_static/images/logo.svg b/docs/source/_static/images/logo.svg similarity index 100% rename from docs/source-app/_static/images/logo.svg rename to docs/source/_static/images/logo.svg diff --git a/docs/source-app/_static/main.css b/docs/source/_static/main.css similarity index 100% rename from docs/source-app/_static/main.css rename to docs/source/_static/main.css diff --git a/docs/source-app/_templates/classtemplate.rst b/docs/source/_templates/classtemplate.rst similarity index 100% rename from docs/source-app/_templates/classtemplate.rst rename to docs/source/_templates/classtemplate.rst diff --git a/docs/source-app/_templates/classtemplate_no_index.rst b/docs/source/_templates/classtemplate_no_index.rst similarity index 100% rename from docs/source-app/_templates/classtemplate_no_index.rst rename to docs/source/_templates/classtemplate_no_index.rst diff --git a/docs/source-app/_templates/layout.html b/docs/source/_templates/layout.html similarity index 100% rename from docs/source-app/_templates/layout.html rename to docs/source/_templates/layout.html diff --git a/docs/source-app/_templates/theme_variables.jinja b/docs/source/_templates/theme_variables.jinja similarity index 100% rename from docs/source-app/_templates/theme_variables.jinja rename to docs/source/_templates/theme_variables.jinja diff --git a/docs/source-app/api_reference/components.rst b/docs/source/api_reference/components.rst similarity index 95% rename from docs/source-app/api_reference/components.rst rename to docs/source/api_reference/components.rst index 5a3cb681e15b6..69d53b79e76ce 100644 --- a/docs/source-app/api_reference/components.rst +++ b/docs/source/api_reference/components.rst @@ -7,7 +7,7 @@ lightning.app.components :local: :backlinks: top -.. currentmodule:: lightning_app.components +.. currentmodule:: lightning.app.components Built-in Components diff --git a/docs/source-app/api_reference/core.rst b/docs/source/api_reference/core.rst similarity index 90% rename from docs/source-app/api_reference/core.rst rename to docs/source/api_reference/core.rst index 10a23f8c71f49..324f3c448978f 100644 --- a/docs/source-app/api_reference/core.rst +++ b/docs/source/api_reference/core.rst @@ -9,7 +9,7 @@ lightning.app.core :local: :backlinks: top -.. currentmodule:: lightning_app.core +.. currentmodule:: lightning.app.core Core APIs ___________________ diff --git a/docs/source-app/api_reference/frontend.rst b/docs/source/api_reference/frontend.rst similarity index 91% rename from docs/source-app/api_reference/frontend.rst rename to docs/source/api_reference/frontend.rst index 88901875591f3..514b2cf35bc75 100644 --- a/docs/source-app/api_reference/frontend.rst +++ b/docs/source/api_reference/frontend.rst @@ -7,7 +7,7 @@ lightning.app.frontend :local: :backlinks: top -.. currentmodule:: lightning_app.frontend +.. currentmodule:: lightning.app.frontend Lightning FrontEnds ___________________ diff --git a/docs/source-app/api_reference/runners.rst b/docs/source/api_reference/runners.rst similarity index 88% rename from docs/source-app/api_reference/runners.rst rename to docs/source/api_reference/runners.rst index 1036df1731eb8..f7e550b7c7733 100644 --- a/docs/source-app/api_reference/runners.rst +++ b/docs/source/api_reference/runners.rst @@ -7,7 +7,7 @@ lightning.app.runners :local: :backlinks: top -.. currentmodule:: lightning_app.runners +.. currentmodule:: lightning.app.runners Lightning Core ______________ diff --git a/docs/source-app/api_reference/storage.rst b/docs/source/api_reference/storage.rst similarity index 97% rename from docs/source-app/api_reference/storage.rst rename to docs/source/api_reference/storage.rst index 4d125b80ae244..3173914427586 100644 --- a/docs/source-app/api_reference/storage.rst +++ b/docs/source/api_reference/storage.rst @@ -10,7 +10,7 @@ ______________ :local: :backlinks: top -.. currentmodule:: lightning_app.storage +.. currentmodule:: lightning.app.storage .. autosummary:: :toctree: generated/ diff --git a/docs/source-app/basics.rst b/docs/source/basics.rst similarity index 89% rename from docs/source-app/basics.rst rename to docs/source/basics.rst index 14eaab1534f2f..8a64df8dcf62a 100644 --- a/docs/source-app/basics.rst +++ b/docs/source/basics.rst @@ -14,21 +14,21 @@ In this guide, we'll cover the basic terminology associated with the Lightning f Lightning App ************** -The :class:`~lightning_app.core.app.LightningApp` runs a tree of one or more components that interact to create end-to-end applications. There are two kinds of components: :class:`~lightning_app.core.flow.LightningFlow` and :class:`~lightning_app.core.work.LightningWork`. This modular design enables you to reuse components created by other users. +The :class:`~lightning.app.core.app.LightningApp` runs a tree of one or more components that interact to create end-to-end applications. There are two kinds of components: :class:`~lightning.app.core.flow.LightningFlow` and :class:`~lightning.app.core.work.LightningWork`. This modular design enables you to reuse components created by other users. ---- Lightning Work ^^^^^^^^^^^^^^ -The :class:`~lightning_app.core.work.LightningWork` component is a building block optimized for long-running jobs or integrating third-party services. LightningWork can be used for training large models, downloading a dataset, or any long-lasting operation. +The :class:`~lightning.app.core.work.LightningWork` component is a building block optimized for long-running jobs or integrating third-party services. LightningWork can be used for training large models, downloading a dataset, or any long-lasting operation. ---- Lightning Flow ^^^^^^^^^^^^^^ -The :class:`~lightning_app.core.flow.LightningFlow` component coordinates long-running tasks :class:`~lightning_app.core.work.LightningWork` and runs its children :class:`~lightning_app.core.flow.LightningFlow` components. +The :class:`~lightning.app.core.flow.LightningFlow` component coordinates long-running tasks :class:`~lightning.app.core.work.LightningWork` and runs its children :class:`~lightning.app.core.flow.LightningFlow` components. ---- @@ -58,7 +58,7 @@ Drawing inspiration from modern web frameworks like `React.js `_, the :class:`~lightning_app.core.work.LightningWork` +Similar to `React.js Components and Props `_, the :class:`~lightning.app.core.work.LightningWork` component accepts arbitrary inputs (the "props") to its **run** method and by default runs **once** for each unique input provided. Here's an example of this behavior: @@ -175,7 +175,7 @@ Here's the output you get when running the above application using **Lightning C .. code-block:: console - $ lightning run app docs/source-app/code_samples/quickstart/app_02.py + $ lightning run app docs/source/code_samples/quickstart/app_02.py INFO: Your app has started. View it in your browser: http://127.0.0.1:7501/view # After you have clicked `run` on the UI. 0.0 0.0 @@ -209,7 +209,7 @@ Multiple works In practical use cases, you might want to execute multiple long-running works in parallel. To enable this behavior, set ``parallel=True`` in the ``__init__`` method of -your :class:`~lightning_app.core.work.LightningWork`. +your :class:`~lightning.app.core.work.LightningWork`. Here's an example of the interaction between parallel and non-parallel behaviors: @@ -230,7 +230,7 @@ When running the above app, we see the following logs: .. code-block:: console - $ lightning run app docs/source-app/code_samples/quickstart/app/app_0.py + $ lightning run app docs/source/code_samples/quickstart/app/app_0.py INFO: Your app has started. View it in your browser: http://127.0.0.1:7501/view # After you have clicked `run` on the UI. 0.0, 0.0 diff --git a/docs/source-app/cloud/customize_a_lightning_cluster.rst b/docs/source/cloud/customize_a_lightning_cluster.rst similarity index 100% rename from docs/source-app/cloud/customize_a_lightning_cluster.rst rename to docs/source/cloud/customize_a_lightning_cluster.rst diff --git a/docs/source-app/code_samples/basics/0.py b/docs/source/code_samples/basics/0.py similarity index 100% rename from docs/source-app/code_samples/basics/0.py rename to docs/source/code_samples/basics/0.py diff --git a/docs/source-app/code_samples/basics/1.py b/docs/source/code_samples/basics/1.py similarity index 100% rename from docs/source-app/code_samples/basics/1.py rename to docs/source/code_samples/basics/1.py diff --git a/docs/source-app/code_samples/convert_pl_to_app/app.py b/docs/source/code_samples/convert_pl_to_app/app.py similarity index 100% rename from docs/source-app/code_samples/convert_pl_to_app/app.py rename to docs/source/code_samples/convert_pl_to_app/app.py diff --git a/docs/source-app/code_samples/convert_pl_to_app/requirements.txt b/docs/source/code_samples/convert_pl_to_app/requirements.txt similarity index 100% rename from docs/source-app/code_samples/convert_pl_to_app/requirements.txt rename to docs/source/code_samples/convert_pl_to_app/requirements.txt diff --git a/docs/source-app/code_samples/convert_pl_to_app/train.py b/docs/source/code_samples/convert_pl_to_app/train.py similarity index 100% rename from docs/source-app/code_samples/convert_pl_to_app/train.py rename to docs/source/code_samples/convert_pl_to_app/train.py diff --git a/docs/source-app/code_samples/quickstart/__init__.py b/docs/source/code_samples/quickstart/__init__.py similarity index 100% rename from docs/source-app/code_samples/quickstart/__init__.py rename to docs/source/code_samples/quickstart/__init__.py diff --git a/docs/source-app/code_samples/quickstart/app/__init__.py b/docs/source/code_samples/quickstart/app/__init__.py similarity index 100% rename from docs/source-app/code_samples/quickstart/app/__init__.py rename to docs/source/code_samples/quickstart/app/__init__.py diff --git a/docs/source-app/code_samples/quickstart/app/app_0.py b/docs/source/code_samples/quickstart/app/app_0.py similarity index 100% rename from docs/source-app/code_samples/quickstart/app/app_0.py rename to docs/source/code_samples/quickstart/app/app_0.py diff --git a/docs/source-app/code_samples/quickstart/app/app_1.py b/docs/source/code_samples/quickstart/app/app_1.py similarity index 100% rename from docs/source-app/code_samples/quickstart/app/app_1.py rename to docs/source/code_samples/quickstart/app/app_1.py diff --git a/docs/source-app/code_samples/quickstart/app_01.py b/docs/source/code_samples/quickstart/app_01.py similarity index 100% rename from docs/source-app/code_samples/quickstart/app_01.py rename to docs/source/code_samples/quickstart/app_01.py diff --git a/docs/source-app/code_samples/quickstart/app_02.py b/docs/source/code_samples/quickstart/app_02.py similarity index 100% rename from docs/source-app/code_samples/quickstart/app_02.py rename to docs/source/code_samples/quickstart/app_02.py diff --git a/docs/source-app/code_samples/quickstart/app_03.py b/docs/source/code_samples/quickstart/app_03.py similarity index 100% rename from docs/source-app/code_samples/quickstart/app_03.py rename to docs/source/code_samples/quickstart/app_03.py diff --git a/docs/source-app/code_samples/quickstart/app_comp.py b/docs/source/code_samples/quickstart/app_comp.py similarity index 100% rename from docs/source-app/code_samples/quickstart/app_comp.py rename to docs/source/code_samples/quickstart/app_comp.py diff --git a/docs/source-app/code_samples/quickstart/hello_world/app.py b/docs/source/code_samples/quickstart/hello_world/app.py similarity index 100% rename from docs/source-app/code_samples/quickstart/hello_world/app.py rename to docs/source/code_samples/quickstart/hello_world/app.py diff --git a/docs/source-app/code_samples/quickstart/hello_world/app_ui.py b/docs/source/code_samples/quickstart/hello_world/app_ui.py similarity index 100% rename from docs/source-app/code_samples/quickstart/hello_world/app_ui.py rename to docs/source/code_samples/quickstart/hello_world/app_ui.py diff --git a/docs/source-app/code_samples/quickstart/hello_world/ui/index.html b/docs/source/code_samples/quickstart/hello_world/ui/index.html similarity index 100% rename from docs/source-app/code_samples/quickstart/hello_world/ui/index.html rename to docs/source/code_samples/quickstart/hello_world/ui/index.html diff --git a/docs/source-app/conf.py b/docs/source/conf.py similarity index 97% rename from docs/source-app/conf.py rename to docs/source/conf.py index b636b00c6116f..2eb479fff4523 100644 --- a/docs/source-app/conf.py +++ b/docs/source/conf.py @@ -18,7 +18,7 @@ import lai_sphinx_theme -import lightning_app +import lightning _PATH_HERE = os.path.abspath(os.path.dirname(__file__)) _PATH_ROOT = os.path.realpath(os.path.join(_PATH_HERE, "..", "..")) @@ -30,13 +30,13 @@ # this name shall match the project name in Github as it is used for linking to code project = "lightning" -copyright = lightning_app.__copyright__ -author = lightning_app.__author__ +copyright = lightning.__copyright__ +author = lightning.__author__ # The short X.Y version -version = lightning_app.__version__ +version = lightning.__version__ # The full version, including alpha/beta/rc tags -release = lightning_app.__version__ +release = lightning.__version__ # Options for the linkcode extension # ---------------------------------- @@ -164,9 +164,9 @@ # documentation. html_theme_options = { - "pytorch_project": lightning_app.__homepage__, + "pytorch_project": lightning.__homepage__, "analytics_id": "G-D3Q2ESCTZR", - "canonical_url": lightning_app.__homepage__, + "canonical_url": lightning.__homepage__, "collapse_navigation": False, "display_version": True, "logo_only": False, @@ -232,7 +232,7 @@ project + " Documentation", author, project, - lightning_app.__docs__, + lightning.__docs__, "Miscellaneous", ), ] @@ -328,7 +328,7 @@ def _package_list_from_file(file): def linkcode_resolve(domain, info): def find_source(): # try to find the file and line number, based on code from numpy: - # https://github.com/numpy/numpy/blob/master/doc/source-app/conf.py#L286 + # https://github.com/numpy/numpy/blob/master/doc/source/conf.py#L286 obj = sys.modules[info["module"]] for part in info["fullname"].split("."): obj = getattr(obj, part) diff --git a/docs/source-app/contribute_app.rst b/docs/source/contribute_app.rst similarity index 100% rename from docs/source-app/contribute_app.rst rename to docs/source/contribute_app.rst diff --git a/docs/source-app/core_api/lightning_app/app.py b/docs/source/core_api/lightning_app/app.py similarity index 100% rename from docs/source-app/core_api/lightning_app/app.py rename to docs/source/core_api/lightning_app/app.py diff --git a/docs/source-app/core_api/lightning_app/communication.rst b/docs/source/core_api/lightning_app/communication.rst similarity index 100% rename from docs/source-app/core_api/lightning_app/communication.rst rename to docs/source/core_api/lightning_app/communication.rst diff --git a/docs/source-app/core_api/lightning_app/communication_content.rst b/docs/source/core_api/lightning_app/communication_content.rst similarity index 98% rename from docs/source-app/core_api/lightning_app/communication_content.rst rename to docs/source/core_api/lightning_app/communication_content.rst index 44aa78eafb3e1..ea39749018757 100644 --- a/docs/source-app/core_api/lightning_app/communication_content.rst +++ b/docs/source/core_api/lightning_app/communication_content.rst @@ -81,7 +81,7 @@ Run the app with: .. code-block:: bash - lightning run app docs/source-app/core_api/lightning_app/app.py + lightning run app docs/source/core_api/lightning_app/app.py And here's the output you get when running the App using the **Lightning CLI**: diff --git a/docs/source-app/core_api/lightning_app/compute_content.rst b/docs/source/core_api/lightning_app/compute_content.rst similarity index 86% rename from docs/source-app/core_api/lightning_app/compute_content.rst rename to docs/source/core_api/lightning_app/compute_content.rst index 753bcacf33a82..8bb2e7039ad83 100644 --- a/docs/source-app/core_api/lightning_app/compute_content.rst +++ b/docs/source/core_api/lightning_app/compute_content.rst @@ -5,7 +5,7 @@ Customize my Flow resources *************************** In the cloud, you can simply configure which machine to run on by passing -a :class:`~lightning_app.utilities.packaging.cloud_compute.CloudCompute` to your work ``__init__`` method: +a :class:`~lightning.app.utilities.packaging.cloud_compute.CloudCompute` to your work ``__init__`` method: .. code-block:: python @@ -36,5 +36,5 @@ The up-to-date prices for these instances can be found `here `_ sessions on their hardware of choice. -To allow every notebook to choose hardware, it needs to be set up in it's own :class:`~lightning_app.core.work.LightningWork`, but you can't know the number of notebooks user will need in advance. In this case you'll need to add ``LightningWorks`` dynamically at run time. +To allow every notebook to choose hardware, it needs to be set up in it's own :class:`~lightning.app.core.work.LightningWork`, but you can't know the number of notebooks user will need in advance. In this case you'll need to add ``LightningWorks`` dynamically at run time. ---- @@ -46,11 +46,11 @@ There are a couple of ways you can add a dynamic Work: # Run the `Work` component. getattr(self, "work").run() -**OPTION 2:** Use the built-in Lightning classes :class:`~lightning_app.structures.Dict` or :class:`~lightning_app.structures.List` +**OPTION 2:** Use the built-in Lightning classes :class:`~lightning.app.structures.Dict` or :class:`~lightning.app.structures.List` .. code-block:: python - from lightning_app.structures import Dict + from lightning.app.structures import Dict class RootFlow(lapp.LightningFlow): diff --git a/docs/source-app/core_api/lightning_app/index.rst b/docs/source/core_api/lightning_app/index.rst similarity index 100% rename from docs/source-app/core_api/lightning_app/index.rst rename to docs/source/core_api/lightning_app/index.rst diff --git a/docs/source-app/core_api/lightning_app/lightning_app.rst b/docs/source/core_api/lightning_app/lightning_app.rst similarity index 77% rename from docs/source-app/core_api/lightning_app/lightning_app.rst rename to docs/source/core_api/lightning_app/lightning_app.rst index 497dde20d2825..af9592628a6f2 100644 --- a/docs/source-app/core_api/lightning_app/lightning_app.rst +++ b/docs/source/core_api/lightning_app/lightning_app.rst @@ -7,6 +7,6 @@ LightningApp ############ -.. autoclass:: lightning_app.core.app.LightningApp +.. autoclass:: lightning.app.core.app.LightningApp :exclude-members: _run, connect, get_component_by_name, maybe_apply_changes, set_state :noindex: diff --git a/docs/source-app/core_api/lightning_flow.rst b/docs/source/core_api/lightning_flow.rst similarity index 72% rename from docs/source-app/core_api/lightning_flow.rst rename to docs/source/core_api/lightning_flow.rst index a6ee8b2eca340..642112ae02793 100644 --- a/docs/source-app/core_api/lightning_flow.rst +++ b/docs/source/core_api/lightning_flow.rst @@ -4,5 +4,5 @@ LightningFlow ############# -.. autoclass:: lightning_app.core.flow.LightningFlow +.. autoclass:: lightning.app.core.flow.LightningFlow :exclude-members: _attach_backend, _exit, _is_state_attribute, set_state diff --git a/docs/source-app/core_api/lightning_work/compute.rst b/docs/source/core_api/lightning_work/compute.rst similarity index 100% rename from docs/source-app/core_api/lightning_work/compute.rst rename to docs/source/core_api/lightning_work/compute.rst diff --git a/docs/source-app/core_api/lightning_work/compute_content.rst b/docs/source/core_api/lightning_work/compute_content.rst similarity index 94% rename from docs/source-app/core_api/lightning_work/compute_content.rst rename to docs/source/core_api/lightning_work/compute_content.rst index 8c5064875270d..1ca64429dc342 100644 --- a/docs/source-app/core_api/lightning_work/compute_content.rst +++ b/docs/source/core_api/lightning_work/compute_content.rst @@ -4,7 +4,7 @@ Customize my Work resources *************************** In the cloud, you can simply configure which machine to run on by passing -a :class:`~lightning_app.utilities.packaging.cloud_compute.CloudCompute` to your work ``__init__`` method: +a :class:`~lightning.app.utilities.packaging.cloud_compute.CloudCompute` to your work ``__init__`` method: .. code-block:: python @@ -90,5 +90,5 @@ By providing **idle_timeout=X Seconds**, the work is automatically stopped **X s CloudCompute ************ -.. autoclass:: lightning_app.utilities.packaging.cloud_compute.CloudCompute +.. autoclass:: lightning.app.utilities.packaging.cloud_compute.CloudCompute :noindex: diff --git a/docs/source-app/core_api/lightning_work/handling_app_exception.rst b/docs/source/core_api/lightning_work/handling_app_exception.rst similarity index 100% rename from docs/source-app/core_api/lightning_work/handling_app_exception.rst rename to docs/source/core_api/lightning_work/handling_app_exception.rst diff --git a/docs/source-app/core_api/lightning_work/handling_app_exception_content.rst b/docs/source/core_api/lightning_work/handling_app_exception_content.rst similarity index 100% rename from docs/source-app/core_api/lightning_work/handling_app_exception_content.rst rename to docs/source/core_api/lightning_work/handling_app_exception_content.rst diff --git a/docs/source-app/core_api/lightning_work/index.rst b/docs/source/core_api/lightning_work/index.rst similarity index 100% rename from docs/source-app/core_api/lightning_work/index.rst rename to docs/source/core_api/lightning_work/index.rst diff --git a/docs/source-app/core_api/lightning_work/lightning_work.rst b/docs/source/core_api/lightning_work/lightning_work.rst similarity index 78% rename from docs/source-app/core_api/lightning_work/lightning_work.rst rename to docs/source/core_api/lightning_work/lightning_work.rst index f4f490dd1fd39..54c7328411a3c 100644 --- a/docs/source-app/core_api/lightning_work/lightning_work.rst +++ b/docs/source/core_api/lightning_work/lightning_work.rst @@ -6,6 +6,6 @@ LightningWork ############# -.. autoclass:: lightning_app.core.work.LightningWork +.. autoclass:: lightning.app.core.work.LightningWork :exclude-members: _aggregate_status_timeout, _is_state_attribute, _is_state_attribute, set_state :noindex: diff --git a/docs/source-app/core_api/lightning_work/payload.rst b/docs/source/core_api/lightning_work/payload.rst similarity index 100% rename from docs/source-app/core_api/lightning_work/payload.rst rename to docs/source/core_api/lightning_work/payload.rst diff --git a/docs/source-app/core_api/lightning_work/payload_content.rst b/docs/source/core_api/lightning_work/payload_content.rst similarity index 100% rename from docs/source-app/core_api/lightning_work/payload_content.rst rename to docs/source/core_api/lightning_work/payload_content.rst diff --git a/docs/source-app/core_api/lightning_work/status.rst b/docs/source/core_api/lightning_work/status.rst similarity index 100% rename from docs/source-app/core_api/lightning_work/status.rst rename to docs/source/core_api/lightning_work/status.rst diff --git a/docs/source-app/core_api/lightning_work/status_content.rst b/docs/source/core_api/lightning_work/status_content.rst similarity index 100% rename from docs/source-app/core_api/lightning_work/status_content.rst rename to docs/source/core_api/lightning_work/status_content.rst diff --git a/docs/source-app/core_api/core_api.rst b/docs/source/core_api/overview.rst similarity index 100% rename from docs/source-app/core_api/core_api.rst rename to docs/source/core_api/overview.rst diff --git a/docs/source-app/examples/dag/dag.rst b/docs/source/examples/dag/dag.rst similarity index 97% rename from docs/source-app/examples/dag/dag.rst rename to docs/source/examples/dag/dag.rst index fb7af2c945fd2..0df028ebbb0ce 100644 --- a/docs/source-app/examples/dag/dag.rst +++ b/docs/source/examples/dag/dag.rst @@ -29,7 +29,7 @@ Below is a pseudo-code using the lightning framework that uses a LightningFlow t self.train_work.run(...) self.serve_work.run(...) -Below is a pseudo-code to run several works in parallel using a built-in :class:`~lightning_app.structures.Dict`. +Below is a pseudo-code to run several works in parallel using a built-in :class:`~lightning.app.structures.Dict`. .. code-block:: python diff --git a/docs/source-app/examples/dag/dag_from_scratch.rst b/docs/source/examples/dag/dag_from_scratch.rst similarity index 100% rename from docs/source-app/examples/dag/dag_from_scratch.rst rename to docs/source/examples/dag/dag_from_scratch.rst diff --git a/docs/source-app/examples/data_explore_app.rst b/docs/source/examples/data_explore_app.rst similarity index 100% rename from docs/source-app/examples/data_explore_app.rst rename to docs/source/examples/data_explore_app.rst diff --git a/docs/source-app/examples/etl_app.rst b/docs/source/examples/etl_app.rst similarity index 100% rename from docs/source-app/examples/etl_app.rst rename to docs/source/examples/etl_app.rst diff --git a/docs/source-app/examples/file_server/app.py b/docs/source/examples/file_server/app.py similarity index 99% rename from docs/source-app/examples/file_server/app.py rename to docs/source/examples/file_server/app.py index 004f3733767b0..edb65f6f63d52 100644 --- a/docs/source-app/examples/file_server/app.py +++ b/docs/source/examples/file_server/app.py @@ -229,7 +229,7 @@ def test_file_server(): def test_file_server_in_cloud(): # You need to provide the directory containing the app file. - app_dir = "docs/source-app/examples/file_server" + app_dir = "docs/source/examples/file_server" with run_app_in_cloud(app_dir) as (admin_page, view_page, get_logs_fn): """# 1. `admin_page` and `view_page` are playwright Page Objects. diff --git a/docs/source-app/examples/file_server/file_server.rst b/docs/source/examples/file_server/file_server.rst similarity index 100% rename from docs/source-app/examples/file_server/file_server.rst rename to docs/source/examples/file_server/file_server.rst diff --git a/docs/source-app/examples/file_server/file_server_content.rst b/docs/source/examples/file_server/file_server_content.rst similarity index 100% rename from docs/source-app/examples/file_server/file_server_content.rst rename to docs/source/examples/file_server/file_server_content.rst diff --git a/docs/source-app/examples/file_server/file_server_step_1.rst b/docs/source/examples/file_server/file_server_step_1.rst similarity index 100% rename from docs/source-app/examples/file_server/file_server_step_1.rst rename to docs/source/examples/file_server/file_server_step_1.rst diff --git a/docs/source-app/examples/file_server/file_server_step_2.rst b/docs/source/examples/file_server/file_server_step_2.rst similarity index 96% rename from docs/source-app/examples/file_server/file_server_step_2.rst rename to docs/source/examples/file_server/file_server_step_2.rst index d3bd199ceacdb..86471604a124f 100644 --- a/docs/source-app/examples/file_server/file_server_step_2.rst +++ b/docs/source/examples/file_server/file_server_step_2.rst @@ -12,7 +12,7 @@ Implement the upload method In this method, we are creating a stream between the uploaded file and the uploaded file stored on the file server disk. -Once the file is uploaded, we are putting the file into the :class:`~lightning_app.storage.drive.Drive`, so it becomes persistent and accessible to all Components. +Once the file is uploaded, we are putting the file into the :class:`~lightning.app.storage.drive.Drive`, so it becomes persistent and accessible to all Components. .. literalinclude:: ./app.py :lines: 12, 51-99 diff --git a/docs/source-app/examples/file_server/file_server_step_3.rst b/docs/source/examples/file_server/file_server_step_3.rst similarity index 100% rename from docs/source-app/examples/file_server/file_server_step_3.rst rename to docs/source/examples/file_server/file_server_step_3.rst diff --git a/docs/source-app/examples/file_server/file_server_step_4.rst b/docs/source/examples/file_server/file_server_step_4.rst similarity index 97% rename from docs/source-app/examples/file_server/file_server_step_4.rst rename to docs/source/examples/file_server/file_server_step_4.rst index 70930b64fccd6..04517dfa7baf3 100644 --- a/docs/source-app/examples/file_server/file_server_step_4.rst +++ b/docs/source/examples/file_server/file_server_step_4.rst @@ -33,7 +33,7 @@ Clone the Lightning repo and run the following command: .. code-block:: bash - pytest docs/source-app/examples/file_server/app.py --capture=no -v + pytest docs/source/examples/file_server/app.py --capture=no -v ---- diff --git a/docs/source-app/examples/github_repo_runner/app.py b/docs/source/examples/github_repo_runner/app.py similarity index 100% rename from docs/source-app/examples/github_repo_runner/app.py rename to docs/source/examples/github_repo_runner/app.py diff --git a/docs/source-app/examples/github_repo_runner/github_repo_runner.rst b/docs/source/examples/github_repo_runner/github_repo_runner.rst similarity index 87% rename from docs/source-app/examples/github_repo_runner/github_repo_runner.rst rename to docs/source/examples/github_repo_runner/github_repo_runner.rst index 02064ca4b9b5f..7e239b2dfd33d 100644 --- a/docs/source-app/examples/github_repo_runner/github_repo_runner.rst +++ b/docs/source/examples/github_repo_runner/github_repo_runner.rst @@ -8,7 +8,7 @@ Develop a Github Repo Script Runner **Audience:** Users that want to develop interactive applications which runs Github Repo in the cloud at any scale for multiple users. -**Prerequisite**: Reach :ref:`level 16+ ` and read the docstring of of :class:`~lightning_app.components.python.tracer.TracerPythonScript` component. +**Prerequisite**: Reach :ref:`level 16+ ` and read the docstring of of :class:`~lightning.app.components.python.tracer.TracerPythonScript` component. ---- diff --git a/docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst b/docs/source/examples/github_repo_runner/github_repo_runner_content.rst similarity index 100% rename from docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst rename to docs/source/examples/github_repo_runner/github_repo_runner_content.rst diff --git a/docs/source-app/examples/github_repo_runner/github_repo_runner_step_1.rst b/docs/source/examples/github_repo_runner/github_repo_runner_step_1.rst similarity index 100% rename from docs/source-app/examples/github_repo_runner/github_repo_runner_step_1.rst rename to docs/source/examples/github_repo_runner/github_repo_runner_step_1.rst diff --git a/docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst b/docs/source/examples/github_repo_runner/github_repo_runner_step_2.rst similarity index 97% rename from docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst rename to docs/source/examples/github_repo_runner/github_repo_runner_step_2.rst index 387709bdf13c9..deae8844c8fc2 100644 --- a/docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst +++ b/docs/source/examples/github_repo_runner/github_repo_runner_step_2.rst @@ -10,7 +10,7 @@ As a matter of fact, this component adds two primary tailored features for PyTor * It injects dynamically a custom callback ``TensorboardServerLauncher`` in the PyTorch Lightning Trainer to start a tensorboard server so it can be exposed in Lightning App UI. -* Once the script has run, the ``on_after_run`` hook of the :class:`~lightning_app.components.python.tracer.TracerPythonScript` is invoked with the script globals, meaning we can collect anything we need. In particular, we are reloading the best model, torch scripting it, and storing its path in the state along side the best metric score. +* Once the script has run, the ``on_after_run`` hook of the :class:`~lightning.app.components.python.tracer.TracerPythonScript` is invoked with the script globals, meaning we can collect anything we need. In particular, we are reloading the best model, torch scripting it, and storing its path in the state along side the best metric score. Let's dive in on how to develop the component with the following code: diff --git a/docs/source-app/examples/github_repo_runner/github_repo_runner_step_3.rst b/docs/source/examples/github_repo_runner/github_repo_runner_step_3.rst similarity index 100% rename from docs/source-app/examples/github_repo_runner/github_repo_runner_step_3.rst rename to docs/source/examples/github_repo_runner/github_repo_runner_step_3.rst diff --git a/docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst b/docs/source/examples/github_repo_runner/github_repo_runner_step_4.rst similarity index 100% rename from docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst rename to docs/source/examples/github_repo_runner/github_repo_runner_step_4.rst diff --git a/docs/source-app/examples/github_repo_runner/github_repo_runner_step_5.rst b/docs/source/examples/github_repo_runner/github_repo_runner_step_5.rst similarity index 90% rename from docs/source-app/examples/github_repo_runner/github_repo_runner_step_5.rst rename to docs/source/examples/github_repo_runner/github_repo_runner_step_5.rst index a57ee40475200..9b5b469d5b793 100644 --- a/docs/source-app/examples/github_repo_runner/github_repo_runner_step_5.rst +++ b/docs/source/examples/github_repo_runner/github_repo_runner_step_5.rst @@ -16,13 +16,13 @@ Clone the Lightning repo and run the following command: .. code-block:: bash - lightning run app docs/source-app/examples/github_repo_runner/app.py + lightning run app docs/source/examples/github_repo_runner/app.py Add ``--cloud`` to run this application in the cloud. .. code-block:: bash - lightning run app docs/source-app/examples/github_repo_runner/app.py --cloud + lightning run app docs/source/examples/github_repo_runner/app.py --cloud ---- diff --git a/docs/source-app/examples/hands_on_example.rst b/docs/source/examples/hands_on_example.rst similarity index 100% rename from docs/source-app/examples/hands_on_example.rst rename to docs/source/examples/hands_on_example.rst diff --git a/docs/source-app/examples/index.rst b/docs/source/examples/index.rst similarity index 100% rename from docs/source-app/examples/index.rst rename to docs/source/examples/index.rst diff --git a/docs/source-app/examples/model_server_app/app.py b/docs/source/examples/model_server_app/app.py similarity index 100% rename from docs/source-app/examples/model_server_app/app.py rename to docs/source/examples/model_server_app/app.py diff --git a/docs/source-app/examples/model_server_app/load_testing.rst b/docs/source/examples/model_server_app/load_testing.rst similarity index 100% rename from docs/source-app/examples/model_server_app/load_testing.rst rename to docs/source/examples/model_server_app/load_testing.rst diff --git a/docs/source-app/examples/model_server_app/locust_component.py b/docs/source/examples/model_server_app/locust_component.py similarity index 100% rename from docs/source-app/examples/model_server_app/locust_component.py rename to docs/source/examples/model_server_app/locust_component.py diff --git a/docs/source-app/examples/model_server_app/locustfile.py b/docs/source/examples/model_server_app/locustfile.py similarity index 100% rename from docs/source-app/examples/model_server_app/locustfile.py rename to docs/source/examples/model_server_app/locustfile.py diff --git a/docs/source-app/examples/model_server_app/model_server.py b/docs/source/examples/model_server_app/model_server.py similarity index 100% rename from docs/source-app/examples/model_server_app/model_server.py rename to docs/source/examples/model_server_app/model_server.py diff --git a/docs/source-app/examples/model_server_app/model_server.rst b/docs/source/examples/model_server_app/model_server.rst similarity index 100% rename from docs/source-app/examples/model_server_app/model_server.rst rename to docs/source/examples/model_server_app/model_server.rst diff --git a/docs/source-app/examples/model_server_app/model_server_app.rst b/docs/source/examples/model_server_app/model_server_app.rst similarity index 100% rename from docs/source-app/examples/model_server_app/model_server_app.rst rename to docs/source/examples/model_server_app/model_server_app.rst diff --git a/docs/source-app/examples/model_server_app/model_server_app_content.rst b/docs/source/examples/model_server_app/model_server_app_content.rst similarity index 100% rename from docs/source-app/examples/model_server_app/model_server_app_content.rst rename to docs/source/examples/model_server_app/model_server_app_content.rst diff --git a/docs/source-app/examples/model_server_app/putting_everything_together.rst b/docs/source/examples/model_server_app/putting_everything_together.rst similarity index 95% rename from docs/source-app/examples/model_server_app/putting_everything_together.rst rename to docs/source/examples/model_server_app/putting_everything_together.rst index 28f4fd2f56fed..48162a911f1a0 100644 --- a/docs/source-app/examples/model_server_app/putting_everything_together.rst +++ b/docs/source/examples/model_server_app/putting_everything_together.rst @@ -17,7 +17,7 @@ To run the app, simply open a terminal and execute this command: .. code-block:: bash - lightning run app docs/source-app/examples/model_deploy_app/app.py + lightning run app docs/source/examples/model_deploy_app/app.py Here is a gif of the UI. diff --git a/docs/source-app/examples/model_server_app/train.py b/docs/source/examples/model_server_app/train.py similarity index 100% rename from docs/source-app/examples/model_server_app/train.py rename to docs/source/examples/model_server_app/train.py diff --git a/docs/source-app/examples/model_server_app/train.rst b/docs/source/examples/model_server_app/train.rst similarity index 94% rename from docs/source-app/examples/model_server_app/train.rst rename to docs/source/examples/model_server_app/train.rst index 4e828872f4278..fdb6f6a93a0a7 100644 --- a/docs/source-app/examples/model_server_app/train.rst +++ b/docs/source/examples/model_server_app/train.rst @@ -6,7 +6,7 @@ In the code below, we create a work which trains a simple `SVC `_ model on the digits dataset (classification). -Once the model is trained, it is saved and a reference :class:`~lightning_app.storage.path.Path` with ``best_model_path`` state attribute. +Once the model is trained, it is saved and a reference :class:`~lightning.app.storage.path.Path` with ``best_model_path`` state attribute. .. literalinclude:: ./train.py diff --git a/docs/source-app/examples/research_demo_app.rst b/docs/source/examples/research_demo_app.rst similarity index 100% rename from docs/source-app/examples/research_demo_app.rst rename to docs/source/examples/research_demo_app.rst diff --git a/docs/source-app/get_started/add_an_interactive_demo.rst b/docs/source/get_started/add_an_interactive_demo.rst similarity index 100% rename from docs/source-app/get_started/add_an_interactive_demo.rst rename to docs/source/get_started/add_an_interactive_demo.rst diff --git a/docs/source-app/get_started/build_model.rst b/docs/source/get_started/build_model.rst similarity index 100% rename from docs/source-app/get_started/build_model.rst rename to docs/source/get_started/build_model.rst diff --git a/docs/source-app/get_started/go_beyond_training.rst b/docs/source/get_started/go_beyond_training.rst similarity index 100% rename from docs/source-app/get_started/go_beyond_training.rst rename to docs/source/get_started/go_beyond_training.rst diff --git a/docs/source-app/get_started/go_beyond_training_content.rst b/docs/source/get_started/go_beyond_training_content.rst similarity index 100% rename from docs/source-app/get_started/go_beyond_training_content.rst rename to docs/source/get_started/go_beyond_training_content.rst diff --git a/docs/source-app/get_started/jumpstart_from_app_gallery.rst b/docs/source/get_started/jumpstart_from_app_gallery.rst similarity index 100% rename from docs/source-app/get_started/jumpstart_from_app_gallery.rst rename to docs/source/get_started/jumpstart_from_app_gallery.rst diff --git a/docs/source-app/get_started/jumpstart_from_component_gallery.rst b/docs/source/get_started/jumpstart_from_component_gallery.rst similarity index 100% rename from docs/source-app/get_started/jumpstart_from_component_gallery.rst rename to docs/source/get_started/jumpstart_from_component_gallery.rst diff --git a/docs/source-app/get_started/training_with_apps.rst b/docs/source/get_started/training_with_apps.rst similarity index 98% rename from docs/source-app/get_started/training_with_apps.rst rename to docs/source/get_started/training_with_apps.rst index 5c94925f383c6..a447eaca6617d 100644 --- a/docs/source-app/get_started/training_with_apps.rst +++ b/docs/source/get_started/training_with_apps.rst @@ -50,7 +50,7 @@ Inside the ``app.py`` file, add the following code. .. literalinclude:: ../code_samples/convert_pl_to_app/app.py -This App runs the PyTorch Lightning script contained in the ``train.py`` file using the powerful :class:`~lightning_app.components.python.tracer.TracerPythonScript` component. This is really worth checking out! +This App runs the PyTorch Lightning script contained in the ``train.py`` file using the powerful :class:`~lightning.app.components.python.tracer.TracerPythonScript` component. This is really worth checking out! ---- diff --git a/docs/source-app/get_started/what_app_can_do.rst b/docs/source/get_started/what_app_can_do.rst similarity index 100% rename from docs/source-app/get_started/what_app_can_do.rst rename to docs/source/get_started/what_app_can_do.rst diff --git a/docs/source-app/glossary/app_tree.rst b/docs/source/glossary/app_tree.rst similarity index 96% rename from docs/source-app/glossary/app_tree.rst rename to docs/source/glossary/app_tree.rst index 6d214fc6471e3..c60d5d8a899e2 100644 --- a/docs/source-app/glossary/app_tree.rst +++ b/docs/source/glossary/app_tree.rst @@ -89,11 +89,11 @@ You can simply attach your components in the **run** method of a flow using the 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: +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 + from lightning.app.structures import Dict class RootFlow(L.LightningFlow): diff --git a/docs/source-app/glossary/aws_arn.rst b/docs/source/glossary/aws_arn.rst similarity index 100% rename from docs/source-app/glossary/aws_arn.rst rename to docs/source/glossary/aws_arn.rst diff --git a/docs/source-app/glossary/build_config/build_config.rst b/docs/source/glossary/build_config/build_config.rst similarity index 100% rename from docs/source-app/glossary/build_config/build_config.rst rename to docs/source/glossary/build_config/build_config.rst diff --git a/docs/source-app/glossary/build_config/build_config_advanced.rst b/docs/source/glossary/build_config/build_config_advanced.rst similarity index 94% rename from docs/source-app/glossary/build_config/build_config_advanced.rst rename to docs/source/glossary/build_config/build_config_advanced.rst index 23cdc7876199e..bc6f5a2062d12 100644 --- a/docs/source-app/glossary/build_config/build_config_advanced.rst +++ b/docs/source/glossary/build_config/build_config_advanced.rst @@ -17,11 +17,11 @@ Advanced users who need full control over the environment a LightningWork runs i Use a docker image ****************** -Create a :class:`~lightning_app.utilities.packaging.build_config.BuildConfig` and provide a **publicly accessible** link to where the image is hosted: +Create a :class:`~lightning.app.utilities.packaging.build_config.BuildConfig` and provide a **publicly accessible** link to where the image is hosted: .. code-block:: python - from lightning_app import LightningWork, BuildConfig + from lightning.app import LightningWork, BuildConfig class MyWork(LightningWork): diff --git a/docs/source-app/glossary/build_config/build_config_basic.rst b/docs/source/glossary/build_config/build_config_basic.rst similarity index 95% rename from docs/source-app/glossary/build_config/build_config_basic.rst rename to docs/source/glossary/build_config/build_config_basic.rst index dcff9d6c9bc8a..633c17394c891 100644 --- a/docs/source-app/glossary/build_config/build_config_basic.rst +++ b/docs/source/glossary/build_config/build_config_basic.rst @@ -42,12 +42,12 @@ Define the requirements in the code *********************************** Instead of listing the requirements in a file, you can also pass them to the LightningWork at runtime using the -:class:`~lightning_app.utilities.packaging.build_config.BuildConfig`: +:class:`~lightning.app.utilities.packaging.build_config.BuildConfig`: .. code-block:: python :emphasize-lines: 7 - from lightning_app import LightningWork, BuildConfig + from lightning.app import LightningWork, BuildConfig class MyWork(LightningWork): diff --git a/docs/source-app/glossary/build_config/build_config_intermediate.rst b/docs/source/glossary/build_config/build_config_intermediate.rst similarity index 89% rename from docs/source-app/glossary/build_config/build_config_intermediate.rst rename to docs/source/glossary/build_config/build_config_intermediate.rst index 914ef07bf6ef4..de301c644b0f2 100644 --- a/docs/source-app/glossary/build_config/build_config_intermediate.rst +++ b/docs/source/glossary/build_config/build_config_intermediate.rst @@ -10,13 +10,13 @@ Build Configuration (Intermediate) When a LightningWork machine starts up in the cloud, it uses a lightweight operating system with essential packages pre-installed. If you need to install additional system packages or run other configuration steps before your code executes on that machine, it is possible to do so by createing a custom -:class:`~lightning_app.utilities.packaging.build_config.BuildConfig`: +:class:`~lightning.app.utilities.packaging.build_config.BuildConfig`: -1. Subclass :class:`~lightning_app.utilities.packaging.build_config.BuildConfig`: +1. Subclass :class:`~lightning.app.utilities.packaging.build_config.BuildConfig`: .. code-block:: python - from lightning_app import BuildConfig + from lightning.app import BuildConfig @dataclass @@ -29,7 +29,7 @@ If you need to install additional system packages or run other configuration ste .. code-block:: python - from lightning_app import LightningWork + from lightning.app import LightningWork class MyWork(LightningWork): diff --git a/docs/source-app/glossary/command_lines/command_lines.rst b/docs/source/glossary/command_lines/command_lines.rst similarity index 100% rename from docs/source-app/glossary/command_lines/command_lines.rst rename to docs/source/glossary/command_lines/command_lines.rst diff --git a/docs/source-app/glossary/dag.rst b/docs/source/glossary/dag.rst similarity index 100% rename from docs/source-app/glossary/dag.rst rename to docs/source/glossary/dag.rst diff --git a/docs/source-app/glossary/debug_app.rst b/docs/source/glossary/debug_app.rst similarity index 100% rename from docs/source-app/glossary/debug_app.rst rename to docs/source/glossary/debug_app.rst diff --git a/docs/source-app/glossary/distributed_fe.rst b/docs/source/glossary/distributed_fe.rst similarity index 100% rename from docs/source-app/glossary/distributed_fe.rst rename to docs/source/glossary/distributed_fe.rst diff --git a/docs/source-app/glossary/distributed_hardware.rst b/docs/source/glossary/distributed_hardware.rst similarity index 100% rename from docs/source-app/glossary/distributed_hardware.rst rename to docs/source/glossary/distributed_hardware.rst diff --git a/docs/source-app/glossary/environment_variables.rst b/docs/source/glossary/environment_variables.rst similarity index 100% rename from docs/source-app/glossary/environment_variables.rst rename to docs/source/glossary/environment_variables.rst diff --git a/docs/source-app/glossary/event_loop.rst b/docs/source/glossary/event_loop.rst similarity index 100% rename from docs/source-app/glossary/event_loop.rst rename to docs/source/glossary/event_loop.rst diff --git a/docs/source-app/glossary/fault_tolerance.rst b/docs/source/glossary/fault_tolerance.rst similarity index 100% rename from docs/source-app/glossary/fault_tolerance.rst rename to docs/source/glossary/fault_tolerance.rst diff --git a/docs/source-app/glossary/index.rst b/docs/source/glossary/index.rst similarity index 100% rename from docs/source-app/glossary/index.rst rename to docs/source/glossary/index.rst diff --git a/docs/source-app/glossary/ios_and_android.rst b/docs/source/glossary/ios_and_android.rst similarity index 100% rename from docs/source-app/glossary/ios_and_android.rst rename to docs/source/glossary/ios_and_android.rst diff --git a/docs/source-app/glossary/lightning_app_overview/index.rst b/docs/source/glossary/lightning_app_overview/index.rst similarity index 100% rename from docs/source-app/glossary/lightning_app_overview/index.rst rename to docs/source/glossary/lightning_app_overview/index.rst diff --git a/docs/source-app/glossary/mount.rst b/docs/source/glossary/mount.rst similarity index 100% rename from docs/source-app/glossary/mount.rst rename to docs/source/glossary/mount.rst diff --git a/docs/source-app/glossary/restful_api/restful_api.rst b/docs/source/glossary/restful_api/restful_api.rst similarity index 100% rename from docs/source-app/glossary/restful_api/restful_api.rst rename to docs/source/glossary/restful_api/restful_api.rst diff --git a/docs/source-app/glossary/scheduling.rst b/docs/source/glossary/scheduling.rst similarity index 93% rename from docs/source-app/glossary/scheduling.rst rename to docs/source/glossary/scheduling.rst index 21d67df0cfea3..0e04dc35c897d 100644 --- a/docs/source-app/glossary/scheduling.rst +++ b/docs/source/glossary/scheduling.rst @@ -17,8 +17,8 @@ The LightningFlow has a ``schedule`` method which can be used to schedule your c .. code-block:: python - from lightning_app import LightningWork, LightningFlow - from lightning_app.storage import Path + from lightning.app import LightningWork, LightningFlow + from lightning.app.storage import Path class MyFlow(LightningFlow): @@ -50,8 +50,8 @@ In the example above, the line ``self.schedule("hourly")`` will return ``True`` .. code-block:: python - from lightning_app import LightningFlow - from lightning_app.structures import List + from lightning.app import LightningFlow + from lightning.app.structures import List class ScheduledDAG(LightningFlow): def __init__(self): @@ -75,7 +75,7 @@ In the example above, the line ``self.schedule("hourly")`` will return ``True`` .. code-block:: python - from lightning_app import LightningFlow + from lightning.app import LightningFlow from time import time class ScheduledDAG(LightningFlow): @@ -93,7 +93,7 @@ In the example above, the line ``self.schedule("hourly")`` will return ``True`` .. code-block:: python - from lightning_app import LightningFlow + from lightning.app import LightningFlow from time import time class ScheduledDAG(LightningFlow): @@ -131,7 +131,7 @@ Here is an example of something which **WON'T** work: .. code-block:: python - from lightning_app import LightningFlow + from lightning.app import LightningFlow from time import time class ScheduledDAG(LightningFlow): diff --git a/docs/source-app/glossary/secrets.rst b/docs/source/glossary/secrets.rst similarity index 100% rename from docs/source-app/glossary/secrets.rst rename to docs/source/glossary/secrets.rst diff --git a/docs/source-app/glossary/sharing_components.rst b/docs/source/glossary/sharing_components.rst similarity index 100% rename from docs/source-app/glossary/sharing_components.rst rename to docs/source/glossary/sharing_components.rst diff --git a/docs/source-app/glossary/storage/differences.rst b/docs/source/glossary/storage/differences.rst similarity index 94% rename from docs/source-app/glossary/storage/differences.rst rename to docs/source/glossary/storage/differences.rst index 75397d209f717..ed45edd069632 100644 --- a/docs/source-app/glossary/storage/differences.rst +++ b/docs/source/glossary/storage/differences.rst @@ -10,7 +10,7 @@ Differences between Drive and Path The Lightning Storage system makes it easy to share files between LightningWork so you can run your app both locally and in the cloud without changing the code. -Lightning storage provides two solutions :class:`~lightning_app.storage.drive.Drive` and :class:`~lightning_app.storage.path.Path` to deal with files locally and in the cloud likewise. +Lightning storage provides two solutions :class:`~lightning.app.storage.drive.Drive` and :class:`~lightning.app.storage.path.Path` to deal with files locally and in the cloud likewise. ---- diff --git a/docs/source-app/glossary/storage/drive.rst b/docs/source/glossary/storage/drive.rst similarity index 100% rename from docs/source-app/glossary/storage/drive.rst rename to docs/source/glossary/storage/drive.rst diff --git a/docs/source-app/glossary/storage/drive_content.rst b/docs/source/glossary/storage/drive_content.rst similarity index 96% rename from docs/source-app/glossary/storage/drive_content.rst rename to docs/source/glossary/storage/drive_content.rst index 563ba7aed1462..07c2232db09f3 100644 --- a/docs/source-app/glossary/storage/drive_content.rst +++ b/docs/source/glossary/storage/drive_content.rst @@ -57,7 +57,7 @@ In order to create a Drive, you simply need to pass its name with the prefix ``l .. code-block:: python - from lightning_app.storage import Drive + from lightning.app.storage import Drive # The identifier of this Drive is ``drive_1`` # Note: You need to add Lightning protocol ``lit://`` as a prefix. @@ -71,8 +71,8 @@ Any component can create a drive object for ``lit://`` Drives. .. code-block:: python - from lightning_app import LightningFlow, LightningWork - from lightning_app.storage import Drive + from lightning.app import LightningFlow, LightningWork + from lightning.app.storage import Drive class Flow(LightningFlow): @@ -104,7 +104,7 @@ An S3 Drive supports list and get actions (for now). .. code-block:: python - from lightning_app.storage import Drive + from lightning.app.storage import Drive drive = Drive("lit://drive") @@ -136,8 +136,8 @@ Here is an illustrated code example on how to create drives within Works. .. code-block:: python - from lightning_app import LightningFlow, LightningWork, LightningApp - from lightning_app.storage import Drive + from lightning.app import LightningFlow, LightningWork, LightningApp + from lightning.app.storage import Drive class Work_A(LightningWork): diff --git a/docs/source-app/glossary/storage/drive_content_old.rst b/docs/source/glossary/storage/drive_content_old.rst similarity index 94% rename from docs/source-app/glossary/storage/drive_content_old.rst rename to docs/source/glossary/storage/drive_content_old.rst index 4ee8a2579099e..5fb7ca91b5b0b 100644 --- a/docs/source-app/glossary/storage/drive_content_old.rst +++ b/docs/source/glossary/storage/drive_content_old.rst @@ -34,7 +34,7 @@ In order to create a Drive, you simply need to pass its name with the prefix ``l .. code-block:: python - from lightning_app.storage import Drive + from lightning.app.storage import Drive # The identifier of this Drive is ``drive_1`` # Note: You need to add Lightning protocol ``lit://`` as a prefix. @@ -48,8 +48,8 @@ Any components can create a drive object. .. code-block:: python - from lightning_app import LightningFlow, LightningWork - from lightning_app.storage import Drive + from lightning.app import LightningFlow, LightningWork + from lightning.app.storage import Drive class Flow(LightningFlow): @@ -79,7 +79,7 @@ A Drive supports put, list, get, and delete actions. .. code-block:: python - from lightning_app.storage import Drive + from lightning.app.storage import Drive drive = Drive("lit://drive") @@ -111,8 +111,8 @@ Here is an illustrated code example on how to create drives within works. .. code-block:: python - from lightning_app import LightningFlow, LightningWork, LightningApp - from lightning_app.storage import Drive + from lightning.app import LightningFlow, LightningWork, LightningApp + from lightning.app.storage import Drive class Work_A(LightningWork): diff --git a/docs/source-app/glossary/storage/path.rst b/docs/source/glossary/storage/path.rst similarity index 96% rename from docs/source-app/glossary/storage/path.rst rename to docs/source/glossary/storage/path.rst index 00c393afb521c..fb2a0d5276680 100644 --- a/docs/source-app/glossary/storage/path.rst +++ b/docs/source/glossary/storage/path.rst @@ -40,7 +40,7 @@ In simple words, the Lightning Path augments :class:`pathlib.Path` object by tra When to use Path storage ? ************************** -In the cloud, every :class:`~lightning_app.core.work.LightningWork` runs in a separate machine with its own filesystem. +In the cloud, every :class:`~lightning.app.core.work.LightningWork` runs in a separate machine with its own filesystem. This means files in one Work cannot be directly accessed in another like you would be able to when running the app locally. But with Lightning Storage, this is easy: Simply declare which files need to be shared and Lightning will take care of the rest. @@ -60,8 +60,8 @@ Convert every filesystem path you want to share with other LightningWorks to by .. code-block:: python - from lightning_app import LightningWork - from lightning_app.storage import Path + from lightning.app import LightningWork + from lightning.app.storage import Path class SourceWork(LightningWork): @@ -97,7 +97,7 @@ For example, share a directory by passing it as an input to the run method of th .. code-block:: python :emphasize-lines: 12 - from lightning_app import LightningFlow + from lightning.app import LightningFlow class Flow(LightningFlow): @@ -189,7 +189,7 @@ Lightning makes sure all Paths that are part of the state get stored and made ac .. code-block:: python - from lightning_app.storage import Path + from lightning.app.storage import Path class Work(LightningWork): @@ -215,8 +215,8 @@ First, define a component that saves a checkpoint: .. code:: python :emphasize-lines: 14-18 - from lightning_app import LightningFlow, LightningWork - from lightning_app.storage import Path + from lightning.app import LightningFlow, LightningWork + from lightning.app.storage import Path import torch import os diff --git a/docs/source-app/glossary/storage/storage.rst b/docs/source/glossary/storage/storage.rst similarity index 92% rename from docs/source-app/glossary/storage/storage.rst rename to docs/source/glossary/storage/storage.rst index 37bf992bf1af2..af115a813fc80 100644 --- a/docs/source-app/glossary/storage/storage.rst +++ b/docs/source/glossary/storage/storage.rst @@ -10,7 +10,7 @@ Storage The Lightning Storage system makes it easy to share files between LightningWork so you can run your app both locally and in the cloud without changing the code. -Lightning storage provides two solutions :class:`~lightning_app.storage.drive.Drive` and :class:`~lightning_app.storage.path.Path` to deal with files locally and in the cloud likewise. +Lightning storage provides two solutions :class:`~lightning.app.storage.drive.Drive` and :class:`~lightning.app.storage.path.Path` to deal with files locally and in the cloud likewise. ---- diff --git a/docs/source-app/glossary/use_local_lightning.rst b/docs/source/glossary/use_local_lightning.rst similarity index 100% rename from docs/source-app/glossary/use_local_lightning.rst rename to docs/source/glossary/use_local_lightning.rst diff --git a/docs/source-app/index.rst b/docs/source/index.rst similarity index 100% rename from docs/source-app/index.rst rename to docs/source/index.rst diff --git a/docs/source-app/install/install_beginner.rst b/docs/source/install/install_beginner.rst similarity index 100% rename from docs/source-app/install/install_beginner.rst rename to docs/source/install/install_beginner.rst diff --git a/docs/source-app/install/installation.rst b/docs/source/install/installation.rst similarity index 100% rename from docs/source-app/install/installation.rst rename to docs/source/install/installation.rst diff --git a/docs/source-app/install/mac.bash b/docs/source/install/mac.bash similarity index 100% rename from docs/source-app/install/mac.bash rename to docs/source/install/mac.bash diff --git a/docs/source-app/install/pip.bash b/docs/source/install/pip.bash similarity index 100% rename from docs/source-app/install/pip.bash rename to docs/source/install/pip.bash diff --git a/docs/source-app/install/windows.bash b/docs/source/install/windows.bash similarity index 100% rename from docs/source-app/install/windows.bash rename to docs/source/install/windows.bash diff --git a/docs/source-app/intro.rst b/docs/source/intro.rst similarity index 100% rename from docs/source-app/intro.rst rename to docs/source/intro.rst diff --git a/docs/source-app/landing_app.py b/docs/source/landing_app.py similarity index 100% rename from docs/source-app/landing_app.py rename to docs/source/landing_app.py diff --git a/docs/source-app/landing_app_run.bash b/docs/source/landing_app_run.bash similarity index 100% rename from docs/source-app/landing_app_run.bash rename to docs/source/landing_app_run.bash diff --git a/docs/source-app/levels/advanced/index.rst b/docs/source/levels/advanced/index.rst similarity index 100% rename from docs/source-app/levels/advanced/index.rst rename to docs/source/levels/advanced/index.rst diff --git a/docs/source-app/levels/advanced/level_16.rst b/docs/source/levels/advanced/level_16.rst similarity index 100% rename from docs/source-app/levels/advanced/level_16.rst rename to docs/source/levels/advanced/level_16.rst diff --git a/docs/source-app/levels/advanced/level_17.rst b/docs/source/levels/advanced/level_17.rst similarity index 100% rename from docs/source-app/levels/advanced/level_17.rst rename to docs/source/levels/advanced/level_17.rst diff --git a/docs/source-app/levels/advanced/level_18.rst b/docs/source/levels/advanced/level_18.rst similarity index 100% rename from docs/source-app/levels/advanced/level_18.rst rename to docs/source/levels/advanced/level_18.rst diff --git a/docs/source-app/levels/advanced/level_19.rst b/docs/source/levels/advanced/level_19.rst similarity index 100% rename from docs/source-app/levels/advanced/level_19.rst rename to docs/source/levels/advanced/level_19.rst diff --git a/docs/source-app/levels/advanced/level_20.rst b/docs/source/levels/advanced/level_20.rst similarity index 100% rename from docs/source-app/levels/advanced/level_20.rst rename to docs/source/levels/advanced/level_20.rst diff --git a/docs/source-app/levels/advanced/start_dynamic_components.rst b/docs/source/levels/advanced/start_dynamic_components.rst similarity index 100% rename from docs/source-app/levels/advanced/start_dynamic_components.rst rename to docs/source/levels/advanced/start_dynamic_components.rst diff --git a/docs/source-app/levels/basic/build_a_dag.rst b/docs/source/levels/basic/build_a_dag.rst similarity index 100% rename from docs/source-app/levels/basic/build_a_dag.rst rename to docs/source/levels/basic/build_a_dag.rst diff --git a/docs/source-app/levels/basic/build_a_lightning_component.rst b/docs/source/levels/basic/build_a_lightning_component.rst similarity index 100% rename from docs/source-app/levels/basic/build_a_lightning_component.rst rename to docs/source/levels/basic/build_a_lightning_component.rst diff --git a/docs/source-app/levels/basic/create_a_model_demo.rst b/docs/source/levels/basic/create_a_model_demo.rst similarity index 100% rename from docs/source-app/levels/basic/create_a_model_demo.rst rename to docs/source/levels/basic/create_a_model_demo.rst diff --git a/docs/source-app/levels/basic/deploy_ai_model_api.rst b/docs/source/levels/basic/deploy_ai_model_api.rst similarity index 100% rename from docs/source-app/levels/basic/deploy_ai_model_api.rst rename to docs/source/levels/basic/deploy_ai_model_api.rst diff --git a/docs/source-app/levels/basic/hello_components/code_run_cloud.bash b/docs/source/levels/basic/hello_components/code_run_cloud.bash similarity index 100% rename from docs/source-app/levels/basic/hello_components/code_run_cloud.bash rename to docs/source/levels/basic/hello_components/code_run_cloud.bash diff --git a/docs/source-app/levels/basic/hello_components/code_run_cloud_setup.bash b/docs/source/levels/basic/hello_components/code_run_cloud_setup.bash similarity index 100% rename from docs/source-app/levels/basic/hello_components/code_run_cloud_setup.bash rename to docs/source/levels/basic/hello_components/code_run_cloud_setup.bash diff --git a/docs/source-app/levels/basic/hello_components/code_run_cloud_yours.bash b/docs/source/levels/basic/hello_components/code_run_cloud_yours.bash similarity index 100% rename from docs/source-app/levels/basic/hello_components/code_run_cloud_yours.bash rename to docs/source/levels/basic/hello_components/code_run_cloud_yours.bash diff --git a/docs/source-app/levels/basic/hello_components/code_run_cloud_yours_setup.bash b/docs/source/levels/basic/hello_components/code_run_cloud_yours_setup.bash similarity index 100% rename from docs/source-app/levels/basic/hello_components/code_run_cloud_yours_setup.bash rename to docs/source/levels/basic/hello_components/code_run_cloud_yours_setup.bash diff --git a/docs/source-app/levels/basic/hello_components/code_run_local.bash b/docs/source/levels/basic/hello_components/code_run_local.bash similarity index 100% rename from docs/source-app/levels/basic/hello_components/code_run_local.bash rename to docs/source/levels/basic/hello_components/code_run_local.bash diff --git a/docs/source-app/levels/basic/hello_components/code_run_local_setup.bash b/docs/source/levels/basic/hello_components/code_run_local_setup.bash similarity index 100% rename from docs/source-app/levels/basic/hello_components/code_run_local_setup.bash rename to docs/source/levels/basic/hello_components/code_run_local_setup.bash diff --git a/docs/source-app/levels/basic/hello_components/deploy_model.py b/docs/source/levels/basic/hello_components/deploy_model.py similarity index 100% rename from docs/source-app/levels/basic/hello_components/deploy_model.py rename to docs/source/levels/basic/hello_components/deploy_model.py diff --git a/docs/source-app/levels/basic/hello_components/hello_world.py b/docs/source/levels/basic/hello_components/hello_world.py similarity index 100% rename from docs/source-app/levels/basic/hello_components/hello_world.py rename to docs/source/levels/basic/hello_components/hello_world.py diff --git a/docs/source-app/levels/basic/hello_components/hello_world_gpu.py b/docs/source/levels/basic/hello_components/hello_world_gpu.py similarity index 100% rename from docs/source-app/levels/basic/hello_components/hello_world_gpu.py rename to docs/source/levels/basic/hello_components/hello_world_gpu.py diff --git a/docs/source-app/levels/basic/hello_components/multi_node.py b/docs/source/levels/basic/hello_components/multi_node.py similarity index 100% rename from docs/source-app/levels/basic/hello_components/multi_node.py rename to docs/source/levels/basic/hello_components/multi_node.py diff --git a/docs/source-app/levels/basic/hello_components/pl_multinode.py b/docs/source/levels/basic/hello_components/pl_multinode.py similarity index 100% rename from docs/source-app/levels/basic/hello_components/pl_multinode.py rename to docs/source/levels/basic/hello_components/pl_multinode.py diff --git a/docs/source-app/levels/basic/hello_components/pt_multinode.py b/docs/source/levels/basic/hello_components/pt_multinode.py similarity index 100% rename from docs/source-app/levels/basic/hello_components/pt_multinode.py rename to docs/source/levels/basic/hello_components/pt_multinode.py diff --git a/docs/source-app/levels/basic/hello_components/run_ptl_script.py b/docs/source/levels/basic/hello_components/run_ptl_script.py similarity index 100% rename from docs/source-app/levels/basic/hello_components/run_ptl_script.py rename to docs/source/levels/basic/hello_components/run_ptl_script.py diff --git a/docs/source-app/levels/basic/hello_components/streamlit_demo.py b/docs/source/levels/basic/hello_components/streamlit_demo.py similarity index 100% rename from docs/source-app/levels/basic/hello_components/streamlit_demo.py rename to docs/source/levels/basic/hello_components/streamlit_demo.py diff --git a/docs/source-app/levels/basic/hello_components/terraform_example.bash b/docs/source/levels/basic/hello_components/terraform_example.bash similarity index 100% rename from docs/source-app/levels/basic/hello_components/terraform_example.bash rename to docs/source/levels/basic/hello_components/terraform_example.bash diff --git a/docs/source-app/levels/basic/hello_components/train_ptl.py b/docs/source/levels/basic/hello_components/train_ptl.py similarity index 100% rename from docs/source-app/levels/basic/hello_components/train_ptl.py rename to docs/source/levels/basic/hello_components/train_ptl.py diff --git a/docs/source-app/levels/basic/hello_components/train_pytorch.py b/docs/source/levels/basic/hello_components/train_pytorch.py similarity index 100% rename from docs/source-app/levels/basic/hello_components/train_pytorch.py rename to docs/source/levels/basic/hello_components/train_pytorch.py diff --git a/docs/source-app/levels/basic/hello_components/xgboost.py b/docs/source/levels/basic/hello_components/xgboost.py similarity index 100% rename from docs/source-app/levels/basic/hello_components/xgboost.py rename to docs/source/levels/basic/hello_components/xgboost.py diff --git a/docs/source-app/levels/basic/hello_components/xgboost_gpu.py b/docs/source/levels/basic/hello_components/xgboost_gpu.py similarity index 100% rename from docs/source-app/levels/basic/hello_components/xgboost_gpu.py rename to docs/source/levels/basic/hello_components/xgboost_gpu.py diff --git a/docs/source-app/levels/basic/hero_components.rst b/docs/source/levels/basic/hero_components.rst similarity index 100% rename from docs/source-app/levels/basic/hero_components.rst rename to docs/source/levels/basic/hero_components.rst diff --git a/docs/source-app/levels/basic/hero_run.rst b/docs/source/levels/basic/hero_run.rst similarity index 100% rename from docs/source-app/levels/basic/hero_run.rst rename to docs/source/levels/basic/hero_run.rst diff --git a/docs/source-app/levels/basic/hero_run_setup.rst b/docs/source/levels/basic/hero_run_setup.rst similarity index 100% rename from docs/source-app/levels/basic/hero_run_setup.rst rename to docs/source/levels/basic/hero_run_setup.rst diff --git a/docs/source-app/levels/basic/index.rst b/docs/source/levels/basic/index.rst similarity index 100% rename from docs/source-app/levels/basic/index.rst rename to docs/source/levels/basic/index.rst diff --git a/docs/source-app/levels/basic/key_features/accelerators.py b/docs/source/levels/basic/key_features/accelerators.py similarity index 100% rename from docs/source-app/levels/basic/key_features/accelerators.py rename to docs/source/levels/basic/key_features/accelerators.py diff --git a/docs/source-app/levels/basic/key_features/auto_timeout.py b/docs/source/levels/basic/key_features/auto_timeout.py similarity index 100% rename from docs/source-app/levels/basic/key_features/auto_timeout.py rename to docs/source/levels/basic/key_features/auto_timeout.py diff --git a/docs/source-app/levels/basic/key_features/custom_container.py b/docs/source/levels/basic/key_features/custom_container.py similarity index 100% rename from docs/source-app/levels/basic/key_features/custom_container.py rename to docs/source/levels/basic/key_features/custom_container.py diff --git a/docs/source-app/levels/basic/key_features/idle_machine.py b/docs/source/levels/basic/key_features/idle_machine.py similarity index 100% rename from docs/source-app/levels/basic/key_features/idle_machine.py rename to docs/source/levels/basic/key_features/idle_machine.py diff --git a/docs/source-app/levels/basic/key_features/massive_dataset.py b/docs/source/levels/basic/key_features/massive_dataset.py similarity index 100% rename from docs/source-app/levels/basic/key_features/massive_dataset.py rename to docs/source/levels/basic/key_features/massive_dataset.py diff --git a/docs/source-app/levels/basic/key_features/mount_data.py b/docs/source/levels/basic/key_features/mount_data.py similarity index 100% rename from docs/source-app/levels/basic/key_features/mount_data.py rename to docs/source/levels/basic/key_features/mount_data.py diff --git a/docs/source-app/levels/basic/key_features/spot.py b/docs/source/levels/basic/key_features/spot.py similarity index 100% rename from docs/source-app/levels/basic/key_features/spot.py rename to docs/source/levels/basic/key_features/spot.py diff --git a/docs/source-app/levels/basic/real_lightning_component_implementations.rst b/docs/source/levels/basic/real_lightning_component_implementations.rst similarity index 100% rename from docs/source-app/levels/basic/real_lightning_component_implementations.rst rename to docs/source/levels/basic/real_lightning_component_implementations.rst diff --git a/docs/source-app/levels/basic/run_jupyter_notebook_on_the_cloud.rst b/docs/source/levels/basic/run_jupyter_notebook_on_the_cloud.rst similarity index 100% rename from docs/source-app/levels/basic/run_jupyter_notebook_on_the_cloud.rst rename to docs/source/levels/basic/run_jupyter_notebook_on_the_cloud.rst diff --git a/docs/source-app/levels/basic/run_on_aws_account.rst b/docs/source/levels/basic/run_on_aws_account.rst similarity index 100% rename from docs/source-app/levels/basic/run_on_aws_account.rst rename to docs/source/levels/basic/run_on_aws_account.rst diff --git a/docs/source-app/levels/basic/save_money_on_cloud_costs.rst b/docs/source/levels/basic/save_money_on_cloud_costs.rst similarity index 100% rename from docs/source-app/levels/basic/save_money_on_cloud_costs.rst rename to docs/source/levels/basic/save_money_on_cloud_costs.rst diff --git a/docs/source-app/levels/basic/scripts/toy_app_1_component.py b/docs/source/levels/basic/scripts/toy_app_1_component.py similarity index 100% rename from docs/source-app/levels/basic/scripts/toy_app_1_component.py rename to docs/source/levels/basic/scripts/toy_app_1_component.py diff --git a/docs/source-app/levels/basic/scripts/toy_app_1_component_pdb.py b/docs/source/levels/basic/scripts/toy_app_1_component_pdb.py similarity index 100% rename from docs/source-app/levels/basic/scripts/toy_app_1_component_pdb.py rename to docs/source/levels/basic/scripts/toy_app_1_component_pdb.py diff --git a/docs/source-app/levels/basic/train_pytorch_on_the_cloud.rst b/docs/source/levels/basic/train_pytorch_on_the_cloud.rst similarity index 100% rename from docs/source-app/levels/basic/train_pytorch_on_the_cloud.rst rename to docs/source/levels/basic/train_pytorch_on_the_cloud.rst diff --git a/docs/source-app/levels/expert/index.rst b/docs/source/levels/expert/index.rst similarity index 100% rename from docs/source-app/levels/expert/index.rst rename to docs/source/levels/expert/index.rst diff --git a/docs/source-app/levels/intermediate/connect_lightning_components.rst b/docs/source/levels/intermediate/connect_lightning_components.rst similarity index 100% rename from docs/source-app/levels/intermediate/connect_lightning_components.rst rename to docs/source/levels/intermediate/connect_lightning_components.rst diff --git a/docs/source-app/levels/intermediate/debug_a_lightning_app.rst b/docs/source/levels/intermediate/debug_a_lightning_app.rst similarity index 100% rename from docs/source-app/levels/intermediate/debug_a_lightning_app.rst rename to docs/source/levels/intermediate/debug_a_lightning_app.rst diff --git a/docs/source-app/levels/intermediate/debug_app_scripts/debug_app.py b/docs/source/levels/intermediate/debug_app_scripts/debug_app.py similarity index 100% rename from docs/source-app/levels/intermediate/debug_app_scripts/debug_app.py rename to docs/source/levels/intermediate/debug_app_scripts/debug_app.py diff --git a/docs/source-app/levels/intermediate/debug_app_scripts/toy_app.py b/docs/source/levels/intermediate/debug_app_scripts/toy_app.py similarity index 100% rename from docs/source-app/levels/intermediate/debug_app_scripts/toy_app.py rename to docs/source/levels/intermediate/debug_app_scripts/toy_app.py diff --git a/docs/source-app/levels/intermediate/debug_app_scripts/toy_app_1_component.py b/docs/source/levels/intermediate/debug_app_scripts/toy_app_1_component.py similarity index 100% rename from docs/source-app/levels/intermediate/debug_app_scripts/toy_app_1_component.py rename to docs/source/levels/intermediate/debug_app_scripts/toy_app_1_component.py diff --git a/docs/source-app/levels/intermediate/debug_app_scripts/toy_app_1_component_pdb.py b/docs/source/levels/intermediate/debug_app_scripts/toy_app_1_component_pdb.py similarity index 100% rename from docs/source-app/levels/intermediate/debug_app_scripts/toy_app_1_component_pdb.py rename to docs/source/levels/intermediate/debug_app_scripts/toy_app_1_component_pdb.py diff --git a/docs/source-app/levels/intermediate/embed_web_ui_into_lightningwork.rst b/docs/source/levels/intermediate/embed_web_ui_into_lightningwork.rst similarity index 100% rename from docs/source-app/levels/intermediate/embed_web_ui_into_lightningwork.rst rename to docs/source/levels/intermediate/embed_web_ui_into_lightningwork.rst diff --git a/docs/source-app/levels/intermediate/index.rst b/docs/source/levels/intermediate/index.rst similarity index 100% rename from docs/source-app/levels/intermediate/index.rst rename to docs/source/levels/intermediate/index.rst diff --git a/docs/source-app/levels/intermediate/level_12.rst b/docs/source/levels/intermediate/level_12.rst similarity index 100% rename from docs/source-app/levels/intermediate/level_12.rst rename to docs/source/levels/intermediate/level_12.rst diff --git a/docs/source-app/levels/intermediate/level_2_scripts/code_run_cloud.bash b/docs/source/levels/intermediate/level_2_scripts/code_run_cloud.bash similarity index 100% rename from docs/source-app/levels/intermediate/level_2_scripts/code_run_cloud.bash rename to docs/source/levels/intermediate/level_2_scripts/code_run_cloud.bash diff --git a/docs/source-app/levels/intermediate/level_2_scripts/code_run_local.bash b/docs/source/levels/intermediate/level_2_scripts/code_run_local.bash similarity index 100% rename from docs/source-app/levels/intermediate/level_2_scripts/code_run_local.bash rename to docs/source/levels/intermediate/level_2_scripts/code_run_local.bash diff --git a/docs/source-app/levels/intermediate/level_2_scripts/hello_app.py b/docs/source/levels/intermediate/level_2_scripts/hello_app.py similarity index 100% rename from docs/source-app/levels/intermediate/level_2_scripts/hello_app.py rename to docs/source/levels/intermediate/level_2_scripts/hello_app.py diff --git a/docs/source-app/levels/intermediate/level_2_scripts/hello_app_auto_scale.py b/docs/source/levels/intermediate/level_2_scripts/hello_app_auto_scale.py similarity index 100% rename from docs/source-app/levels/intermediate/level_2_scripts/hello_app_auto_scale.py rename to docs/source/levels/intermediate/level_2_scripts/hello_app_auto_scale.py diff --git a/docs/source-app/levels/intermediate/level_2_scripts/hello_app_cron.py b/docs/source/levels/intermediate/level_2_scripts/hello_app_cron.py similarity index 100% rename from docs/source-app/levels/intermediate/level_2_scripts/hello_app_cron.py rename to docs/source/levels/intermediate/level_2_scripts/hello_app_cron.py diff --git a/docs/source-app/levels/intermediate/level_2_scripts/hello_app_scheduler.py b/docs/source/levels/intermediate/level_2_scripts/hello_app_scheduler.py similarity index 100% rename from docs/source-app/levels/intermediate/level_2_scripts/hello_app_scheduler.py rename to docs/source/levels/intermediate/level_2_scripts/hello_app_scheduler.py diff --git a/docs/source-app/levels/intermediate/level_2_scripts/multi_cloud.bash b/docs/source/levels/intermediate/level_2_scripts/multi_cloud.bash similarity index 100% rename from docs/source-app/levels/intermediate/level_2_scripts/multi_cloud.bash rename to docs/source/levels/intermediate/level_2_scripts/multi_cloud.bash diff --git a/docs/source-app/levels/intermediate/level_2_scripts/organized_app_python.py b/docs/source/levels/intermediate/level_2_scripts/organized_app_python.py similarity index 100% rename from docs/source-app/levels/intermediate/level_2_scripts/organized_app_python.py rename to docs/source/levels/intermediate/level_2_scripts/organized_app_python.py diff --git a/docs/source-app/levels/intermediate/level_2_scripts/tr.bash b/docs/source/levels/intermediate/level_2_scripts/tr.bash similarity index 100% rename from docs/source-app/levels/intermediate/level_2_scripts/tr.bash rename to docs/source/levels/intermediate/level_2_scripts/tr.bash diff --git a/docs/source-app/levels/intermediate/level_9.rst b/docs/source/levels/intermediate/level_9.rst similarity index 100% rename from docs/source-app/levels/intermediate/level_9.rst rename to docs/source/levels/intermediate/level_9.rst diff --git a/docs/source-app/levels/intermediate/run_lightning_work_in_parallel.rst b/docs/source/levels/intermediate/run_lightning_work_in_parallel.rst similarity index 100% rename from docs/source-app/levels/intermediate/run_lightning_work_in_parallel.rst rename to docs/source/levels/intermediate/run_lightning_work_in_parallel.rst diff --git a/docs/source-app/levels/intermediate/scripts/.storage/a b/docs/source/levels/intermediate/scripts/.storage/a similarity index 100% rename from docs/source-app/levels/intermediate/scripts/.storage/a rename to docs/source/levels/intermediate/scripts/.storage/a diff --git a/docs/source-app/levels/intermediate/scripts/.storage/embeddings b/docs/source/levels/intermediate/scripts/.storage/embeddings similarity index 100% rename from docs/source-app/levels/intermediate/scripts/.storage/embeddings rename to docs/source/levels/intermediate/scripts/.storage/embeddings diff --git a/docs/source-app/levels/intermediate/scripts/a b/docs/source/levels/intermediate/scripts/a similarity index 100% rename from docs/source-app/levels/intermediate/scripts/a rename to docs/source/levels/intermediate/scripts/a diff --git a/docs/source-app/levels/intermediate/scripts/comms_1.py b/docs/source/levels/intermediate/scripts/comms_1.py similarity index 100% rename from docs/source-app/levels/intermediate/scripts/comms_1.py rename to docs/source/levels/intermediate/scripts/comms_1.py diff --git a/docs/source-app/levels/intermediate/scripts/debug_app.py b/docs/source/levels/intermediate/scripts/debug_app.py similarity index 100% rename from docs/source-app/levels/intermediate/scripts/debug_app.py rename to docs/source/levels/intermediate/scripts/debug_app.py diff --git a/docs/source-app/levels/intermediate/scripts/embeddings b/docs/source/levels/intermediate/scripts/embeddings similarity index 100% rename from docs/source-app/levels/intermediate/scripts/embeddings rename to docs/source/levels/intermediate/scripts/embeddings diff --git a/docs/source-app/levels/intermediate/scripts/toy_app.py b/docs/source/levels/intermediate/scripts/toy_app.py similarity index 100% rename from docs/source-app/levels/intermediate/scripts/toy_app.py rename to docs/source/levels/intermediate/scripts/toy_app.py diff --git a/docs/source-app/levels/intermediate/scripts/toy_payload.py b/docs/source/levels/intermediate/scripts/toy_payload.py similarity index 100% rename from docs/source-app/levels/intermediate/scripts/toy_payload.py rename to docs/source/levels/intermediate/scripts/toy_payload.py diff --git a/docs/source-app/levels/intermediate/scripts/two_comms_non_ml.py b/docs/source/levels/intermediate/scripts/two_comms_non_ml.py similarity index 100% rename from docs/source-app/levels/intermediate/scripts/two_comms_non_ml.py rename to docs/source/levels/intermediate/scripts/two_comms_non_ml.py diff --git a/docs/source-app/levels/intermediate/scripts/two_work_comms.py b/docs/source/levels/intermediate/scripts/two_work_comms.py similarity index 100% rename from docs/source-app/levels/intermediate/scripts/two_work_comms.py rename to docs/source/levels/intermediate/scripts/two_work_comms.py diff --git a/docs/source-app/levels/intermediate/share_files_between_components.rst b/docs/source/levels/intermediate/share_files_between_components.rst similarity index 100% rename from docs/source-app/levels/intermediate/share_files_between_components.rst rename to docs/source/levels/intermediate/share_files_between_components.rst diff --git a/docs/source-app/levels/intermediate/share_variables_between_lightning_components.rst b/docs/source/levels/intermediate/share_variables_between_lightning_components.rst similarity index 100% rename from docs/source-app/levels/intermediate/share_variables_between_lightning_components.rst rename to docs/source/levels/intermediate/share_variables_between_lightning_components.rst diff --git a/docs/source-app/levels/intermediate/start_from_lightning_app_templates.rst b/docs/source/levels/intermediate/start_from_lightning_app_templates.rst similarity index 100% rename from docs/source-app/levels/intermediate/start_from_lightning_app_templates.rst rename to docs/source/levels/intermediate/start_from_lightning_app_templates.rst diff --git a/docs/source-app/make.bat b/docs/source/make.bat similarity index 100% rename from docs/source-app/make.bat rename to docs/source/make.bat diff --git a/docs/source-app/moving_to_the_cloud.rst b/docs/source/moving_to_the_cloud.rst similarity index 91% rename from docs/source-app/moving_to_the_cloud.rst rename to docs/source/moving_to_the_cloud.rst index 5e376c61cae84..9b26e94e49106 100644 --- a/docs/source-app/moving_to_the_cloud.rst +++ b/docs/source/moving_to_the_cloud.rst @@ -26,14 +26,14 @@ Distributed Storage When running your application in a fully-distributed setting, the data available on one machine won't necessarily be available on another. -To solve this problem, Lightning introduces the :class:`~lightning_app.storage.Path` object. +To solve this problem, Lightning introduces the :class:`~lightning.app.storage.Path` object. This ensures that your code can run both locally and in the cloud. -The :class:`~lightning_app.storage.Path` object keeps track of the work which creates +The :class:`~lightning.app.storage.Path` object keeps track of the work which creates the path. This enables Lightning to transfer the files correctly in a distributed setting. Instead of passing a string representing a file or directory, Lightning simply wraps -them into a :class:`~lightning_app.storage.Path` object and makes them an attribute of your LightningWork. +them into a :class:`~lightning.app.storage.Path` object and makes them an attribute of your LightningWork. Without doing this conscientiously for every single path, your application will fail in the cloud. @@ -96,10 +96,10 @@ Step 2: Scalable Application ***************************** The benefit of defining long-running code inside a -:class:`~lightning_app.core.work.LightningWork` +:class:`~lightning.app.core.work.LightningWork` component is that you can run it on different hardware -by providing :class:`~lightning_app.utilities.packaging.cloud_compute.CloudCompute` to -the ``__init__`` method of your :class:`~lightning_app.core.work.LightningWork`. +by providing :class:`~lightning.app.utilities.packaging.cloud_compute.CloudCompute` to +the ``__init__`` method of your :class:`~lightning.app.core.work.LightningWork`. By adapting the :ref:`quick_start` example as follows, you can easily run your component on multiple GPUs: diff --git a/docs/source-app/quickstart.rst b/docs/source/quickstart.rst similarity index 100% rename from docs/source-app/quickstart.rst rename to docs/source/quickstart.rst diff --git a/docs/source-app/testing.rst b/docs/source/testing.rst similarity index 95% rename from docs/source-app/testing.rst rename to docs/source/testing.rst index da52727cbde0d..ed2d6db92ef85 100644 --- a/docs/source-app/testing.rst +++ b/docs/source/testing.rst @@ -32,15 +32,15 @@ Testing a Lightning app is unique. It is a superset of an application that conve Anatomy of a Lightning integration test **************************************** -The following is a PyTest example of an integration test using the ``lightning_app.testing`` module. +The following is a PyTest example of an integration test using the ``lightning.app.testing`` module. .. code-block:: python import os - from lightning_app import _PROJECT_ROOT - from lightning_app.testing import application_testing, LightningTestApp - from lightning_app.utilities.enum import AppStage + from lightning.app import _PROJECT_ROOT + from lightning.app.testing import application_testing, LightningTestApp + from lightning.app.utilities.enum import AppStage class TestLightningAppInt(TestLightningApp): @@ -76,7 +76,7 @@ To get started, you simply need to import the following: .. code-block:: python - from lightning_app.testing import application_testing, LightningTestApp + from lightning.app.testing import application_testing, LightningTestApp We will discuss ``application_testing`` in a bit, but first let's review the structure of ``LightningTestApp``. @@ -85,7 +85,7 @@ We will discuss ``application_testing`` in a bit, but first let's review the str LightningTestApp ^^^^^^^^^^^^^^^^^ -The :class:`lightning_app.testing.testing.LightningTestApp` class is available to use for provisioning and setting up your testing needs. Note that you do not need this class to move forward with testing. Any application that inherits ``LightningApp`` should suffice as long as you override the correct methods. Reviewing the TestLightnigApp we see some overrides that are already there. Please revuew the class for more information. +The :class:`lightning.app.testing.testing.LightningTestApp` class is available to use for provisioning and setting up your testing needs. Note that you do not need this class to move forward with testing. Any application that inherits ``LightningApp`` should suffice as long as you override the correct methods. Reviewing the TestLightnigApp we see some overrides that are already there. Please revuew the class for more information. .. code-block:: python diff --git a/docs/source-app/ui_and_frontends.rst b/docs/source/ui_and_frontends.rst similarity index 100% rename from docs/source-app/ui_and_frontends.rst rename to docs/source/ui_and_frontends.rst diff --git a/docs/source-app/workflows/access_app_state/access_app_state.rst b/docs/source/workflows/access_app_state/access_app_state.rst similarity index 100% rename from docs/source-app/workflows/access_app_state/access_app_state.rst rename to docs/source/workflows/access_app_state/access_app_state.rst diff --git a/docs/source-app/workflows/add_components/index.rst b/docs/source/workflows/add_components/index.rst similarity index 100% rename from docs/source-app/workflows/add_components/index.rst rename to docs/source/workflows/add_components/index.rst diff --git a/docs/source-app/workflows/add_server/any_server.rst b/docs/source/workflows/add_server/any_server.rst similarity index 100% rename from docs/source-app/workflows/add_server/any_server.rst rename to docs/source/workflows/add_server/any_server.rst diff --git a/docs/source-app/workflows/add_server/flask_basic.rst b/docs/source/workflows/add_server/flask_basic.rst similarity index 100% rename from docs/source-app/workflows/add_server/flask_basic.rst rename to docs/source/workflows/add_server/flask_basic.rst diff --git a/docs/source-app/workflows/add_server/index.rst b/docs/source/workflows/add_server/index.rst similarity index 100% rename from docs/source-app/workflows/add_server/index.rst rename to docs/source/workflows/add_server/index.rst diff --git a/docs/source-app/workflows/add_server/index_content.rst b/docs/source/workflows/add_server/index_content.rst similarity index 100% rename from docs/source-app/workflows/add_server/index_content.rst rename to docs/source/workflows/add_server/index_content.rst diff --git a/docs/source-app/workflows/add_web_link.rst b/docs/source/workflows/add_web_link.rst similarity index 100% rename from docs/source-app/workflows/add_web_link.rst rename to docs/source/workflows/add_web_link.rst diff --git a/docs/source-app/workflows/add_web_ui/angular_js_intermediate.rst b/docs/source/workflows/add_web_ui/angular_js_intermediate.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/angular_js_intermediate.rst rename to docs/source/workflows/add_web_ui/angular_js_intermediate.rst diff --git a/docs/source-app/workflows/add_web_ui/dash/basic.rst b/docs/source/workflows/add_web_ui/dash/basic.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/dash/basic.rst rename to docs/source/workflows/add_web_ui/dash/basic.rst diff --git a/docs/source-app/workflows/add_web_ui/dash/index.rst b/docs/source/workflows/add_web_ui/dash/index.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/dash/index.rst rename to docs/source/workflows/add_web_ui/dash/index.rst diff --git a/docs/source-app/workflows/add_web_ui/dash/intermediate.rst b/docs/source/workflows/add_web_ui/dash/intermediate.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/dash/intermediate.rst rename to docs/source/workflows/add_web_ui/dash/intermediate.rst diff --git a/docs/source-app/workflows/add_web_ui/dash/intermediate_plot.py b/docs/source/workflows/add_web_ui/dash/intermediate_plot.py similarity index 100% rename from docs/source-app/workflows/add_web_ui/dash/intermediate_plot.py rename to docs/source/workflows/add_web_ui/dash/intermediate_plot.py diff --git a/docs/source-app/workflows/add_web_ui/dash/intermediate_state.py b/docs/source/workflows/add_web_ui/dash/intermediate_state.py similarity index 100% rename from docs/source-app/workflows/add_web_ui/dash/intermediate_state.py rename to docs/source/workflows/add_web_ui/dash/intermediate_state.py diff --git a/docs/source-app/workflows/add_web_ui/example_app.rst b/docs/source/workflows/add_web_ui/example_app.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/example_app.rst rename to docs/source/workflows/add_web_ui/example_app.rst diff --git a/docs/source-app/workflows/add_web_ui/glossary_front_end.rst b/docs/source/workflows/add_web_ui/glossary_front_end.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/glossary_front_end.rst rename to docs/source/workflows/add_web_ui/glossary_front_end.rst diff --git a/docs/source-app/workflows/add_web_ui/glossary_ui.rst b/docs/source/workflows/add_web_ui/glossary_ui.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/glossary_ui.rst rename to docs/source/workflows/add_web_ui/glossary_ui.rst diff --git a/docs/source-app/workflows/add_web_ui/gradio/basic.rst b/docs/source/workflows/add_web_ui/gradio/basic.rst similarity index 95% rename from docs/source-app/workflows/add_web_ui/gradio/basic.rst rename to docs/source/workflows/add_web_ui/gradio/basic.rst index a07b2d02d2040..4f5ab87b8b8d4 100644 --- a/docs/source-app/workflows/add_web_ui/gradio/basic.rst +++ b/docs/source/workflows/add_web_ui/gradio/basic.rst @@ -40,7 +40,7 @@ First **create a file named app.py** with the app content: .. code:: python import lightning as L - from lightning_app.components import ServeGradio + from lightning.app.components import ServeGradio import gradio as gr class LitGradio(ServeGradio): @@ -120,7 +120,7 @@ Here's an example: .. code:: python :emphasize-lines: 4 - from lightning_app.components import ServeGradio + from lightning.app.components import ServeGradio import gradio as gr class LitGradio(ServeGradio): @@ -148,7 +148,7 @@ In this case, we render the ``LitGradio`` UI in the ``home`` tab of the applicat :emphasize-lines: 21, 27 import lightning as L - from lightning_app.components import ServeGradio + from lightning.app.components import ServeGradio import gradio as gr class LitGradio(ServeGradio): @@ -187,7 +187,7 @@ Finally, don't forget to call run inside the Root Flow to serve the Gradio app. :emphasize-lines: 24 import lightning as L - from lightning_app.components import ServeGradio + from lightning.app.components import ServeGradio import gradio as gr class LitGradio(ServeGradio): diff --git a/docs/source-app/workflows/add_web_ui/gradio/index.rst b/docs/source/workflows/add_web_ui/gradio/index.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/gradio/index.rst rename to docs/source/workflows/add_web_ui/gradio/index.rst diff --git a/docs/source-app/workflows/add_web_ui/gradio/intermediate.rst b/docs/source/workflows/add_web_ui/gradio/intermediate.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/gradio/intermediate.rst rename to docs/source/workflows/add_web_ui/gradio/intermediate.rst diff --git a/docs/source-app/workflows/add_web_ui/html/basic.rst b/docs/source/workflows/add_web_ui/html/basic.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/html/basic.rst rename to docs/source/workflows/add_web_ui/html/basic.rst diff --git a/docs/source-app/workflows/add_web_ui/html/index.rst b/docs/source/workflows/add_web_ui/html/index.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/html/index.rst rename to docs/source/workflows/add_web_ui/html/index.rst diff --git a/docs/source-app/workflows/add_web_ui/html/intermediate.rst b/docs/source/workflows/add_web_ui/html/intermediate.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/html/intermediate.rst rename to docs/source/workflows/add_web_ui/html/intermediate.rst diff --git a/docs/source-app/workflows/add_web_ui/index.rst b/docs/source/workflows/add_web_ui/index.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/index.rst rename to docs/source/workflows/add_web_ui/index.rst diff --git a/docs/source-app/workflows/add_web_ui/index_content.rst b/docs/source/workflows/add_web_ui/index_content.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/index_content.rst rename to docs/source/workflows/add_web_ui/index_content.rst diff --git a/docs/source-app/workflows/add_web_ui/integrate_any_javascript_framework.rst b/docs/source/workflows/add_web_ui/integrate_any_javascript_framework.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/integrate_any_javascript_framework.rst rename to docs/source/workflows/add_web_ui/integrate_any_javascript_framework.rst diff --git a/docs/source-app/workflows/add_web_ui/jupyter_basic.rst b/docs/source/workflows/add_web_ui/jupyter_basic.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/jupyter_basic.rst rename to docs/source/workflows/add_web_ui/jupyter_basic.rst diff --git a/docs/source-app/workflows/add_web_ui/justpy/index.rst b/docs/source/workflows/add_web_ui/justpy/index.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/justpy/index.rst rename to docs/source/workflows/add_web_ui/justpy/index.rst diff --git a/docs/source-app/workflows/add_web_ui/panel/basic.rst b/docs/source/workflows/add_web_ui/panel/basic.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/panel/basic.rst rename to docs/source/workflows/add_web_ui/panel/basic.rst diff --git a/docs/source-app/workflows/add_web_ui/panel/index.rst b/docs/source/workflows/add_web_ui/panel/index.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/panel/index.rst rename to docs/source/workflows/add_web_ui/panel/index.rst diff --git a/docs/source-app/workflows/add_web_ui/panel/intermediate.rst b/docs/source/workflows/add_web_ui/panel/intermediate.rst similarity index 96% rename from docs/source-app/workflows/add_web_ui/panel/intermediate.rst rename to docs/source/workflows/add_web_ui/panel/intermediate.rst index 1fef39a367549..be09e98fe6964 100644 --- a/docs/source-app/workflows/add_web_ui/panel/intermediate.rst +++ b/docs/source/workflows/add_web_ui/panel/intermediate.rst @@ -1,210 +1,210 @@ -:orphan: - -###################################### -Add a web UI with Panel (intermediate) -###################################### - -**Audience:** Users who want to communicate between the Lightning App and Panel. - -**Prereqs:** Must have read the `Panel basic `_ guide. - ----- - -************************************** -Interact with the Component from Panel -************************************** - -The ``PanelFrontend`` enables user interactions with the Lightning App using widgets. -You can modify the state variables of a Lightning Component using the ``AppStateWatcher``. - -For example, here we increase the ``count`` variable of the Lightning Component every time a user -presses a button: - -.. code:: python - - # app_panel.py - - import panel as pn - from lightning.app.frontend import AppStateWatcher - - pn.extension(sizing_mode="stretch_width") - - app = AppStateWatcher() - - submit_button = pn.widgets.Button(name="submit") - - @pn.depends(submit_button, watch=True) - def submit(_): - app.state.count += 1 - - @pn.depends(app.param.state) - def current_count(_): - return f"current count: {app.state.count}" - - pn.Column( - submit_button, - current_count, - ).servable() - - - -.. code:: python - - # app.py - - import lightning as L - from lightning.app.frontend import PanelFrontend - - class LitPanel(L.LightningFlow): - def __init__(self): - super().__init__() - self.count = 0 - self.last_count = 0 - - def run(self): - if self.count != self.last_count: - self.last_count = self.count - print("Count changed to: ", self.count) - - def configure_layout(self): - return PanelFrontend("app_panel.py") - - - class LitApp(L.LightningFlow): - def __init__(self): - super().__init__() - self.lit_panel = LitPanel() - - def run(self): - self.lit_panel.run() - - def configure_layout(self): - return {"name": "home", "content": self.lit_panel} - - - app = L.LightningApp(LitApp()) - -.. figure:: https://pl-public-data.s3.amazonaws.com/assets_lightning/panel-lightning-counter-from-frontend.gif - :alt: Panel Lightning App updating a counter from the frontend - - Panel Lightning App updating a counter from the frontend - ----- - -************************************ -Interact with Panel from a Component -************************************ - -To update the `PanelFrontend` from any Lightning Component, update the property in the Component. -Make sure to call the ``run`` method from the parent component. - -In this example, we update the ``count`` value of the Component: - -.. code:: python - - # app_panel.py - - import panel as pn - from lightning.app.frontend import AppStateWatcher - - app = AppStateWatcher() - - pn.extension(sizing_mode="stretch_width") - - def counter(state): - return f"Counter: {state.count}" - - last_update = pn.bind(counter, app.param.state) - - pn.panel(last_update).servable() - -.. code:: python - - # app.py - - from datetime import datetime as dt - from lightning.app.frontend import PanelFrontend - - import lightning as L - - - class LitPanel(L.LightningFlow): - def __init__(self): - super().__init__() - self.count = 0 - self._last_update = dt.now() - - def run(self): - now = dt.now() - if (now - self._last_update).microseconds >= 250: - self.count += 1 - self._last_update = now - print("Counter changed to: ", self.count) - - def configure_layout(self): - return PanelFrontend("app_panel.py") - - - class LitApp(L.LightningFlow): - def __init__(self): - super().__init__() - self.lit_panel = LitPanel() - - def run(self): - self.lit_panel.run() - - def configure_layout(self): - tab1 = {"name": "home", "content": self.lit_panel} - return tab1 - - app = L.LightningApp(LitApp()) - -.. figure:: https://pl-public-data.s3.amazonaws.com/assets_lightning/panel-lightning-counter-from-component.gif - :alt: Panel Lightning App updating a counter from the component - - Panel Lightning App updating a counter from the Component - ----- - -************* -Tips & Tricks -************* - -* Caching: Panel provides the easy to use ``pn.state.cache`` memory based, ``dict`` caching. If you are looking for something persistent try `DiskCache `_ its really powerful and simple to use. You can use it to communicate large amounts of data between the components and frontend(s). - -* Notifications: Panel provides easy to use `notifications `_. You can for example use them to provide notifications about runs starting or ending. - -* Tabulator Table: Panel provides the `Tabulator table `_ which features expandable rows. The table is useful to provide for example an overview of you runs. But you can dig into the details by clicking and expanding the row. - -* Task Scheduling: Panel provides easy to use `task scheduling `_. You can use this to for example read and display files created by your components on a scheduled basis. - -* Terminal: Panel provides the `Xterm.js terminal `_ which can be used to display live logs from your components and allow you to provide a terminal interface to your component. - -.. figure:: https://pl-public-data.s3.amazonaws.com/assets_lightning/panel-lightning-github-runner.gif - :alt: Panel Lightning App running models on github - - Panel Lightning App running models on GitHub - ----- - -********** -Next Steps -********** - -.. raw:: html - -
-
- -.. displayitem:: - :header: Add a web user interface (UI) - :description: Users who want to add a UI to their Lightning Apps - :col_css: col-md-6 - :button_link: ../index.html - :height: 150 - :tag: intermediate - -.. raw:: html - -
-
+:orphan: + +###################################### +Add a web UI with Panel (intermediate) +###################################### + +**Audience:** Users who want to communicate between the Lightning App and Panel. + +**Prereqs:** Must have read the `Panel basic `_ guide. + +---- + +************************************** +Interact with the Component from Panel +************************************** + +The ``PanelFrontend`` enables user interactions with the Lightning App using widgets. +You can modify the state variables of a Lightning Component using the ``AppStateWatcher``. + +For example, here we increase the ``count`` variable of the Lightning Component every time a user +presses a button: + +.. code:: python + + # app_panel.py + + import panel as pn + from lightning.app.frontend import AppStateWatcher + + pn.extension(sizing_mode="stretch_width") + + app = AppStateWatcher() + + submit_button = pn.widgets.Button(name="submit") + + @pn.depends(submit_button, watch=True) + def submit(_): + app.state.count += 1 + + @pn.depends(app.param.state) + def current_count(_): + return f"current count: {app.state.count}" + + pn.Column( + submit_button, + current_count, + ).servable() + + + +.. code:: python + + # app.py + + import lightning as L + from lightning.app.frontend import PanelFrontend + + class LitPanel(L.LightningFlow): + def __init__(self): + super().__init__() + self.count = 0 + self.last_count = 0 + + def run(self): + if self.count != self.last_count: + self.last_count = self.count + print("Count changed to: ", self.count) + + def configure_layout(self): + return PanelFrontend("app_panel.py") + + + class LitApp(L.LightningFlow): + def __init__(self): + super().__init__() + self.lit_panel = LitPanel() + + def run(self): + self.lit_panel.run() + + def configure_layout(self): + return {"name": "home", "content": self.lit_panel} + + + app = L.LightningApp(LitApp()) + +.. figure:: https://pl-public-data.s3.amazonaws.com/assets_lightning/panel-lightning-counter-from-frontend.gif + :alt: Panel Lightning App updating a counter from the frontend + + Panel Lightning App updating a counter from the frontend + +---- + +************************************ +Interact with Panel from a Component +************************************ + +To update the `PanelFrontend` from any Lightning Component, update the property in the Component. +Make sure to call the ``run`` method from the parent component. + +In this example, we update the ``count`` value of the Component: + +.. code:: python + + # app_panel.py + + import panel as pn + from lightning.app.frontend import AppStateWatcher + + app = AppStateWatcher() + + pn.extension(sizing_mode="stretch_width") + + def counter(state): + return f"Counter: {state.count}" + + last_update = pn.bind(counter, app.param.state) + + pn.panel(last_update).servable() + +.. code:: python + + # app.py + + from datetime import datetime as dt + from lightning.app.frontend import PanelFrontend + + import lightning as L + + + class LitPanel(L.LightningFlow): + def __init__(self): + super().__init__() + self.count = 0 + self._last_update = dt.now() + + def run(self): + now = dt.now() + if (now - self._last_update).microseconds >= 250: + self.count += 1 + self._last_update = now + print("Counter changed to: ", self.count) + + def configure_layout(self): + return PanelFrontend("app_panel.py") + + + class LitApp(L.LightningFlow): + def __init__(self): + super().__init__() + self.lit_panel = LitPanel() + + def run(self): + self.lit_panel.run() + + def configure_layout(self): + tab1 = {"name": "home", "content": self.lit_panel} + return tab1 + + app = L.LightningApp(LitApp()) + +.. figure:: https://pl-public-data.s3.amazonaws.com/assets_lightning/panel-lightning-counter-from-component.gif + :alt: Panel Lightning App updating a counter from the component + + Panel Lightning App updating a counter from the Component + +---- + +************* +Tips & Tricks +************* + +* Caching: Panel provides the easy to use ``pn.state.cache`` memory based, ``dict`` caching. If you are looking for something persistent try `DiskCache `_ its really powerful and simple to use. You can use it to communicate large amounts of data between the components and frontend(s). + +* Notifications: Panel provides easy to use `notifications `_. You can for example use them to provide notifications about runs starting or ending. + +* Tabulator Table: Panel provides the `Tabulator table `_ which features expandable rows. The table is useful to provide for example an overview of you runs. But you can dig into the details by clicking and expanding the row. + +* Task Scheduling: Panel provides easy to use `task scheduling `_. You can use this to for example read and display files created by your components on a scheduled basis. + +* Terminal: Panel provides the `Xterm.js terminal `_ which can be used to display live logs from your components and allow you to provide a terminal interface to your component. + +.. figure:: https://pl-public-data.s3.amazonaws.com/assets_lightning/panel-lightning-github-runner.gif + :alt: Panel Lightning App running models on github + + Panel Lightning App running models on GitHub + +---- + +********** +Next Steps +********** + +.. raw:: html + +
+
+ +.. displayitem:: + :header: Add a web user interface (UI) + :description: Users who want to add a UI to their Lightning Apps + :col_css: col-md-6 + :button_link: ../index.html + :height: 150 + :tag: intermediate + +.. raw:: html + +
+
diff --git a/docs/source-app/workflows/add_web_ui/react/communicate_between_react_and_lightning.rst b/docs/source/workflows/add_web_ui/react/communicate_between_react_and_lightning.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/react/communicate_between_react_and_lightning.rst rename to docs/source/workflows/add_web_ui/react/communicate_between_react_and_lightning.rst diff --git a/docs/source-app/workflows/add_web_ui/react/connect_react_and_lightning.rst b/docs/source/workflows/add_web_ui/react/connect_react_and_lightning.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/react/connect_react_and_lightning.rst rename to docs/source/workflows/add_web_ui/react/connect_react_and_lightning.rst diff --git a/docs/source-app/workflows/add_web_ui/react/create_react_template.rst b/docs/source/workflows/add_web_ui/react/create_react_template.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/react/create_react_template.rst rename to docs/source/workflows/add_web_ui/react/create_react_template.rst diff --git a/docs/source-app/workflows/add_web_ui/react/index.rst b/docs/source/workflows/add_web_ui/react/index.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/react/index.rst rename to docs/source/workflows/add_web_ui/react/index.rst diff --git a/docs/source-app/workflows/add_web_ui/react/react_development_workflow.rst b/docs/source/workflows/add_web_ui/react/react_development_workflow.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/react/react_development_workflow.rst rename to docs/source/workflows/add_web_ui/react/react_development_workflow.rst diff --git a/docs/source-app/workflows/add_web_ui/streamlit/basic.rst b/docs/source/workflows/add_web_ui/streamlit/basic.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/streamlit/basic.rst rename to docs/source/workflows/add_web_ui/streamlit/basic.rst diff --git a/docs/source-app/workflows/add_web_ui/streamlit/index.rst b/docs/source/workflows/add_web_ui/streamlit/index.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/streamlit/index.rst rename to docs/source/workflows/add_web_ui/streamlit/index.rst diff --git a/docs/source-app/workflows/add_web_ui/streamlit/intermediate.rst b/docs/source/workflows/add_web_ui/streamlit/intermediate.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/streamlit/intermediate.rst rename to docs/source/workflows/add_web_ui/streamlit/intermediate.rst diff --git a/docs/source-app/workflows/add_web_ui/vue_js_intermediate.rst b/docs/source/workflows/add_web_ui/vue_js_intermediate.rst similarity index 100% rename from docs/source-app/workflows/add_web_ui/vue_js_intermediate.rst rename to docs/source/workflows/add_web_ui/vue_js_intermediate.rst diff --git a/docs/source-app/workflows/arrange_tabs/arrange_app_basic.rst b/docs/source/workflows/arrange_tabs/arrange_app_basic.rst similarity index 100% rename from docs/source-app/workflows/arrange_tabs/arrange_app_basic.rst rename to docs/source/workflows/arrange_tabs/arrange_app_basic.rst diff --git a/docs/source-app/workflows/arrange_tabs/arrange_app_intermediate.rst b/docs/source/workflows/arrange_tabs/arrange_app_intermediate.rst similarity index 100% rename from docs/source-app/workflows/arrange_tabs/arrange_app_intermediate.rst rename to docs/source/workflows/arrange_tabs/arrange_app_intermediate.rst diff --git a/docs/source-app/workflows/arrange_tabs/index.rst b/docs/source/workflows/arrange_tabs/index.rst similarity index 100% rename from docs/source-app/workflows/arrange_tabs/index.rst rename to docs/source/workflows/arrange_tabs/index.rst diff --git a/docs/source-app/workflows/arrange_tabs/index_content.rst b/docs/source/workflows/arrange_tabs/index_content.rst similarity index 100% rename from docs/source-app/workflows/arrange_tabs/index_content.rst rename to docs/source/workflows/arrange_tabs/index_content.rst diff --git a/docs/source-app/workflows/build_command_line_interface/app.py b/docs/source/workflows/build_command_line_interface/app.py similarity index 100% rename from docs/source-app/workflows/build_command_line_interface/app.py rename to docs/source/workflows/build_command_line_interface/app.py diff --git a/docs/source-app/workflows/build_command_line_interface/cli.rst b/docs/source/workflows/build_command_line_interface/cli.rst similarity index 98% rename from docs/source-app/workflows/build_command_line_interface/cli.rst rename to docs/source/workflows/build_command_line_interface/cli.rst index c199b3129d787..ffd9bc485fdd7 100644 --- a/docs/source-app/workflows/build_command_line_interface/cli.rst +++ b/docs/source/workflows/build_command_line_interface/cli.rst @@ -14,7 +14,7 @@ Lightning provides a flexible way to create complex CLI without much effort. 1. Implement a simple CLI ************************* -To create your first CLI, you need to override the :class:`~lightning_app.core.flow.LightningFlow.configure_commands` hook and return a list of dictionaries where the keys are the commands and the values are the server side handlers. +To create your first CLI, you need to override the :class:`~lightning.app.core.flow.LightningFlow.configure_commands` hook and return a list of dictionaries where the keys are the commands and the values are the server side handlers. First, create a file ``app.py`` and copy-paste the following code in to the file: diff --git a/docs/source-app/workflows/build_command_line_interface/cli_client.rst b/docs/source/workflows/build_command_line_interface/cli_client.rst similarity index 100% rename from docs/source-app/workflows/build_command_line_interface/cli_client.rst rename to docs/source/workflows/build_command_line_interface/cli_client.rst diff --git a/docs/source-app/workflows/build_command_line_interface/commands/__init__.py b/docs/source/workflows/build_command_line_interface/commands/__init__.py similarity index 100% rename from docs/source-app/workflows/build_command_line_interface/commands/__init__.py rename to docs/source/workflows/build_command_line_interface/commands/__init__.py diff --git a/docs/source-app/workflows/build_command_line_interface/commands/notebook/__init__.py b/docs/source/workflows/build_command_line_interface/commands/notebook/__init__.py similarity index 100% rename from docs/source-app/workflows/build_command_line_interface/commands/notebook/__init__.py rename to docs/source/workflows/build_command_line_interface/commands/notebook/__init__.py diff --git a/docs/source-app/workflows/build_command_line_interface/commands/notebook/run.py b/docs/source/workflows/build_command_line_interface/commands/notebook/run.py similarity index 100% rename from docs/source-app/workflows/build_command_line_interface/commands/notebook/run.py rename to docs/source/workflows/build_command_line_interface/commands/notebook/run.py diff --git a/docs/source-app/workflows/build_command_line_interface/example_command.py b/docs/source/workflows/build_command_line_interface/example_command.py similarity index 100% rename from docs/source-app/workflows/build_command_line_interface/example_command.py rename to docs/source/workflows/build_command_line_interface/example_command.py diff --git a/docs/source-app/workflows/build_command_line_interface/index.rst b/docs/source/workflows/build_command_line_interface/index.rst similarity index 100% rename from docs/source-app/workflows/build_command_line_interface/index.rst rename to docs/source/workflows/build_command_line_interface/index.rst diff --git a/docs/source-app/workflows/build_command_line_interface/index_content.rst b/docs/source/workflows/build_command_line_interface/index_content.rst similarity index 100% rename from docs/source-app/workflows/build_command_line_interface/index_content.rst rename to docs/source/workflows/build_command_line_interface/index_content.rst diff --git a/docs/source-app/workflows/build_command_line_interface/post_example.py b/docs/source/workflows/build_command_line_interface/post_example.py similarity index 100% rename from docs/source-app/workflows/build_command_line_interface/post_example.py rename to docs/source/workflows/build_command_line_interface/post_example.py diff --git a/docs/source-app/workflows/build_lightning_app/from_pytorch_lightning_script.rst b/docs/source/workflows/build_lightning_app/from_pytorch_lightning_script.rst similarity index 100% rename from docs/source-app/workflows/build_lightning_app/from_pytorch_lightning_script.rst rename to docs/source/workflows/build_lightning_app/from_pytorch_lightning_script.rst diff --git a/docs/source-app/workflows/build_lightning_app/from_scratch.rst b/docs/source/workflows/build_lightning_app/from_scratch.rst similarity index 100% rename from docs/source-app/workflows/build_lightning_app/from_scratch.rst rename to docs/source/workflows/build_lightning_app/from_scratch.rst diff --git a/docs/source-app/workflows/build_lightning_app/from_scratch_content.rst b/docs/source/workflows/build_lightning_app/from_scratch_content.rst similarity index 100% rename from docs/source-app/workflows/build_lightning_app/from_scratch_content.rst rename to docs/source/workflows/build_lightning_app/from_scratch_content.rst diff --git a/docs/source-app/workflows/build_lightning_app/index.rst b/docs/source/workflows/build_lightning_app/index.rst similarity index 100% rename from docs/source-app/workflows/build_lightning_app/index.rst rename to docs/source/workflows/build_lightning_app/index.rst diff --git a/docs/source-app/workflows/build_lightning_app/index_content.rst b/docs/source/workflows/build_lightning_app/index_content.rst similarity index 100% rename from docs/source-app/workflows/build_lightning_app/index_content.rst rename to docs/source/workflows/build_lightning_app/index_content.rst diff --git a/docs/source-app/workflows/build_lightning_component/basic.rst b/docs/source/workflows/build_lightning_component/basic.rst similarity index 100% rename from docs/source-app/workflows/build_lightning_component/basic.rst rename to docs/source/workflows/build_lightning_component/basic.rst diff --git a/docs/source-app/workflows/build_lightning_component/from_scratch_component_content.rst b/docs/source/workflows/build_lightning_component/from_scratch_component_content.rst similarity index 100% rename from docs/source-app/workflows/build_lightning_component/from_scratch_component_content.rst rename to docs/source/workflows/build_lightning_component/from_scratch_component_content.rst diff --git a/docs/source-app/workflows/build_lightning_component/index.rst b/docs/source/workflows/build_lightning_component/index.rst similarity index 100% rename from docs/source-app/workflows/build_lightning_component/index.rst rename to docs/source/workflows/build_lightning_component/index.rst diff --git a/docs/source-app/workflows/build_lightning_component/index_content.rst b/docs/source/workflows/build_lightning_component/index_content.rst similarity index 100% rename from docs/source-app/workflows/build_lightning_component/index_content.rst rename to docs/source/workflows/build_lightning_component/index_content.rst diff --git a/docs/source-app/workflows/build_lightning_component/intermediate.rst b/docs/source/workflows/build_lightning_component/intermediate.rst similarity index 100% rename from docs/source-app/workflows/build_lightning_component/intermediate.rst rename to docs/source/workflows/build_lightning_component/intermediate.rst diff --git a/docs/source-app/workflows/build_lightning_component/publish_a_component.rst b/docs/source/workflows/build_lightning_component/publish_a_component.rst similarity index 100% rename from docs/source-app/workflows/build_lightning_component/publish_a_component.rst rename to docs/source/workflows/build_lightning_component/publish_a_component.rst diff --git a/docs/source-app/workflows/build_rest_api/add_api.rst b/docs/source/workflows/build_rest_api/add_api.rst similarity index 86% rename from docs/source-app/workflows/build_rest_api/add_api.rst rename to docs/source/workflows/build_rest_api/add_api.rst index 82796fad4d270..ac55799fdef32 100644 --- a/docs/source-app/workflows/build_rest_api/add_api.rst +++ b/docs/source/workflows/build_rest_api/add_api.rst @@ -4,7 +4,7 @@ Add an API Route to your App ############################ -In order to add a new route, you need to override the :class:`~lightning_app.core.flow.LightningFlow.configure_api` hook and return a list of :class:`~lightning_app.api.:class:`~lightning_app.api.http_methods.HttpMethod` such as :class:`~lightning_app.api.:class:`~lightning_app.api.http_methods.Get`, :class:`~lightning_app.api.:class:`~lightning_app.api.http_methods.Post`, :class:`~lightning_app.api.:class:`~lightning_app.api.http_methods.Put`, :class:`~lightning_app.api.:class:`~lightning_app.api.http_methods.Delete`. +In order to add a new route, you need to override the :class:`~lightning.app.core.flow.LightningFlow.configure_api` hook and return a list of :class:`~lightning.app.api.:class:`~lightning.app.api.http_methods.HttpMethod` such as :class:`~lightning.app.api.:class:`~lightning.app.api.http_methods.Get`, :class:`~lightning.app.api.:class:`~lightning.app.api.http_methods.Post`, :class:`~lightning.app.api.:class:`~lightning.app.api.http_methods.Put`, :class:`~lightning.app.api.:class:`~lightning.app.api.http_methods.Delete`. ---- diff --git a/docs/source-app/workflows/build_rest_api/index.rst b/docs/source/workflows/build_rest_api/index.rst similarity index 100% rename from docs/source-app/workflows/build_rest_api/index.rst rename to docs/source/workflows/build_rest_api/index.rst diff --git a/docs/source-app/workflows/build_rest_api/index_content.rst b/docs/source/workflows/build_rest_api/index_content.rst similarity index 100% rename from docs/source-app/workflows/build_rest_api/index_content.rst rename to docs/source/workflows/build_rest_api/index_content.rst diff --git a/docs/source-app/workflows/build_rest_api/models.py b/docs/source/workflows/build_rest_api/models.py similarity index 100% rename from docs/source-app/workflows/build_rest_api/models.py rename to docs/source/workflows/build_rest_api/models.py diff --git a/docs/source-app/workflows/build_rest_api/post_example.py b/docs/source/workflows/build_rest_api/post_example.py similarity index 100% rename from docs/source-app/workflows/build_rest_api/post_example.py rename to docs/source/workflows/build_rest_api/post_example.py diff --git a/docs/source-app/workflows/build_rest_api/post_example_pydantic.py b/docs/source/workflows/build_rest_api/post_example_pydantic.py similarity index 100% rename from docs/source-app/workflows/build_rest_api/post_example_pydantic.py rename to docs/source/workflows/build_rest_api/post_example_pydantic.py diff --git a/docs/source-app/workflows/build_rest_api/request_validation.rst b/docs/source/workflows/build_rest_api/request_validation.rst similarity index 100% rename from docs/source-app/workflows/build_rest_api/request_validation.rst rename to docs/source/workflows/build_rest_api/request_validation.rst diff --git a/docs/source-app/workflows/byoc/aws_cli.rst b/docs/source/workflows/byoc/aws_cli.rst similarity index 100% rename from docs/source-app/workflows/byoc/aws_cli.rst rename to docs/source/workflows/byoc/aws_cli.rst diff --git a/docs/source-app/workflows/byoc/aws_console.rst b/docs/source/workflows/byoc/aws_console.rst similarity index 100% rename from docs/source-app/workflows/byoc/aws_console.rst rename to docs/source/workflows/byoc/aws_console.rst diff --git a/docs/source-app/workflows/byoc/create_cluster.rst b/docs/source/workflows/byoc/create_cluster.rst similarity index 100% rename from docs/source-app/workflows/byoc/create_cluster.rst rename to docs/source/workflows/byoc/create_cluster.rst diff --git a/docs/source-app/workflows/byoc/delete_cluster.rst b/docs/source/workflows/byoc/delete_cluster.rst similarity index 100% rename from docs/source-app/workflows/byoc/delete_cluster.rst rename to docs/source/workflows/byoc/delete_cluster.rst diff --git a/docs/source-app/workflows/byoc/index.rst b/docs/source/workflows/byoc/index.rst similarity index 100% rename from docs/source-app/workflows/byoc/index.rst rename to docs/source/workflows/byoc/index.rst diff --git a/docs/source-app/workflows/byoc/run_on_cluster.rst b/docs/source/workflows/byoc/run_on_cluster.rst similarity index 100% rename from docs/source-app/workflows/byoc/run_on_cluster.rst rename to docs/source/workflows/byoc/run_on_cluster.rst diff --git a/docs/source-app/workflows/debug_locally.rst b/docs/source/workflows/debug_locally.rst similarity index 100% rename from docs/source-app/workflows/debug_locally.rst rename to docs/source/workflows/debug_locally.rst diff --git a/docs/source-app/workflows/enable_fault_tolerance.rst b/docs/source/workflows/enable_fault_tolerance.rst similarity index 100% rename from docs/source-app/workflows/enable_fault_tolerance.rst rename to docs/source/workflows/enable_fault_tolerance.rst diff --git a/docs/source-app/workflows/extend_app.rst b/docs/source/workflows/extend_app.rst similarity index 100% rename from docs/source-app/workflows/extend_app.rst rename to docs/source/workflows/extend_app.rst diff --git a/docs/source-app/workflows/index.rst b/docs/source/workflows/index.rst similarity index 100% rename from docs/source-app/workflows/index.rst rename to docs/source/workflows/index.rst diff --git a/docs/source-app/workflows/mount_cloud_object_store.rst b/docs/source/workflows/mount_cloud_object_store.rst similarity index 82% rename from docs/source-app/workflows/mount_cloud_object_store.rst rename to docs/source/workflows/mount_cloud_object_store.rst index 4dfbe7bb37132..72e6fa0350b75 100644 --- a/docs/source-app/workflows/mount_cloud_object_store.rst +++ b/docs/source/workflows/mount_cloud_object_store.rst @@ -14,17 +14,17 @@ Mounting Public AWS S3 Buckets Add Mount to a Work =================== -To mount data from a cloud bucket to your app compute, initialize a :class:`~lightning_app.storage.mount.Mount` +To mount data from a cloud bucket to your app compute, initialize a :class:`~lightning.app.storage.mount.Mount` object with the source path of the s3 bucket and the absolute directory path where it should be mounted and -pass the :class:`~lightning_app.storage.mount.Mount` to the :class:`~lightning_app.utilities.packaging.cloud_compute.CloudCompute` -of the :class:`~lightning_app.core.work.LightningWork` it should be mounted on. +pass the :class:`~lightning.app.storage.mount.Mount` to the :class:`~lightning.app.utilities.packaging.cloud_compute.CloudCompute` +of the :class:`~lightning.app.core.work.LightningWork` it should be mounted on. In this example, we will mount an S3 bucket: ``s3://ryft-public-sample-data/esRedditJson/`` to ``/content/esRedditJson/``. .. code-block:: python - from lightning_app import CloudCompute - from lightning_app.storage import Mount + from lightning.app import CloudCompute + from lightning.app.storage import Mount self.my_work = MyWorkClass( cloud_compute=CloudCompute( @@ -42,13 +42,13 @@ You can also pass multiple mounts to a single work by passing a ``List[Mount(... * Mounts supported up to 1 Million files, 5GB per file. Need larger mounts? Contact support@lightning.ai * When adding multiple mounts, each one should have a unique ``mount_path``. - * A maximum of 10 :class:`~lightning_app.storage.mount.Mount`\s can be added to a :class:`~lightning_app.core.work.LightningWork`. + * A maximum of 10 :class:`~lightning.app.storage.mount.Mount`\s can be added to a :class:`~lightning.app.core.work.LightningWork`. ======================= Read Files From a Mount ======================= -Once a :class:`~lightning_app.storage.mount.Mount` object is passed to :class:`~lightning_app.utilities.packaging.cloud_compute.CloudCompute`, +Once a :class:`~lightning.app.storage.mount.Mount` object is passed to :class:`~lightning.app.utilities.packaging.cloud_compute.CloudCompute`, you can access, list, or read any file from the mount under the specified ``mount_path``, just like you would if it was on your local machine. @@ -83,8 +83,8 @@ See the Full Example import os import lightning as L - from lightning_app import CloudCompute - from lightning_app.storage import Mount + from lightning.app import CloudCompute + from lightning.app.storage import Mount class ReadMount(L.LightningWork): def run(self): @@ -115,8 +115,8 @@ See the Full Example .. note:: - When running a Lighting App on your local machine, any :class:`~lightning_app.utilities.packaging.cloud_compute.CloudCompute` - configuration (including a :class:`~lightning_app.storage.mount.Mount`) is ignored at runtime. If you need access to + When running a Lighting App on your local machine, any :class:`~lightning.app.utilities.packaging.cloud_compute.CloudCompute` + configuration (including a :class:`~lightning.app.storage.mount.Mount`) is ignored at runtime. If you need access to these files on your local disk, you should download a copy of them to your machine. .. note:: diff --git a/docs/source-app/workflows/run_app_on_cloud/cloud_files.rst b/docs/source/workflows/run_app_on_cloud/cloud_files.rst similarity index 100% rename from docs/source-app/workflows/run_app_on_cloud/cloud_files.rst rename to docs/source/workflows/run_app_on_cloud/cloud_files.rst diff --git a/docs/source-app/workflows/run_app_on_cloud/index.rst b/docs/source/workflows/run_app_on_cloud/index.rst similarity index 100% rename from docs/source-app/workflows/run_app_on_cloud/index.rst rename to docs/source/workflows/run_app_on_cloud/index.rst diff --git a/docs/source-app/workflows/run_app_on_cloud/index_content.rst b/docs/source/workflows/run_app_on_cloud/index_content.rst similarity index 100% rename from docs/source-app/workflows/run_app_on_cloud/index_content.rst rename to docs/source/workflows/run_app_on_cloud/index_content.rst diff --git a/docs/source-app/workflows/run_app_on_cloud/lightning_cloud.rst b/docs/source/workflows/run_app_on_cloud/lightning_cloud.rst similarity index 100% rename from docs/source-app/workflows/run_app_on_cloud/lightning_cloud.rst rename to docs/source/workflows/run_app_on_cloud/lightning_cloud.rst diff --git a/docs/source-app/workflows/run_app_on_cloud/on_prem.rst b/docs/source/workflows/run_app_on_cloud/on_prem.rst similarity index 100% rename from docs/source-app/workflows/run_app_on_cloud/on_prem.rst rename to docs/source/workflows/run_app_on_cloud/on_prem.rst diff --git a/docs/source-app/workflows/run_app_on_cloud/on_your_own_machine.rst b/docs/source/workflows/run_app_on_cloud/on_your_own_machine.rst similarity index 100% rename from docs/source-app/workflows/run_app_on_cloud/on_your_own_machine.rst rename to docs/source/workflows/run_app_on_cloud/on_your_own_machine.rst diff --git a/docs/source-app/workflows/run_app_snippet.rst b/docs/source/workflows/run_app_snippet.rst similarity index 100% rename from docs/source-app/workflows/run_app_snippet.rst rename to docs/source/workflows/run_app_snippet.rst diff --git a/docs/source-app/workflows/run_components_on_different_hardware.rst b/docs/source/workflows/run_components_on_different_hardware.rst similarity index 100% rename from docs/source-app/workflows/run_components_on_different_hardware.rst rename to docs/source/workflows/run_components_on_different_hardware.rst diff --git a/docs/source-app/workflows/run_on_private_cloud.rst b/docs/source/workflows/run_on_private_cloud.rst similarity index 100% rename from docs/source-app/workflows/run_on_private_cloud.rst rename to docs/source/workflows/run_on_private_cloud.rst diff --git a/docs/source-app/workflows/run_work_in_parallel.rst b/docs/source/workflows/run_work_in_parallel.rst similarity index 100% rename from docs/source-app/workflows/run_work_in_parallel.rst rename to docs/source/workflows/run_work_in_parallel.rst diff --git a/docs/source-app/workflows/run_work_in_parallel_content.rst b/docs/source/workflows/run_work_in_parallel_content.rst similarity index 100% rename from docs/source-app/workflows/run_work_in_parallel_content.rst rename to docs/source/workflows/run_work_in_parallel_content.rst diff --git a/docs/source-app/workflows/run_work_once.rst b/docs/source/workflows/run_work_once.rst similarity index 100% rename from docs/source-app/workflows/run_work_once.rst rename to docs/source/workflows/run_work_once.rst diff --git a/docs/source-app/workflows/run_work_once_content.rst b/docs/source/workflows/run_work_once_content.rst similarity index 98% rename from docs/source-app/workflows/run_work_once_content.rst rename to docs/source/workflows/run_work_once_content.rst index dbef37813572a..c1890fe9ec9d5 100644 --- a/docs/source-app/workflows/run_work_once_content.rst +++ b/docs/source/workflows/run_work_once_content.rst @@ -86,7 +86,7 @@ By setting ``cache_calls=False``, Lightning won't cache the return value and re- .. code:: python :emphasize-lines: 7 - from lightning_app import LightningWork + from lightning.app import LightningWork class ExampleWork(LightningWork): @@ -124,7 +124,7 @@ as the work continuously execute in a blocking way. .. code-block:: python :emphasize-lines: 9-10 - from lightning_app import LightningApp, LightningFlow, LightningWork + from lightning.app import LightningApp, LightningFlow, LightningWork class Flow(LightningFlow): diff --git a/docs/source-app/workflows/schedule_apps.rst b/docs/source/workflows/schedule_apps.rst similarity index 100% rename from docs/source-app/workflows/schedule_apps.rst rename to docs/source/workflows/schedule_apps.rst diff --git a/docs/source-app/workflows/scripts/parallel/toy_app.py b/docs/source/workflows/scripts/parallel/toy_app.py similarity index 100% rename from docs/source-app/workflows/scripts/parallel/toy_app.py rename to docs/source/workflows/scripts/parallel/toy_app.py diff --git a/docs/source-app/workflows/scripts/parallel/toy_parallel.py b/docs/source/workflows/scripts/parallel/toy_parallel.py similarity index 100% rename from docs/source-app/workflows/scripts/parallel/toy_parallel.py rename to docs/source/workflows/scripts/parallel/toy_parallel.py diff --git a/docs/source-app/workflows/scripts/parallel/toy_two_parallel.py b/docs/source/workflows/scripts/parallel/toy_two_parallel.py similarity index 100% rename from docs/source-app/workflows/scripts/parallel/toy_two_parallel.py rename to docs/source/workflows/scripts/parallel/toy_two_parallel.py diff --git a/docs/source-app/workflows/scripts/parallel/toy_two_parallel_not_started.py b/docs/source/workflows/scripts/parallel/toy_two_parallel_not_started.py similarity index 100% rename from docs/source-app/workflows/scripts/parallel/toy_two_parallel_not_started.py rename to docs/source/workflows/scripts/parallel/toy_two_parallel_not_started.py diff --git a/docs/source-app/workflows/share_app.rst b/docs/source/workflows/share_app.rst similarity index 100% rename from docs/source-app/workflows/share_app.rst rename to docs/source/workflows/share_app.rst diff --git a/docs/source-app/workflows/share_files_between_components.rst b/docs/source/workflows/share_files_between_components.rst similarity index 92% rename from docs/source-app/workflows/share_files_between_components.rst rename to docs/source/workflows/share_files_between_components.rst index 81381b51d5bc5..4eddc68a225b4 100644 --- a/docs/source-app/workflows/share_files_between_components.rst +++ b/docs/source/workflows/share_files_between_components.rst @@ -24,11 +24,11 @@ needed distributed storage. ************ Write a file ************ -To write a file, first create a reference to the file with the :class:`~lightning_app.storage.Path` class, then write to it: +To write a file, first create a reference to the file with the :class:`~lightning.app.storage.Path` class, then write to it: .. code:: python - from lightning_app.storage import Path + from lightning.app.storage import Path # file reference boring_file_reference = Path("boring_file.txt") @@ -91,7 +91,7 @@ Run the app above with the following command: .. code-block:: bash - lightning run app docs/source-app/workflows/share_files_between_components/app.py + lightning run app docs/source/workflows/share_files_between_components/app.py .. code-block:: console @@ -105,7 +105,7 @@ For example, here we save a file on one component and use it in another componen .. code:: python - from lightning_app.storage import Path + from lightning.app.storage import Path class ComponentA(LightningWork): diff --git a/docs/source-app/workflows/share_files_between_components/app.py b/docs/source/workflows/share_files_between_components/app.py similarity index 100% rename from docs/source-app/workflows/share_files_between_components/app.py rename to docs/source/workflows/share_files_between_components/app.py diff --git a/docs/source-app/workflows/ssh/index.rst b/docs/source/workflows/ssh/index.rst similarity index 100% rename from docs/source-app/workflows/ssh/index.rst rename to docs/source/workflows/ssh/index.rst diff --git a/docs/source-app/workflows/test_an_app.rst b/docs/source/workflows/test_an_app.rst similarity index 100% rename from docs/source-app/workflows/test_an_app.rst rename to docs/source/workflows/test_an_app.rst diff --git a/src/lightning/app/cli/app-template/.gitignore b/src/lightning/app/cli/app-template/.gitignore index a416685ffa5bb..70ba25888435f 100644 --- a/src/lightning/app/cli/app-template/.gitignore +++ b/src/lightning/app/cli/app-template/.gitignore @@ -58,8 +58,8 @@ coverage.xml # Sphinx documentation docs/_build/ -docs/source-app/api/ -docs/source-app/*.md +docs/source/api/ +docs/source/*.md # PyBuilder target/ @@ -132,9 +132,9 @@ coverage.* # Frontend build artifacts *lightning/app/ui* gradio_cached_examples -/docs/source-app/api_reference/generated/* +/docs/source/api_reference/generated/* examples/my_own_leaderboard/submissions/* -docs/source-app/api_reference/generated/* +docs/source/api_reference/generated/* *.ckpt redis-stable node_modules diff --git a/src/lightning/app/cli/component-template/.gitignore b/src/lightning/app/cli/component-template/.gitignore index a416685ffa5bb..70ba25888435f 100644 --- a/src/lightning/app/cli/component-template/.gitignore +++ b/src/lightning/app/cli/component-template/.gitignore @@ -58,8 +58,8 @@ coverage.xml # Sphinx documentation docs/_build/ -docs/source-app/api/ -docs/source-app/*.md +docs/source/api/ +docs/source/*.md # PyBuilder target/ @@ -132,9 +132,9 @@ coverage.* # Frontend build artifacts *lightning/app/ui* gradio_cached_examples -/docs/source-app/api_reference/generated/* +/docs/source/api_reference/generated/* examples/my_own_leaderboard/submissions/* -docs/source-app/api_reference/generated/* +docs/source/api_reference/generated/* *.ckpt redis-stable node_modules diff --git a/tests/tests_app/components/serve/test_model_inference_api.py b/tests/tests_app/components/serve/test_model_inference_api.py index cf58eec09d7c6..4e9b0606ecca1 100644 --- a/tests/tests_app/components/serve/test_model_inference_api.py +++ b/tests/tests_app/components/serve/test_model_inference_api.py @@ -39,7 +39,7 @@ def test_model_inference_api(workers): process = mp.Process(target=target_fn, args=(port, workers)) process.start() - image_path = os.path.join(_PROJECT_ROOT, "docs/source-app/_static/images/logo.png") + image_path = os.path.join(_PROJECT_ROOT, "docs/source/_static/images/logo.png") with open(image_path, "rb") as f: imgstr = base64.b64encode(f.read()).decode("UTF-8")