From 97afc31ea4b9ab6378ffde60569af93ef6e667b0 Mon Sep 17 00:00:00 2001 From: SmritiSatyanV <94349093+SmritiSatyanV@users.noreply.github.com> Date: Tue, 9 Aug 2022 16:44:20 +0530 Subject: [PATCH] Fix toc (#850) * Changed 'packages' to 'dependencies' Signed-off-by: SmritiSatyanV * update dynamics.py Remove the second TOC that is rendered Change the heading level Signed-off-by: SmritiSatyanV smriti@union.ai --- cookbook/core/control_flow/dynamics.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cookbook/core/control_flow/dynamics.py b/cookbook/core/control_flow/dynamics.py index d8f9ce3fab..d3bbd9f374 100644 --- a/cookbook/core/control_flow/dynamics.py +++ b/cookbook/core/control_flow/dynamics.py @@ -139,25 +139,25 @@ def wf(s1: str, s2: str) -> int: # %% # Dynamic Workflows from Execution POV -# ------------------------------------ +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # # What Is a Dynamic Workflow? -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# """"""""""""""""""""""""""" # # A workflow whose directed acyclic graph (DAG) is computed at run-time is a :ref:`dynamic workflow `. The tasks in a dynamic workflow are executed at runtime using dynamic inputs. # # Think of a dynamic workflow as a combination of a task and a workflow. It is used to dynamically decide the parameters of a workflow at runtime. It is both compiled and executed at run-time. You can define a dynamic workflow using the ``@dynamic`` decorator. # # Why Use Dynamic Workflows? -# ^^^^^^^^^^^^^^^^^^^^^^^^^^ +# """""""""""""""""""""""""" # # Flexibility -# """"""""""" +# *********** # # Dynamic workflows simplify your pipelines, providing the flexibility to design workflows based on your project’s requirements, which can’t be achieved using static workflows. # # Lower Pressure on etcd -# """"""""""""""""""""""" +# ********************** # # The workflow CRD and the states associated with static workflows are stored in etcd, which is the Kubernetes database. This database stores Flyte workflow CRD as key-value pairs and keeps track of the status of each node’s execution. # A limitation of etcd is that the aggregate of the size of the workflow and the status of the nodes shouldn't exceed 2 MB. @@ -166,7 +166,7 @@ def wf(s1: str, s2: str) -> int: # You can create large dynamic workflows or multiple dynamic workflows that are nested in a static workflow that saves storage space on etcd for memory-intensive jobs. # # How Is a Dynamic Workflow Executed? -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# """""""""""""""""""""""""""""""""""" # # FlytePropeller executes the dynamic task in its k8s pod and results in a compiled Flyte DAG which is made available in the FlyteConsole. # FlytePropeller uses the information obtained by executing the dynamic task to schedule and execute every node within the dynamic task. @@ -176,7 +176,7 @@ def wf(s1: str, s2: str) -> int: # It is named so because the workflow is yet to be executed and all the subsequent outputs are futures. # # How Does Flyte Handle Dynamic Workflows? -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# """"""""""""""""""""""""""""""""""""""""" # # A dynamic workflow is modeled as a task in the backend, but the body of the function is executed to produce a workflow at run-time. In both dynamic and static workflows, the output of tasks are Promise objects. # @@ -186,7 +186,7 @@ def wf(s1: str, s2: str) -> int: # :ref:`Here` is an example of house price prediction using dynamic workflows. # # Where Are Dynamic Workflows Used? -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# """"""""""""""""""""""""""""""""" # # Dynamic workflow comes into the picture when you need to: # @@ -196,7 +196,7 @@ def wf(s1: str, s2: str) -> int: # #. Tune hyperparameters during execution # # Dynamic versus Map Tasks -# ^^^^^^^^^^^^^^^^^^^^^^^^ +# """"""""""""""""""""""""" # # Dynamic tasks have overhead for large fan-out tasks because they store metadata for the entire workflow. In contrast, map tasks are efficient for these large fan-out tasks since they don’t store the metadata, as a consequence of which overhead is less apparent. #