From 13324086351c341fbfbcc7c83915f42646218a11 Mon Sep 17 00:00:00 2001 From: "David (Ti-Wei) Lin" Date: Thu, 5 Dec 2024 06:04:57 -0800 Subject: [PATCH] Fix inconsistent code examples in caching.md documentation (#6077) The code block examples in the Caching documentation look misaligned. This might be due to new code being added to the original file in flytesnacks, which would shift the line numbers. I'm adjusting the line references to match the current code. Signed-off-by: David (Ti-Wei) Lin --- docs/user_guide/development_lifecycle/caching.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/user_guide/development_lifecycle/caching.md b/docs/user_guide/development_lifecycle/caching.md index 70b2fcaa64..2711aee68a 100644 --- a/docs/user_guide/development_lifecycle/caching.md +++ b/docs/user_guide/development_lifecycle/caching.md @@ -152,7 +152,7 @@ The default behavior displayed by Flyte's memoization feature might not match th ```{literalinclude} /examples/development_lifecycle/development_lifecycle/task_cache.py :caption: development_lifecycle/task_cache.py -:lines: 39-54 +:lines: 44-59 ``` If run twice with the same inputs, one would expect that `bar` would trigger a cache hit, but it turns out that's not the case because of how dataframes are represented in Flyte. @@ -161,7 +161,7 @@ For example, in order to cache the result of calls to `bar`, you can rewrite the ```{literalinclude} /examples/development_lifecycle/development_lifecycle/task_cache.py :caption: development_lifecycle/task_cache.py -:lines: 64-85 +:lines: 69-91 ``` Note how the output of task `foo` is annotated with an object of type `HashMethod`. Essentially, it represents a function that produces a hash that is used as part of the cache key calculation in calling the task `bar`. @@ -177,7 +177,7 @@ Here's a complete example of the feature: ```{literalinclude} /examples/development_lifecycle/development_lifecycle/task_cache.py :caption: development_lifecycle/task_cache.py -:lines: 97-134 +:lines: 103-140 ``` [flytesnacks]: https://github.com/flyteorg/flytesnacks/tree/master/examples/development_lifecycle/