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.name (and other _cluster_info items) get carried over to subsequent Clusters #6485

Closed
graingert opened this issue Jun 1, 2022 · 2 comments · Fixed by #6487
Closed

Comments

@graingert
Copy link
Member

( if Cluster.__init__ is not called before Cluster.name.__set__ )

import sys

from distributed.deploy import Cluster

class ExampleCluster(Cluster):
    def __init__(self, name, *args, **kwargs):
        self.name = f"example-cluster-{name}"
        super().__init__(*args, **kwargs)


def main():

    print(
        Cluster()
    )  # Cluster(e174b1b2, '<Not Connected>', workers=0, threads=0, memory=0 B)
    print(
        ExampleCluster("demo")
    )  # ExampleCluster(example-cluster-demo, '<Not Connected>', workers=0, threads=0, memory=0 B)
    print(
        Cluster()
    )  # Cluster(example-cluster-demo, '<Not Connected>', workers=0, threads=0, memory=0 B)
    return 0


if __name__ == "__main__":
    sys.exit(main())

see also dask/dask-kubernetes#516
see also #5305 (comment)

@graingert
Copy link
Member Author

@jacobtomlinson

@mrocklin
Copy link
Member

I'm curious, what was the context here? Where did this come up?

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.

2 participants