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.
Add a lru_cache for AWS.get_user_identities. We already use an lru_cache for Azure, do the same here. With SSO enabled (and maybe without?) this takes about a second.
Can save ~2s per invocation. (sky jobs launch calls this function three times.)
Skip optimization for sky jobs launch --yes. The only reason we call optimize for jobs_launch is to give a preview of the resources we expect to use, and give the user an opportunity to back out if it's not what they expect. If you use --yes or -y, you don't have a chance to back out and you're probably running from a script, where you don't care.
Add a lru_cache for AWS.get_user_identities. We already use an lru_cache for Azure, do the same here. With SSO enabled (and maybe without?) this takes about a second.
sky jobs launch
calls this function three times.)Skip optimization for
sky jobs launch --yes
. The only reason we call optimize for jobs_launch is to give a preview of the resources we expect to use, and give the user an opportunity to back out if it's not what they expect. If you use --yes or -y, you don't have a chance to back out and you're probably running from a script, where you don't care.Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py --managed-jobs
conda deactivate; bash -i tests/backward_compatibility_tests.sh