YAML 配置#
可以在SkyPilot YAML界面中配置用于基准测试的资源。 下面我们提供一个示例:
# Only shows `resources` as other fields do not change.
resources:
cloud: gcp # Works as a default value for `cloud`.
# Added only for SkyPilot Benchmark.
candidates:
- {accelerators: A100}
- {accelerators: V100, instance_type: n1-highmem-16}
- {accelerators: T4, cloud: aws} # Overrides `cloud` to `aws`.
对于SkyPilot基准测试,candidates 是新添加到 resources 字段下的。
candidates 是配置要基准测试的资源的字典列表。
resources 的任何子字段(accelerators、instance_type 等)都可以在字典中重新定义。
在 candidates 之外定义的子字段(例如本例中的 cloud)用作默认值,并被字典中定义的子字段覆盖。
因此,上述示例可以解释如下:
# Configuration of the first candidate.
resources:
cloud: gcp
accelerators: A100
# Configuration of the second candidate.
resources:
cloud: gcp
accelerators: V100
instance_type: n1-highmem-16
# Configuration of the third candidate.
resources:
cloud: aws
accelerators: T4
注意
目前,SkyPilot Benchmark 不支持本地作业和托管点作业。
虽然你可以设置 use_spot: True 来基准测试点虚拟机,但在发生抢占时不会提供自动恢复。