Created
May 29, 2022 16:51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def setup_cluster( | |
cluster_config: Dict, | |
) -> Union[LocalCluster, FargateCluster]: | |
if cluster_config is None: | |
n_workers = 3 | |
threads_per_worker = 2 | |
return LocalCluster( | |
n_workers=n_workers, | |
threads_per_worker=threads_per_worker, | |
processes=False, | |
memory_limit="4GB", | |
) | |
else: | |
return FargateCluster(**cluster_config["cluster_kwargs"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment