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

keyerror in dask.config.rename when working with distributed #4902

Closed
bolliger32 opened this issue Jun 7, 2019 · 0 comments · Fixed by #4903
Closed

keyerror in dask.config.rename when working with distributed #4902

bolliger32 opened this issue Jun 7, 2019 · 0 comments · Fixed by #4903

Comments

@bolliger32
Copy link
Contributor

bolliger32 commented Jun 7, 2019

calling dask-worker using dask==1.2.2, distributed==1.28.1, I get the following error:

Traceback (most recent call last): File "/opt/conda/envs/worker/bin/dask-worker", line 7, in <module> from distributed.cli.dask_worker import go File "/opt/conda/envs/worker/lib/python3.6/site-packages/distributed/__init__.py", line 3, in <module> from . import config File "/opt/conda/envs/worker/lib/python3.6/site-packages/distributed/config.py", line 55, in <module> dask.config.rename(aliases) File "/opt/conda/envs/worker/lib/python3.6/site-packages/dask/config.py", line 451, in rename del config[k] # TODO: support nested keys KeyError: 'tick-maximum-delay'

It looks like this was introduced by #4742 when dask.config.rename was not properly adjusted, so that it can run into these KeyErrors. Current state of the function:

    """ Rename old keys to new keys
    This helps migrate older configuration versions over time
    """
    old = []
    new = {}
    for o, n in aliases.items():
        value = get(o, None, config=config)
        if value is not None:
            old.append(o)
            new[n] = value

    for k in old:
        del config[k]  # TODO: support nested keys

    set(new, config=config)

Suggest changing the 3rd to last line to del config[canonical_name(k, config)]. Will file an appropriate PR.

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

Successfully merging a pull request may close this issue.

1 participant