From d1d7a5c15796ab74654cc42c99e5ea7567d02c66 Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Thu, 8 Aug 2024 14:15:43 -0400 Subject: [PATCH 1/2] Use enable_deck=True in docs --- docs/core_use_cases/analytics.md | 2 +- docs/core_use_cases/machine_learning.md | 2 +- .../visualizing_task_input_and_output.md | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/core_use_cases/analytics.md b/docs/core_use_cases/analytics.md index 886b75618d..71b5530c03 100644 --- a/docs/core_use_cases/analytics.md +++ b/docs/core_use_cases/analytics.md @@ -48,7 +48,7 @@ of the map. In this case, we normalize the `people_vaccinated` by the `population` count of each country: ```{code-cell} ipython3 -@task(disable_deck=False) +@task(enable_deck=True) def plot(df: pd.DataFrame): """Render a Choropleth map.""" df["text"] = df["location"] + "
" + "Last updated on: " + df["date"] diff --git a/docs/core_use_cases/machine_learning.md b/docs/core_use_cases/machine_learning.md index 489b8b05f9..6368b0aa54 100644 --- a/docs/core_use_cases/machine_learning.md +++ b/docs/core_use_cases/machine_learning.md @@ -112,7 +112,7 @@ There are many ways to extend your workloads: {ref}`Kubeflow Pytorch` and {doc}`more <_tags/DistributedComputing>` to do distributed training. * - **🔎 Experiment Tracking** - Auto-capture training logs with the {py:func}`~flytekitplugins.mlflow.mlflow_autolog` - decorator, which can be viewed as Flyte Decks with `@task(disable_decks=False)`. + decorator, which can be viewed as Flyte Decks with `@task(enable_deck=True)`. * - **⏩ Inference Acceleration** - Serialize your models in ONNX format using the {ref}`ONNX plugin `, which supports ScikitLearn, TensorFlow, and PyTorch. diff --git a/docs/flyte_fundamentals/visualizing_task_input_and_output.md b/docs/flyte_fundamentals/visualizing_task_input_and_output.md index 487d1627c9..ed3f97223f 100644 --- a/docs/flyte_fundamentals/visualizing_task_input_and_output.md +++ b/docs/flyte_fundamentals/visualizing_task_input_and_output.md @@ -22,14 +22,14 @@ how to generate an HTML report from some Python object. ## Enabling Flyte decks -To enable Flyte decks, simply set `disable_deck=False` in the `@task` decorator: +To enable Flyte decks, simply set `enable_deck=True` in the `@task` decorator: ```{code-cell} ipython3 import pandas as pd from flytekit import task, workflow -@task(disable_deck=False) +@task(enable_deck=False) def iris_data() -> pd.DataFrame: ... ``` @@ -51,7 +51,7 @@ from typing import Optional from flytekit import task, workflow -@task(disable_deck=False) +@task(enable_deck=False) def iris_data( sample_frac: Optional[float] = None, random_state: Optional[int] = None, @@ -168,7 +168,7 @@ function. In the following example, we extend the `iris_data` task with: import flytekit from flytekitplugins.deck.renderer import MarkdownRenderer, BoxRenderer -@task(disable_deck=False) +@task(enable_deck=False) def iris_data( sample_frac: Optional[float] = None, random_state: Optional[int] = None, @@ -220,7 +220,7 @@ except ImportError: from typing_extensions import Annotated -@task(disable_deck=False) +@task(enable_deck=False) def iris_data( sample_frac: Optional[float] = None, random_state: Optional[int] = None, From 37c983d62f3a338d9c71b0a24a498eb13e0d1f43 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:47:17 -0400 Subject: [PATCH 2/2] Apply suggestions from code review Indeed. Thank you! Co-authored-by: Nikki Everett Signed-off-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> --- .../visualizing_task_input_and_output.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/flyte_fundamentals/visualizing_task_input_and_output.md b/docs/flyte_fundamentals/visualizing_task_input_and_output.md index ed3f97223f..0390d6cf44 100644 --- a/docs/flyte_fundamentals/visualizing_task_input_and_output.md +++ b/docs/flyte_fundamentals/visualizing_task_input_and_output.md @@ -29,7 +29,7 @@ import pandas as pd from flytekit import task, workflow -@task(enable_deck=False) +@task(enable_deck=True) def iris_data() -> pd.DataFrame: ... ``` @@ -51,7 +51,7 @@ from typing import Optional from flytekit import task, workflow -@task(enable_deck=False) +@task(enable_deck=True) def iris_data( sample_frac: Optional[float] = None, random_state: Optional[int] = None, @@ -168,7 +168,7 @@ function. In the following example, we extend the `iris_data` task with: import flytekit from flytekitplugins.deck.renderer import MarkdownRenderer, BoxRenderer -@task(enable_deck=False) +@task(enable_deck=True) def iris_data( sample_frac: Optional[float] = None, random_state: Optional[int] = None, @@ -220,7 +220,7 @@ except ImportError: from typing_extensions import Annotated -@task(enable_deck=False) +@task(enable_deck=True) def iris_data( sample_frac: Optional[float] = None, random_state: Optional[int] = None,