__init__#
- AutoscalingCluster.__init__(head_resources: dict, worker_node_types: dict, autoscaler_v2: bool = False, enable_token_auth: bool = True, **config_kwargs)[source]#
Create the cluster.
- Parameters:
head_resources (dict) – resources of the head node, including CPU.
worker_node_types (dict) – autoscaler node types config for worker nodes.
autoscaler_v2 (bool) – If True, enable autoscaler v2 features in the generated config.
enable_token_auth (bool) – If True, run the cluster with token authentication and create ~/.ray/auth_token when no token exists. If False, run it with authentication disabled. Either way,
startsets RAY_AUTH_MODE in this process, overriding any earlier value, andshutdownrestores the earlier value.**config_kwargs – Additional configuration values merged into the generated cluster config.