From 26ab898f9affc5553abd519b190590f732db543f Mon Sep 17 00:00:00 2001 From: Alex Wu Date: Mon, 21 Oct 2024 10:47:15 +0800 Subject: [PATCH 1/3] [docs]add cache information in docs/user_guild/customizing_dependencies/raw_container.md Signed-off-by: Alex Wu --- docs/user_guide/customizing_dependencies/raw_containers.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/user_guide/customizing_dependencies/raw_containers.md b/docs/user_guide/customizing_dependencies/raw_containers.md index ae72b652f3..d1e8fa5aaf 100644 --- a/docs/user_guide/customizing_dependencies/raw_containers.md +++ b/docs/user_guide/customizing_dependencies/raw_containers.md @@ -17,7 +17,7 @@ To clone and run the example code on this page, see the [Flytesnacks repo][flyte ```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/customizing_dependencies/customizing_dependencies/raw_container.py :caption: customizing_dependencies/raw_container.py -:lines: 1-5 +:lines: 1-6 ``` ## Container tasks @@ -31,9 +31,11 @@ is `calculate_ellipse_area_shell`. This name has to be unique in the entire proj `inputs` and `outputs` specify the interface for the task; thus it should be an ordered dictionary of typed input and output variables. +[Cache](https://docs.flyte.org/en/latest/user_guide/development_lifecycle/caching.html) can be enabled in a `ContainerTask` as in a standard Flyte task, by configuring the cache settings in the `TaskMetadata` in the `metadata` parameter. + ```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/customizing_dependencies/customizing_dependencies/raw_container.py :caption: customizing_dependencies/raw_container.py -:lines: 15-112 +:lines: 16-118 ``` As can be seen in this example, `ContainerTask`s can be interacted with like normal Python functions, whose inputs From 2447d6a8cc286fc9ce27a2a1658075578b061735 Mon Sep 17 00:00:00 2001 From: Alex Wu Date: Mon, 21 Oct 2024 13:18:15 +0800 Subject: [PATCH 2/3] fix example code gitsha Signed-off-by: Alex Wu --- docs/user_guide/customizing_dependencies/raw_containers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/user_guide/customizing_dependencies/raw_containers.md b/docs/user_guide/customizing_dependencies/raw_containers.md index d1e8fa5aaf..0cfb3ef711 100644 --- a/docs/user_guide/customizing_dependencies/raw_containers.md +++ b/docs/user_guide/customizing_dependencies/raw_containers.md @@ -15,7 +15,7 @@ Refer to the raw protocol to understand how to leverage this. To clone and run the example code on this page, see the [Flytesnacks repo][flytesnacks]. ``` -```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/customizing_dependencies/customizing_dependencies/raw_container.py +```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/1f4256464615a788c40d95dfe36f120407a2826c/examples/customizing_dependencies/customizing_dependencies/raw_container.py :caption: customizing_dependencies/raw_container.py :lines: 1-6 ``` @@ -33,7 +33,7 @@ output variables. [Cache](https://docs.flyte.org/en/latest/user_guide/development_lifecycle/caching.html) can be enabled in a `ContainerTask` as in a standard Flyte task, by configuring the cache settings in the `TaskMetadata` in the `metadata` parameter. -```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/customizing_dependencies/customizing_dependencies/raw_container.py +```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/1f4256464615a788c40d95dfe36f120407a2826c/examples/customizing_dependencies/customizing_dependencies/raw_container.py :caption: customizing_dependencies/raw_container.py :lines: 16-118 ``` @@ -41,7 +41,7 @@ output variables. As can be seen in this example, `ContainerTask`s can be interacted with like normal Python functions, whose inputs correspond to the declared input variables. All data returned by the tasks are consumed and logged by a Flyte task. -```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/69dbe4840031a85d79d9ded25f80397c6834752d/examples/customizing_dependencies/customizing_dependencies/raw_container.py +```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/1f4256464615a788c40d95dfe36f120407a2826c/examples/customizing_dependencies/customizing_dependencies/raw_container.py :caption: customizing_dependencies/raw_container.py :pyobject: wf ``` From 452f84eeaad860580f13d6c9d8a2a2bda2cb3dfb Mon Sep 17 00:00:00 2001 From: Alex Wu Date: Mon, 21 Oct 2024 16:19:11 +0800 Subject: [PATCH 3/3] minor fix some wording abput cache info Signed-off-by: Alex Wu --- docs/user_guide/customizing_dependencies/raw_containers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user_guide/customizing_dependencies/raw_containers.md b/docs/user_guide/customizing_dependencies/raw_containers.md index 0cfb3ef711..857d23788f 100644 --- a/docs/user_guide/customizing_dependencies/raw_containers.md +++ b/docs/user_guide/customizing_dependencies/raw_containers.md @@ -31,7 +31,7 @@ is `calculate_ellipse_area_shell`. This name has to be unique in the entire proj `inputs` and `outputs` specify the interface for the task; thus it should be an ordered dictionary of typed input and output variables. -[Cache](https://docs.flyte.org/en/latest/user_guide/development_lifecycle/caching.html) can be enabled in a `ContainerTask` as in a standard Flyte task, by configuring the cache settings in the `TaskMetadata` in the `metadata` parameter. +[Cache](https://docs.flyte.org/en/latest/user_guide/development_lifecycle/caching.html) can be enabled in a `ContainerTask` by configuring the cache settings in the `TaskMetadata` in the `metadata` parameter. ```{rli} https://raw.githubusercontent.com/flyteorg/flytesnacks/1f4256464615a788c40d95dfe36f120407a2826c/examples/customizing_dependencies/customizing_dependencies/raw_container.py :caption: customizing_dependencies/raw_container.py