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

Delayed function with string argument value matching dask_key_name causes a circular reference detection #11403

Open
syagev opened this issue Sep 21, 2024 · 1 comment

Comments

@syagev
Copy link

syagev commented Sep 21, 2024

Describe the issue:
Delayed function with a string argument value that happens to match the dask_key_name provided in that same call, causes a circular reference detection

Minimal Complete Verifiable Example:

@delayed
def task(arg: str):
    return arg

task('funky', dask_key_name='funky').compute()

>>>  
RuntimeError: Cycle detected between the following keys:
E             -> funky
E             -> funky

Anything else we need to know?:
Funky edge case :)

Environment:

  • Dask version: 2024.9.0
  • Python version: 3.11
  • Operating System: Win11
  • Install method (conda, pip, source): pip
@github-actions github-actions bot added the needs triage Needs a response from a contributor label Sep 21, 2024
@jrbourbeau
Copy link
Member

Thanks for the issue @syagev. I think this is expected given how we handle task names today. One needs to be careful when using dask_key_name. Though we recently added a new class for tasks which should let us improve situations like this in the future (xref #11248)

Funky edge case :)

Indeed!

@jrbourbeau jrbourbeau removed the needs triage Needs a response from a contributor label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants