Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] with_overrides for cache doesn't work #6079

Open
2 tasks done
hebiao064 opened this issue Dec 4, 2024 · 0 comments · May be fixed by flyteorg/flytekit#2975
Open
2 tasks done

[BUG] with_overrides for cache doesn't work #6079

hebiao064 opened this issue Dec 4, 2024 · 0 comments · May be fixed by flyteorg/flytekit#2975
Assignees
Labels
bug Something isn't working

Comments

@hebiao064
Copy link

Describe the bug

I tried the with_overrides to override cache configuration for a local flyte @task, but it didn't work as expected.

Code:

@task(
    cache=False,
    cache_version="v1",
    cache_serialize=False,
)
def to_be_overridden_task(a: str) -> str:
    return f"*~*~*~{a}*~*~*~"

def to_be_overridden_task_wrapper(a: str, cache: bool = False, cache_version: str = "", cache_serialize: bool = False) -> str:
    return to_be_overridden_task(a=a).with_overrides(
        cache=cache,
        cache_version=cache_version,
        cache_serialize=cache_serialize
    )

@workflow
def my_overridden_wf(a: str):
    return to_be_overridden_task_wrapper(a=a, cache=True, cache_version="foo", cache_serialize=True)

After pyflyte run, I found the cache is still False and cache_version still ""

Expected behavior

After pyflyte run, cache should be overridden to True also cache_version, cache_serialize should be overridden to corresponding values

Additional context to reproduce

No response

Screenshots

Screenshot 2024-12-03 at 5 57 29 PM

In serialized proto, the cache is still False

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@hebiao064 hebiao064 added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Dec 4, 2024
@hebiao064 hebiao064 linked a pull request Dec 4, 2024 that will close this issue
3 tasks
@eapolinario eapolinario removed the untriaged This issues has not yet been looked at by the Maintainers label Dec 5, 2024
@eapolinario eapolinario self-assigned this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

2 participants