Compute configs

A description of compute resources for a Ray cluster

Compute configs specify the cloud resources your Cluster will use.

In open-source Ray, you might be familiar with the cluster.yaml where a large number of things like machine type, Docker images, dependencies, and commands are all in a single file.

In Anyscale, users can better decouple all these separate concerns. Compute Configurations are how users on Anyscale specify cloud resource types and limitations.

An example Compute Config, specified in JSON-format:

{
  "name": "my_cluster_compute_config",
  "config": {
    "cloud_id": "<Your-Cloud-ID-here>",
    "region": "us-west-2",
    "allowed_azs": ["us-west-2a"],
    "head_node_type": {
      "name": "head_node_type",
      "instance_type": "m4.16xlarge"
    }
  },
  "worker_node_types": [{
      "name": "worker_node_1",
      "instance_type": "m4.16xlarge",
      "use_spot": true,
      "min_workers": 2,
      "max_workers": 10,
  }],
  "aws": {
    "BlockDeviceMappings": [{
      "DeviceName": "/dev/sda1",
      "Ebs": { "VolumeSize": 50 }
    }],
    "IamInstanceProfile": { "Arn": "arn:aws:iam:..." },
    "NetworkInterfaces": [{
      "SubnetId": "subnet-...",
      "Groups": [ "sg-...", "sg-..." ],
      "AssociatePublicIpAddress": true,
    }],
    "TagSpecifications": [{ "ResourceType": "instance", "Tags": [
          { "Key": "my-key", "Value": "my-value" },
          { "Key": "my-key-2", "Value": "my-value-2" }
    ]}]
  }
}

You'll note that we can specify things like:

  • Head / worker node types (for a list of supported node types, refer to this page)

  • Spot instance usage

  • Cloud provider & region

  • Advanced cloud-specific configuration

With this, you can specify exactly the resources your Cluster will make use of, either via the Web UI or the Anyscale Python SDK. The API docs to create a cluster compute can be found here.

When using the UI, you can navigate to "Configurations > Cluster compute configs > Create a new config" to create a cluster compute config. You can also create one on the fly when you create a new cluster.

Create a new cluster compute config button in the configurations page

Last updated

Was this helpful?