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

cluster_dump roundtrips break non-stringified keys #8540

Open
hendrikmakait opened this issue Feb 28, 2024 · 1 comment
Open

cluster_dump roundtrips break non-stringified keys #8540

hendrikmakait opened this issue Feb 28, 2024 · 1 comment
Labels
bug Something is broken diagnostics

Comments

@hendrikmakait
Copy link
Member

Describe the issue:

After we removed key stringification in #8083, keys can now be composite of multiple different types. Our cluster_dump functionality is not capable of correctly roundtripping those.

Minimal Complete Verifiable Example:

import dask.dataframe as dd
import pandas as pd
from distributed import Client
from distributed.cluster_dump import DumpArtefact

if __name__ == "__main__":
    c = Client()
    df = dd.from_pandas(pd.DataFrame({"a": [1, 2, 3]}), npartitions=3)
    result = df.compute()
    c.dump_cluster_state(filename="dump", format="yaml")
    dump = DumpArtefact.from_url("dump.yaml")
    dump.scheduler_story(df.__dask_keys__()[0])

raises

Traceback (most recent call last):
  File "/Users/hendrikmakait/projects/dask/distributed/foo.py", line 12, in <module>
    dump.scheduler_story(df.__dask_keys__()[0])
  File "/Users/hendrikmakait/projects/dask/distributed/distributed/cluster_dump.py", line 207, in scheduler_story
    for story in _scheduler_story(keys, log):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hendrikmakait/projects/dask/distributed/distributed/_stories.py", line 33, in scheduler_story
    if t[0] in keys_or_stimuli or keys_or_stimuli.intersection(t[3])
       ^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'list'

For msgpack, the error is the same.

@hendrikmakait hendrikmakait added bug Something is broken diagnostics labels Feb 28, 2024
@hendrikmakait hendrikmakait changed the title cluster_dump roundtrips breaks non-stringified keys cluster_dump roundtrips break non-stringified keys Feb 28, 2024
@hendrikmakait
Copy link
Member Author

In an offline conversation, @fjetter, @crusaderky, and I have decided not to put effort into this, as cluster dumps have rarely been useful in the last few months. If something similar becomes necessary again, we will likely return to the drawing board and rebuild this from the ground.

If someone finds this useful and wants to go through the effort of fixing cluster dumps in the meantime, feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken diagnostics
Projects
None yet
Development

No branches or pull requests

1 participant