Skip to content

Commit

Permalink
Fix toc (flyteorg#850)
Browse files Browse the repository at this point in the history
* Changed 'packages' to 'dependencies'

Signed-off-by: SmritiSatyanV <[email protected]>

* update dynamics.py

Remove the second TOC that is rendered
Change the heading level
Signed-off-by: SmritiSatyanV [email protected]
  • Loading branch information
SmritiSatyanV authored Aug 9, 2022
1 parent 85a3ed4 commit 97afc31
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cookbook/core/control_flow/dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Dynamic Workflows>`. 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.
Expand All @@ -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.
Expand All @@ -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.
#
Expand All @@ -186,7 +186,7 @@ def wf(s1: str, s2: str) -> int:
# :ref:`Here<Predicting House Price in Multiple Regions Using XGBoost and Dynamic Workflows>` 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:
#
Expand All @@ -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.
#

0 comments on commit 97afc31

Please sign in to comment.