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.81k stars 513 forks source link

Add hourly price and instance type to env SKYPILOT_CLUSTER_INFO #4326

Open tylerweitzman opened 1 week ago

tylerweitzman commented 1 week ago

Adds the following KV to the SKYPILOT_CLUSTER_INFO json dump

{...
'hourly_price': handle.get_hourly_price(),
'instance_type': handle.launched_resources.instance_type,
}

Ran an existing workflow with it to see the values successfully added

{"cluster_name": "sky-e72c-ubuntu", "cloud": "GCP", "region": "us-central1", "zone": "us-central1-a", "hourly_price": 0.26203, "instance_type": "n2-highmem-4"}