skypilot-org / skypilot

SkyPilot: Run AI and batch jobs on any infra (Kubernetes or 12+ clouds). Get unified execution, cost savings, and high GPU availability via a simple interface.
https://skypilot.readthedocs.io
Apache License 2.0
6.63k stars 486 forks source link

[Feature Request] Ordered and Any_of should also work for only partial settings #3106

Open manzke opened 8 months ago

manzke commented 8 months ago

Right now we have to duplicate all keys to make it working with any_of or ordered.

Example:

ordered: 
    - region: eu-central-1
      accelerators: A10G:1
      memory: 24+
    - region: eu-central-1
      accelerators: T4:4
      memory: 24+
    - region: eu-west-1
      accelerators: A10G:1
      memory: 24+
    - region: eu-west-2
      accelerators: A10G:1
      memory: 24+
    - region: eu-west-3
      accelerators: A10G:1
      memory: 24+
    - region: eu-north-1
      accelerators: A10G:1
      memory: 24+
    - region: eu-west-1
      accelerators: T4:4
      memory: 24+
    - region: eu-west-2
      accelerators: T4:4
      memory: 24+
    - region: eu-west-3
      accelerators: T4:4
      memory: 24+
    - region: eu-north-1
      accelerators: T4:4
      memory: 24+

What would be amazing if this would work too:

accelerators: [A10G:1, T4:4]
memory: 24+
ordered: 
    - region: eu-central-1
    - region: eu-west-1
    - region: eu-west-2
    - region: eu-west-3
    - region: eu-north-1
concretevitamin commented 8 months ago

Cc @MaoZiming. It seems like it's unambiguous to support

while we cannot support ordered x ordered in general.

MaoZiming commented 8 months ago

Hi, @manzke thanks for the question! Currently we do not support ordering along multiple fields (e.g. accelerators and regions), as it is unclear how to compare ordering across fields. For example, ordering A10G:1 and eu-north-1 with T4:4 and eu-central-1, where A10G:1 is ordered before T4:4 but eu-north-1 is ordered after eu-central-1. We are still figuring out the interface. Let us know if you have any suggestions!

Michaelvll commented 8 months ago

Some related threads for discussing this: https://skypilot-org.slack.com/archives/C03J2KQQZSS/p1707256485824089?thread_ts=1707249665.970099&cid=C03J2KQQZSS

github-actions[bot] commented 14 hours ago

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 10 days.