diff --git a/docs/source-app/levels/basic/build_a_lightning_component.rst b/docs/source-app/levels/basic/build_a_lightning_component.rst index 39522614fe03b..0d44f44442888 100644 --- a/docs/source-app/levels/basic/build_a_lightning_component.rst +++ b/docs/source-app/levels/basic/build_a_lightning_component.rst @@ -132,7 +132,7 @@ powerful Lightning app. Here are a few key features available to super-charge yo :titles: 15+ accelerators; Auto-stop idle machines; Auto-timeout submitted work; Use spot machines (~70% discount); Work with massive datasets; Mount cloud storage; Use a custom container :code_files: ./key_features/accelerators.py; ./key_features/idle_machine.py; ./key_features/auto_timeout.py; ./key_features/spot.py; ./key_features/massive_dataset.py; ./key_features/mount_data.py; ./key_features/custom_container.py; :highlights: 11;11;11;11;11;2,7,10, 11; 11 - :app_id: abc123 + :enable_run: true :tab_rows: 3 :height: 430px diff --git a/docs/source-app/levels/basic/hero_components.rst b/docs/source-app/levels/basic/hero_components.rst index 7fc951317d049..81fecc9461403 100644 --- a/docs/source-app/levels/basic/hero_components.rst +++ b/docs/source-app/levels/basic/hero_components.rst @@ -2,6 +2,6 @@ :titles: Hello world; Hello GPU world; PyTorch & ⚡⚡⚡ Trainer (1+ cloud GPUs); Train PyTorch (cloud GPU); Train PyTorch (32 cloud GPUs); Deploy a model on cloud GPUs; Run a model script; XGBoost; Streamlit demo :code_files: /levels/basic/hello_components/hello_world.py; /levels/basic/hello_components/hello_world_gpu.py; /levels/basic/hello_components/pl_multinode.py; /levels/basic/hello_components/train_pytorch.py; /levels/basic/hello_components/pt_multinode.py; /levels/basic/hello_components/deploy_model.py; /levels/basic/hello_components/run_ptl_script.py; /levels/basic/hello_components/xgboost.py; /levels/basic/hello_components/streamlit_demo.py :highlights: 7; 10, 11; 10-12, 17, 18; 4, 8, 12, 18-19, 26; 5, 10, 22, 28, 32, 42, 58-60; 3, 11-12, 25, 29; 7, 10; 15, 21; 9, 15, 24 - :app_id: abc123 + :enable_run: true :tab_rows: 3 :height: 620px diff --git a/docs/source-app/levels/basic/real_lightning_component_implementations.rst b/docs/source-app/levels/basic/real_lightning_component_implementations.rst index c660c1679ac72..da413f459234a 100644 --- a/docs/source-app/levels/basic/real_lightning_component_implementations.rst +++ b/docs/source-app/levels/basic/real_lightning_component_implementations.rst @@ -27,7 +27,7 @@ or cloud GPUs without code changes. :descriptions: import Lightning; We're using a demo LightningModule; Move your training code here (usually your main.py); Pass your component to the multi-node executor (it works on CPU or single GPUs also); Select the number of machines (nodes). Here we choose 2.; Choose from over 15+ machine types. This one has 4 v100 GPUs.; Initialize the App object that executes the component logic. :code_files: /levels/basic/hello_components/pl_multinode.py; /levels/basic/hello_components/pl_multinode.py; /levels/basic/hello_components/pl_multinode.py; /levels/basic/hello_components/pl_multinode.py; /levels/basic/hello_components/pl_multinode.py; /levels/basic/hello_components/pl_multinode.py; /levels/basic/hello_components/pl_multinode.py; :highlights: 2; 4; 10-12; 15-18; 17; 18; 20 - :app_id: abc123 + :enable_run: true :tab_rows: 5 :height: 420px @@ -48,7 +48,7 @@ This example shows how to deploy PyTorch and create an API :descriptions: Shortcut to list dependencies without a requirements.txt file.; Import one of our serving components (high-performance ones are available on the enterprise tiers); Define the setup function to load your favorite pretrained models and do any kind of pre-processing.; Define the predict function which is called when the endpoint is hit.; Initialize the server and define the type of cloud machine to use. :code_files: /levels/basic/hello_components/deploy_model.py; /levels/basic/hello_components/deploy_model.py; /levels/basic/hello_components/deploy_model.py; /levels/basic/hello_components/deploy_model.py; /levels/basic/hello_components/deploy_model.py; :highlights: 1; 3; 10-12; 15-25; 28-30 - :app_id: abc123 + :enable_run: true :tab_rows: 4 :height: 620px diff --git a/docs/source-app/levels/basic/save_money_on_cloud_costs.rst b/docs/source-app/levels/basic/save_money_on_cloud_costs.rst index 2218dc382fbee..5e752954da644 100644 --- a/docs/source-app/levels/basic/save_money_on_cloud_costs.rst +++ b/docs/source-app/levels/basic/save_money_on_cloud_costs.rst @@ -18,7 +18,7 @@ Here are a few features that will enable you save a lot on your cloud costs: :titles: 15+ accelerators; Auto-stop idle machines; Auto-timeout submitted work; Use spot machines (~70% discount); Work with massive datasets; Mount cloud storage; Use a custom container :code_files: ./key_features/accelerators.py; ./key_features/idle_machine.py; ./key_features/auto_timeout.py; ./key_features/spot.py; ./key_features/massive_dataset.py; ./key_features/mount_data.py; ./key_features/custom_container.py; :highlights: 11;11;11;11;11;1,7, 10, 11; 11 - :app_id: abc123 + :enable_run: true :tab_rows: 3 :height: 430px diff --git a/docs/source-app/levels/intermediate/connect_lightning_components.rst b/docs/source-app/levels/intermediate/connect_lightning_components.rst index 9e9a2f0667842..14c2e9d793ba2 100644 --- a/docs/source-app/levels/intermediate/connect_lightning_components.rst +++ b/docs/source-app/levels/intermediate/connect_lightning_components.rst @@ -37,7 +37,7 @@ on a separate CPU machine. We save money by stopping the GPU machine when the wo :descriptions: First, import Lightning; This component trains a model on a GPU machine; This component analyzes a model on a CPU machine; Define the LightningFlow that orchestrates components; Component 1 will run on a CPU machine; Component 2 will run on an accelerated GPU machine; Describe the workflow in the run method; Training runs first and completes; Analyze runs after training completes; This allows the app to be runnable :code_files: ./level_2_scripts/hello_app.py; ./level_2_scripts/hello_app.py; ./level_2_scripts/hello_app.py; ./level_2_scripts/hello_app.py; ./level_2_scripts/hello_app.py; ./level_2_scripts/hello_app.py; ./level_2_scripts/hello_app.py; ./level_2_scripts/hello_app.py; ./level_2_scripts/hello_app.py; ./level_2_scripts/hello_app.py :highlights: 2; 5-7; 9-11; 13; 16; 17; 19; 20; 21; 23 - :app_id: abc123 + :enable_run: true :tab_rows: 4 :height: 460px diff --git a/docs/source-app/levels/intermediate/debug_a_lightning_app.rst b/docs/source-app/levels/intermediate/debug_a_lightning_app.rst index ae0e0496991ef..856be5a182c58 100644 --- a/docs/source-app/levels/intermediate/debug_a_lightning_app.rst +++ b/docs/source-app/levels/intermediate/debug_a_lightning_app.rst @@ -16,7 +16,7 @@ To enable a breakpoint, use `L.pdb.set_trace()` (note direct python pdb support :descriptions: Toy app; Add a breakpoint. When the program runs, it will stop at this line. :code_files: ./debug_app_scripts/toy_app_1_component.py; ./debug_app_scripts/toy_app_1_component_pdb.py :highlights: ; 7 - :app_id: abc123 + :enable_run: true :tab_rows: 3 :height: 350px diff --git a/docs/source-app/levels/intermediate/share_variables_between_lightning_components.rst b/docs/source-app/levels/intermediate/share_variables_between_lightning_components.rst index c4b8b168204d3..b0ce06dae2a41 100644 --- a/docs/source-app/levels/intermediate/share_variables_between_lightning_components.rst +++ b/docs/source-app/levels/intermediate/share_variables_between_lightning_components.rst @@ -18,7 +18,7 @@ Lightning sends the variables across the machines for you automatically. :descriptions: Remember this component may live on its own machine; The flow may be on a separate machine as well; This variable is on the flow machine; When passed to the work component, it is actually sent across the network under the hood.; When it prints here, it prints on the work component machine (not the flow machine); The second string was directly created on machine 1 :code_files: ./scripts/comms_1.py; ./scripts/comms_1.py; ./scripts/comms_1.py; ./scripts/comms_1.py; ./scripts/comms_1.py; ./scripts/comms_1.py :highlights: 4-7; 9-16; 15; 16; 6; 7; - :app_id: abc123 + :enable_run: true :tab_rows: 3 :height: 380px @@ -55,7 +55,7 @@ Example Continuous deployment: Every time a model saves a checkpoint, we redeplo :descriptions: Define a component that simulates training; Define a component that simulates deployment; Training will happen in parallel over a long period; The deployment server also runs in parallel forever; Start training in parallel (could take months); Whenever the model has a checkpoint deploy; When the checkpoint is updated, model re-deploys :code_files: ./scripts/two_work_comms.py; ./scripts/two_work_comms.py; ./scripts/two_work_comms.py; ./scripts/two_work_comms.py; ./scripts/two_work_comms.py; ./scripts/two_work_comms.py; ./scripts/two_work_comms.py :highlights: 5-18; 20-22; 27; 28; 31; 32, 33; 33 - :app_id: abc123 + :enable_run: true :tab_rows: 3 :height: 690px @@ -110,7 +110,7 @@ transfering them across components. :descriptions: Let's define a component to simulate generating embeddings (from a DB, feature store, etc...); This component simulates a server that will use the embeddings.; Run the component to generate the embeddings; Simulate embeddings as an array. Here you would query a DB, load from a feature store or disk or even use a neural network to extract the embedding.; Allow the embeddings to be transfered efficiently by wrapping them in the Payload object.; Pass the variable to the EmbeddingServer (just the pointer).; The data gets transfered once you use the .value attribute in the other component. :code_files: ./scripts/toy_payload.py; ./scripts/toy_payload.py; ./scripts/toy_payload.py; ./scripts/toy_payload.py; ./scripts/toy_payload.py; ./scripts/toy_payload.py; ./scripts/toy_payload.py; :highlights: 5-13; 15-19; 28; 12; 13; 29; 18 - :app_id: abc123 + :enable_run: true :tab_rows: 3 :height: 600px diff --git a/docs/source-app/workflows/run_work_in_parallel_content.rst b/docs/source-app/workflows/run_work_in_parallel_content.rst index 467f64f165043..1c8d5b374dbb2 100644 --- a/docs/source-app/workflows/run_work_in_parallel_content.rst +++ b/docs/source-app/workflows/run_work_in_parallel_content.rst @@ -20,7 +20,7 @@ to wait for the first one to finish. :descriptions: No parallel components; Allow the train component to run in parallel; When the component runs, it will run in parallel; The next component is unblocked and can now immediately run. :code_files: /workflows/scripts/parallel/toy_app.py; /workflows/scripts/parallel/toy_parallel.py; /workflows/scripts/parallel/toy_parallel.py; /workflows/scripts/parallel/toy_parallel.py; :highlights: ; 18; 23; 24; - :app_id: abc123 + :enable_run: true :tab_rows: 3 :height: 540px @@ -36,6 +36,6 @@ allows the third component to run without waiting for the others to finish. :descriptions: No parallel components; Enable 2 components to run in parallel; Start both components together in parallel; Last component is not blocked and can start immediately. :code_files: /workflows/scripts/parallel/toy_two_parallel_not_started.py; /workflows/scripts/parallel/toy_two_parallel.py; /workflows/scripts/parallel/toy_two_parallel.py; /workflows/scripts/parallel/toy_two_parallel.py :highlights: ; 18, 19; 23, 24; 25 - :app_id: abc123 + :enable_run: true :tab_rows: 3 :height: 540px