skypilot-nightly 1.0.0.dev20250916__py3-none-any.whl → 1.0.0.dev20250919__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of skypilot-nightly might be problematic. Click here for more details.
- sky/__init__.py +4 -2
- sky/adaptors/primeintellect.py +1 -0
- sky/adaptors/seeweb.py +68 -4
- sky/authentication.py +25 -0
- sky/backends/__init__.py +3 -2
- sky/backends/backend_utils.py +16 -12
- sky/backends/cloud_vm_ray_backend.py +57 -0
- sky/catalog/primeintellect_catalog.py +95 -0
- sky/clouds/__init__.py +2 -0
- sky/clouds/primeintellect.py +314 -0
- sky/core.py +77 -48
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/{y8s7LlyyfhMzpzCkxuD2r → VvaUqYDvHOcHZRnvMBmax}/_buildManifest.js +1 -1
- sky/dashboard/out/_next/static/chunks/1121-4ff1ec0dbc5792ab.js +1 -0
- sky/dashboard/out/_next/static/chunks/3015-88c7c8d69b0b6dba.js +1 -0
- sky/dashboard/out/_next/static/chunks/{6856-e0754534b3015377.js → 6856-9a2538f38c004652.js} +1 -1
- sky/dashboard/out/_next/static/chunks/8969-a39efbadcd9fde80.js +1 -0
- sky/dashboard/out/_next/static/chunks/9037-472ee1222cb1e158.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-1e9248ddbddcd122.js +16 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/{[cluster]-0b4b35dc1dfe046c.js → [cluster]-9525660179df3605.js} +1 -1
- sky/dashboard/out/_next/static/chunks/{webpack-05f82d90d6fd7f82.js → webpack-b2a3938c22b6647b.js} +1 -1
- sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
- sky/dashboard/out/clusters/[cluster].html +1 -1
- sky/dashboard/out/clusters.html +1 -1
- sky/dashboard/out/config.html +1 -1
- sky/dashboard/out/index.html +1 -1
- sky/dashboard/out/infra/[context].html +1 -1
- sky/dashboard/out/infra.html +1 -1
- sky/dashboard/out/jobs/[job].html +1 -1
- sky/dashboard/out/jobs/pools/[pool].html +1 -1
- sky/dashboard/out/jobs.html +1 -1
- sky/dashboard/out/users.html +1 -1
- sky/dashboard/out/volumes.html +1 -1
- sky/dashboard/out/workspace/new.html +1 -1
- sky/dashboard/out/workspaces/[name].html +1 -1
- sky/dashboard/out/workspaces.html +1 -1
- sky/global_user_state.py +99 -62
- sky/jobs/server/server.py +14 -1
- sky/jobs/state.py +26 -1
- sky/metrics/utils.py +174 -8
- sky/provision/__init__.py +1 -0
- sky/provision/docker_utils.py +6 -2
- sky/provision/primeintellect/__init__.py +10 -0
- sky/provision/primeintellect/config.py +11 -0
- sky/provision/primeintellect/instance.py +454 -0
- sky/provision/primeintellect/utils.py +398 -0
- sky/resources.py +9 -1
- sky/schemas/generated/jobsv1_pb2.py +40 -40
- sky/schemas/generated/servev1_pb2.py +58 -0
- sky/schemas/generated/servev1_pb2.pyi +115 -0
- sky/schemas/generated/servev1_pb2_grpc.py +322 -0
- sky/serve/serve_rpc_utils.py +179 -0
- sky/serve/serve_utils.py +29 -12
- sky/serve/server/core.py +37 -19
- sky/serve/server/impl.py +221 -129
- sky/server/metrics.py +52 -158
- sky/server/requests/executor.py +12 -8
- sky/server/requests/payloads.py +6 -0
- sky/server/requests/requests.py +1 -1
- sky/server/requests/serializers/encoders.py +3 -2
- sky/server/server.py +5 -41
- sky/setup_files/dependencies.py +1 -0
- sky/skylet/constants.py +10 -5
- sky/skylet/job_lib.py +14 -15
- sky/skylet/services.py +98 -0
- sky/skylet/skylet.py +3 -1
- sky/templates/kubernetes-ray.yml.j2 +22 -12
- sky/templates/primeintellect-ray.yml.j2 +71 -0
- sky/utils/locks.py +41 -10
- {skypilot_nightly-1.0.0.dev20250916.dist-info → skypilot_nightly-1.0.0.dev20250919.dist-info}/METADATA +36 -35
- {skypilot_nightly-1.0.0.dev20250916.dist-info → skypilot_nightly-1.0.0.dev20250919.dist-info}/RECORD +76 -64
- sky/dashboard/out/_next/static/chunks/1121-408ed10b2f9fce17.js +0 -1
- sky/dashboard/out/_next/static/chunks/3015-2ea98b57e318bd6e.js +0 -1
- sky/dashboard/out/_next/static/chunks/8969-0487dfbf149d9e53.js +0 -1
- sky/dashboard/out/_next/static/chunks/9037-f9800e64eb05dd1c.js +0 -6
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-1cbba24bd1bd35f8.js +0 -16
- /sky/dashboard/out/_next/static/{y8s7LlyyfhMzpzCkxuD2r → VvaUqYDvHOcHZRnvMBmax}/_ssgManifest.js +0 -0
- {skypilot_nightly-1.0.0.dev20250916.dist-info → skypilot_nightly-1.0.0.dev20250919.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250916.dist-info → skypilot_nightly-1.0.0.dev20250919.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250916.dist-info → skypilot_nightly-1.0.0.dev20250919.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250916.dist-info → skypilot_nightly-1.0.0.dev20250919.dist-info}/top_level.txt +0 -0
sky/dashboard/out/clusters.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/clusters-469814d711d63b1b.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/clusters","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
sky/dashboard/out/config.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/config-dfb9bf07b13045f4.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/config","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
sky/dashboard/out/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/index-444f1804401f04ea.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/infra/%5Bcontext%5D-6563820e094f68ca.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/infra/[context]","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
sky/dashboard/out/infra.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/infra-aabba60d57826e0f.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/infra","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/616-3d59f75e2ccf9321.js" defer=""></script><script src="/dashboard/_next/static/chunks/6130-2be46d70a38f1e82.js" defer=""></script><script src="/dashboard/_next/static/chunks/5739-d67458fcb1386c92.js" defer=""></script><script src="/dashboard/_next/static/chunks/7411-b15471acd2cba716.js" defer=""></script><script src="/dashboard/_next/static/chunks/1272-1ef0bf0237faccdb.js" defer=""></script><script src="/dashboard/_next/static/chunks/754-d0da8ab45f9509e9.js" defer=""></script><script src="/dashboard/_next/static/chunks/6989-01359c57e018caa4.js" defer=""></script><script src="/dashboard/_next/static/chunks/3850-ff4a9a69d978632b.js" defer=""></script><script src="/dashboard/_next/static/chunks/8969-a39efbadcd9fde80.js" defer=""></script><script src="/dashboard/_next/static/chunks/6135-4b4d5e824b7f9d3c.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/jobs/%5Bjob%5D-dd64309c3fe67ed2.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/jobs/[job]","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/616-3d59f75e2ccf9321.js" defer=""></script><script src="/dashboard/_next/static/chunks/6130-2be46d70a38f1e82.js" defer=""></script><script src="/dashboard/_next/static/chunks/5739-d67458fcb1386c92.js" defer=""></script><script src="/dashboard/_next/static/chunks/1272-1ef0bf0237faccdb.js" defer=""></script><script src="/dashboard/_next/static/chunks/754-d0da8ab45f9509e9.js" defer=""></script><script src="/dashboard/_next/static/chunks/6989-01359c57e018caa4.js" defer=""></script><script src="/dashboard/_next/static/chunks/3850-ff4a9a69d978632b.js" defer=""></script><script src="/dashboard/_next/static/chunks/8969-a39efbadcd9fde80.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/jobs/pools/%5Bpool%5D-07349868f7905d37.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/jobs/pools/[pool]","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
sky/dashboard/out/jobs.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/jobs-1f70d9faa564804f.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/jobs","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
sky/dashboard/out/users.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/users-018bf31cda52e11b.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/users","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
sky/dashboard/out/volumes.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/volumes-739726d6b823f532.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/volumes","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/workspace/new-3f88a1c7e86a3f86.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/workspace/new","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/616-3d59f75e2ccf9321.js" defer=""></script><script src="/dashboard/_next/static/chunks/6130-2be46d70a38f1e82.js" defer=""></script><script src="/dashboard/_next/static/chunks/5739-d67458fcb1386c92.js" defer=""></script><script src="/dashboard/_next/static/chunks/7411-b15471acd2cba716.js" defer=""></script><script src="/dashboard/_next/static/chunks/1272-1ef0bf0237faccdb.js" defer=""></script><script src="/dashboard/_next/static/chunks/1836-37fede578e2da5f8.js" defer=""></script><script src="/dashboard/_next/static/chunks/6989-01359c57e018caa4.js" defer=""></script><script src="/dashboard/_next/static/chunks/3850-ff4a9a69d978632b.js" defer=""></script><script src="/dashboard/_next/static/chunks/8969-a39efbadcd9fde80.js" defer=""></script><script src="/dashboard/_next/static/chunks/6990-f6818c84ed8f1c86.js" defer=""></script><script src="/dashboard/_next/static/chunks/6135-4b4d5e824b7f9d3c.js" defer=""></script><script src="/dashboard/_next/static/chunks/1121-4ff1ec0dbc5792ab.js" defer=""></script><script src="/dashboard/_next/static/chunks/6601-06114c982db410b6.js" defer=""></script><script src="/dashboard/_next/static/chunks/3015-88c7c8d69b0b6dba.js" defer=""></script><script src="/dashboard/_next/static/chunks/1141-159df2d4c441a9d1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/workspaces/%5Bname%5D-af76bb06dbb3954f.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/workspaces/[name]","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/4614e06482d7309e.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/4614e06482d7309e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-b2a3938c22b6647b.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-cf60a09ccd051a10.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-f15ccb73239a3bf1.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-ce361c6959bc2001.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/workspaces-7528cc0ef8c522c5.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/VvaUqYDvHOcHZRnvMBmax/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/workspaces","query":{},"buildId":"VvaUqYDvHOcHZRnvMBmax","assetPrefix":"/dashboard","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
sky/global_user_state.py
CHANGED
|
@@ -29,7 +29,7 @@ from sqlalchemy.ext import declarative
|
|
|
29
29
|
from sky import models
|
|
30
30
|
from sky import sky_logging
|
|
31
31
|
from sky import skypilot_config
|
|
32
|
-
from sky.
|
|
32
|
+
from sky.metrics import utils as metrics_lib
|
|
33
33
|
from sky.skylet import constants
|
|
34
34
|
from sky.utils import common_utils
|
|
35
35
|
from sky.utils import context_utils
|
|
@@ -516,7 +516,7 @@ def add_or_update_cluster(cluster_name: str,
|
|
|
516
516
|
task_config: Optional[Dict[str, Any]] = None,
|
|
517
517
|
is_managed: bool = False,
|
|
518
518
|
provision_log_path: Optional[str] = None,
|
|
519
|
-
|
|
519
|
+
existing_cluster_hash: Optional[str] = None):
|
|
520
520
|
"""Adds or updates cluster_name -> cluster_handle mapping.
|
|
521
521
|
|
|
522
522
|
Args:
|
|
@@ -532,10 +532,12 @@ def add_or_update_cluster(cluster_name: str,
|
|
|
532
532
|
is_managed: Whether the cluster is launched by the
|
|
533
533
|
controller.
|
|
534
534
|
provision_log_path: Absolute path to provision.log, if available.
|
|
535
|
-
|
|
536
|
-
|
|
535
|
+
existing_cluster_hash: If specified, the cluster will be updated
|
|
536
|
+
only if the cluster_hash matches. If a cluster does not exist,
|
|
537
|
+
it will not be inserted and an error will be raised.
|
|
537
538
|
"""
|
|
538
539
|
assert _SQLALCHEMY_ENGINE is not None
|
|
540
|
+
|
|
539
541
|
# FIXME: launched_at will be changed when `sky launch -c` is called.
|
|
540
542
|
handle = pickle.dumps(cluster_handle)
|
|
541
543
|
cluster_launched_at = int(time.time()) if is_launch else None
|
|
@@ -631,17 +633,17 @@ def add_or_update_cluster(cluster_name: str,
|
|
|
631
633
|
session.rollback()
|
|
632
634
|
raise ValueError('Unsupported database dialect')
|
|
633
635
|
|
|
634
|
-
if
|
|
636
|
+
if existing_cluster_hash is not None:
|
|
635
637
|
count = session.query(cluster_table).filter_by(
|
|
636
|
-
name=cluster_name).update({
|
|
638
|
+
name=cluster_name, cluster_hash=existing_cluster_hash).update({
|
|
637
639
|
**conditional_values, cluster_table.c.handle: handle,
|
|
638
640
|
cluster_table.c.status: status.value,
|
|
639
|
-
cluster_table.c.cluster_hash: cluster_hash,
|
|
640
641
|
cluster_table.c.status_updated_at: status_updated_at
|
|
641
642
|
})
|
|
642
643
|
assert count <= 1
|
|
643
644
|
if count == 0:
|
|
644
|
-
raise ValueError(f'Cluster {cluster_name}
|
|
645
|
+
raise ValueError(f'Cluster {cluster_name} with hash '
|
|
646
|
+
f'{existing_cluster_hash} not found.')
|
|
645
647
|
else:
|
|
646
648
|
insert_stmnt = insert_func(cluster_table).values(
|
|
647
649
|
name=cluster_name,
|
|
@@ -1235,16 +1237,17 @@ def _get_cluster_usage_intervals(
|
|
|
1235
1237
|
return pickle.loads(row.usage_intervals)
|
|
1236
1238
|
|
|
1237
1239
|
|
|
1238
|
-
def _get_cluster_launch_time(
|
|
1239
|
-
usage_intervals
|
|
1240
|
+
def _get_cluster_launch_time(
|
|
1241
|
+
usage_intervals: Optional[List[Tuple[int,
|
|
1242
|
+
Optional[int]]]]) -> Optional[int]:
|
|
1240
1243
|
if usage_intervals is None:
|
|
1241
1244
|
return None
|
|
1242
1245
|
return usage_intervals[0][0]
|
|
1243
1246
|
|
|
1244
1247
|
|
|
1245
|
-
def _get_cluster_duration(
|
|
1248
|
+
def _get_cluster_duration(
|
|
1249
|
+
usage_intervals: Optional[List[Tuple[int, Optional[int]]]]) -> int:
|
|
1246
1250
|
total_duration = 0
|
|
1247
|
-
usage_intervals = _get_cluster_usage_intervals(cluster_hash)
|
|
1248
1251
|
|
|
1249
1252
|
if usage_intervals is None:
|
|
1250
1253
|
return total_duration
|
|
@@ -1498,7 +1501,9 @@ def get_clusters(
|
|
|
1498
1501
|
@_init_db
|
|
1499
1502
|
@metrics_lib.time_me
|
|
1500
1503
|
def get_clusters_from_history(
|
|
1501
|
-
days: Optional[int] = None
|
|
1504
|
+
days: Optional[int] = None,
|
|
1505
|
+
abbreviate_response: bool = False,
|
|
1506
|
+
cluster_hashes: Optional[List[str]] = None) -> List[Dict[str, Any]]:
|
|
1502
1507
|
"""Get cluster reports from history.
|
|
1503
1508
|
|
|
1504
1509
|
Args:
|
|
@@ -1511,62 +1516,73 @@ def get_clusters_from_history(
|
|
|
1511
1516
|
List of cluster records with history information.
|
|
1512
1517
|
"""
|
|
1513
1518
|
assert _SQLALCHEMY_ENGINE is not None
|
|
1514
|
-
with orm.Session(_SQLALCHEMY_ENGINE) as session:
|
|
1515
|
-
# Explicitly select columns from both tables to avoid ambiguity
|
|
1516
|
-
query = session.query(
|
|
1517
|
-
cluster_history_table.c.cluster_hash, cluster_history_table.c.name,
|
|
1518
|
-
cluster_history_table.c.num_nodes,
|
|
1519
|
-
cluster_history_table.c.requested_resources,
|
|
1520
|
-
cluster_history_table.c.launched_resources,
|
|
1521
|
-
cluster_history_table.c.usage_intervals,
|
|
1522
|
-
cluster_history_table.c.user_hash,
|
|
1523
|
-
cluster_history_table.c.last_creation_yaml,
|
|
1524
|
-
cluster_history_table.c.last_creation_command,
|
|
1525
|
-
cluster_history_table.c.workspace.label('history_workspace'),
|
|
1526
|
-
cluster_table.c.status, cluster_table.c.workspace,
|
|
1527
|
-
cluster_table.c.status_updated_at).select_from(
|
|
1528
|
-
cluster_history_table.join(cluster_table,
|
|
1529
|
-
cluster_history_table.c.cluster_hash
|
|
1530
|
-
== cluster_table.c.cluster_hash,
|
|
1531
|
-
isouter=True))
|
|
1532
1519
|
|
|
1533
|
-
|
|
1520
|
+
current_user_hash = common_utils.get_user_hash()
|
|
1534
1521
|
|
|
1535
1522
|
# Prepare filtering parameters
|
|
1536
1523
|
cutoff_time = None
|
|
1537
1524
|
if days is not None:
|
|
1538
1525
|
cutoff_time = int(time.time()) - (days * 24 * 60 * 60)
|
|
1539
1526
|
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1527
|
+
with orm.Session(_SQLALCHEMY_ENGINE) as session:
|
|
1528
|
+
# Explicitly select columns from both tables to avoid ambiguity
|
|
1529
|
+
if abbreviate_response:
|
|
1530
|
+
query = session.query(
|
|
1531
|
+
cluster_history_table.c.cluster_hash,
|
|
1532
|
+
cluster_history_table.c.name, cluster_history_table.c.num_nodes,
|
|
1533
|
+
cluster_history_table.c.launched_resources,
|
|
1534
|
+
cluster_history_table.c.usage_intervals,
|
|
1535
|
+
cluster_history_table.c.user_hash,
|
|
1536
|
+
cluster_history_table.c.workspace.label('history_workspace'),
|
|
1537
|
+
cluster_table.c.status, cluster_table.c.workspace)
|
|
1538
|
+
else:
|
|
1539
|
+
query = session.query(
|
|
1540
|
+
cluster_history_table.c.cluster_hash,
|
|
1541
|
+
cluster_history_table.c.name, cluster_history_table.c.num_nodes,
|
|
1542
|
+
cluster_history_table.c.launched_resources,
|
|
1543
|
+
cluster_history_table.c.usage_intervals,
|
|
1544
|
+
cluster_history_table.c.user_hash,
|
|
1545
|
+
cluster_history_table.c.last_creation_yaml,
|
|
1546
|
+
cluster_history_table.c.last_creation_command,
|
|
1547
|
+
cluster_history_table.c.workspace.label('history_workspace'),
|
|
1548
|
+
cluster_table.c.status, cluster_table.c.workspace)
|
|
1549
|
+
|
|
1550
|
+
query = query.select_from(
|
|
1551
|
+
cluster_history_table.join(cluster_table,
|
|
1552
|
+
cluster_history_table.c.cluster_hash ==
|
|
1553
|
+
cluster_table.c.cluster_hash,
|
|
1554
|
+
isouter=True))
|
|
1555
|
+
if cluster_hashes is not None:
|
|
1556
|
+
query = query.filter(
|
|
1557
|
+
cluster_history_table.c.cluster_hash.in_(cluster_hashes))
|
|
1558
|
+
rows = query.all()
|
|
1545
1559
|
|
|
1560
|
+
filtered_rows = []
|
|
1561
|
+
usage_intervals_dict = {}
|
|
1562
|
+
row_to_user_hash = {}
|
|
1563
|
+
for row in rows:
|
|
1564
|
+
row_usage_intervals: List[Tuple[int, Optional[int]]] = []
|
|
1565
|
+
if row.usage_intervals:
|
|
1566
|
+
try:
|
|
1567
|
+
row_usage_intervals = pickle.loads(row.usage_intervals)
|
|
1568
|
+
except (pickle.PickleError, AttributeError):
|
|
1569
|
+
pass
|
|
1546
1570
|
# Parse status
|
|
1547
1571
|
status = None
|
|
1548
1572
|
if row.status:
|
|
1549
1573
|
status = status_lib.ClusterStatus[row.status]
|
|
1550
|
-
|
|
1551
1574
|
# Apply filtering: always include active clusters, filter historical
|
|
1552
1575
|
# ones by time
|
|
1553
1576
|
if cutoff_time is not None and status is None: # Historical cluster
|
|
1554
1577
|
# For historical clusters, check if they were used recently
|
|
1555
1578
|
# Use the most recent activity from usage_intervals to determine
|
|
1556
1579
|
# last use
|
|
1557
|
-
usage_intervals = []
|
|
1558
|
-
if row.usage_intervals:
|
|
1559
|
-
try:
|
|
1560
|
-
usage_intervals = pickle.loads(row.usage_intervals)
|
|
1561
|
-
except (pickle.PickleError, AttributeError):
|
|
1562
|
-
usage_intervals = []
|
|
1563
|
-
|
|
1564
1580
|
# Find the most recent activity time from usage_intervals
|
|
1565
1581
|
last_activity_time = None
|
|
1566
|
-
if
|
|
1582
|
+
if row_usage_intervals:
|
|
1567
1583
|
# Get the end time of the last interval (or start time if
|
|
1568
1584
|
# still running)
|
|
1569
|
-
last_interval =
|
|
1585
|
+
last_interval = row_usage_intervals[-1]
|
|
1570
1586
|
last_activity_time = (last_interval[1] if last_interval[1]
|
|
1571
1587
|
is not None else last_interval[0])
|
|
1572
1588
|
|
|
@@ -1574,6 +1590,38 @@ def get_clusters_from_history(
|
|
|
1574
1590
|
if last_activity_time is None or last_activity_time < cutoff_time:
|
|
1575
1591
|
continue
|
|
1576
1592
|
|
|
1593
|
+
filtered_rows.append(row)
|
|
1594
|
+
usage_intervals_dict[row.cluster_hash] = row_usage_intervals
|
|
1595
|
+
user_hash = (row.user_hash
|
|
1596
|
+
if row.user_hash is not None else current_user_hash)
|
|
1597
|
+
row_to_user_hash[row.cluster_hash] = user_hash
|
|
1598
|
+
|
|
1599
|
+
rows = filtered_rows
|
|
1600
|
+
user_hashes = set(row_to_user_hash.values())
|
|
1601
|
+
user_hash_to_user = _get_users(user_hashes)
|
|
1602
|
+
cluster_hashes = set(row_to_user_hash.keys())
|
|
1603
|
+
if not abbreviate_response:
|
|
1604
|
+
last_cluster_event_dict = _get_last_cluster_event_multiple(
|
|
1605
|
+
cluster_hashes, ClusterEventType.STATUS_CHANGE)
|
|
1606
|
+
|
|
1607
|
+
records = []
|
|
1608
|
+
for row in rows:
|
|
1609
|
+
user_hash = row_to_user_hash[row.cluster_hash]
|
|
1610
|
+
user = user_hash_to_user.get(user_hash, None)
|
|
1611
|
+
user_name = user.name if user is not None else None
|
|
1612
|
+
if not abbreviate_response:
|
|
1613
|
+
last_event = last_cluster_event_dict.get(row.cluster_hash, None)
|
|
1614
|
+
usage_intervals: Optional[List[Tuple[
|
|
1615
|
+
int,
|
|
1616
|
+
Optional[int]]]] = usage_intervals_dict.get(row.cluster_hash, None)
|
|
1617
|
+
launched_at = _get_cluster_launch_time(usage_intervals)
|
|
1618
|
+
duration = _get_cluster_duration(usage_intervals)
|
|
1619
|
+
|
|
1620
|
+
# Parse status
|
|
1621
|
+
status = None
|
|
1622
|
+
if row.status:
|
|
1623
|
+
status = status_lib.ClusterStatus[row.status]
|
|
1624
|
+
|
|
1577
1625
|
# Parse launched resources safely
|
|
1578
1626
|
launched_resources = None
|
|
1579
1627
|
if row.launched_resources:
|
|
@@ -1582,17 +1630,6 @@ def get_clusters_from_history(
|
|
|
1582
1630
|
except (pickle.PickleError, AttributeError):
|
|
1583
1631
|
launched_resources = None
|
|
1584
1632
|
|
|
1585
|
-
# Parse usage intervals safely
|
|
1586
|
-
usage_intervals = []
|
|
1587
|
-
if row.usage_intervals:
|
|
1588
|
-
try:
|
|
1589
|
-
usage_intervals = pickle.loads(row.usage_intervals)
|
|
1590
|
-
except (pickle.PickleError, AttributeError):
|
|
1591
|
-
usage_intervals = []
|
|
1592
|
-
|
|
1593
|
-
# Get user name from user hash
|
|
1594
|
-
user = get_user(user_hash)
|
|
1595
|
-
user_name = user.name if user is not None else None
|
|
1596
1633
|
workspace = (row.history_workspace
|
|
1597
1634
|
if row.history_workspace else row.workspace)
|
|
1598
1635
|
|
|
@@ -1608,11 +1645,11 @@ def get_clusters_from_history(
|
|
|
1608
1645
|
'user_hash': user_hash,
|
|
1609
1646
|
'user_name': user_name,
|
|
1610
1647
|
'workspace': workspace,
|
|
1611
|
-
'last_creation_yaml': row.last_creation_yaml,
|
|
1612
|
-
'last_creation_command': row.last_creation_command,
|
|
1613
|
-
'last_event': get_last_cluster_event(
|
|
1614
|
-
row.cluster_hash, event_type=ClusterEventType.STATUS_CHANGE),
|
|
1615
1648
|
}
|
|
1649
|
+
if not abbreviate_response:
|
|
1650
|
+
record['last_creation_yaml'] = row.last_creation_yaml
|
|
1651
|
+
record['last_creation_command'] = row.last_creation_command
|
|
1652
|
+
record['last_event'] = last_event
|
|
1616
1653
|
|
|
1617
1654
|
records.append(record)
|
|
1618
1655
|
|
sky/jobs/server/server.py
CHANGED
|
@@ -5,6 +5,7 @@ import pathlib
|
|
|
5
5
|
import fastapi
|
|
6
6
|
|
|
7
7
|
from sky import sky_logging
|
|
8
|
+
from sky.jobs import utils as managed_jobs_utils
|
|
8
9
|
from sky.jobs.server import core
|
|
9
10
|
from sky.server import common as server_common
|
|
10
11
|
from sky.server import stream_utils
|
|
@@ -22,12 +23,24 @@ router = fastapi.APIRouter()
|
|
|
22
23
|
@router.post('/launch')
|
|
23
24
|
async def launch(request: fastapi.Request,
|
|
24
25
|
jobs_launch_body: payloads.JobsLaunchBody) -> None:
|
|
26
|
+
# In consolidation mode, the jobs controller will use sky.launch on the same
|
|
27
|
+
# API server to launch the underlying job cluster. If you start run many
|
|
28
|
+
# jobs.launch requests, some may be blocked for a long time by sky.launch
|
|
29
|
+
# requests triggered by earlier jobs, which leads to confusing behavior as
|
|
30
|
+
# the jobs.launch requests trickle though. Also, since we don't have to
|
|
31
|
+
# actually launch a jobs controller sky cluster, the jobs.launch request is
|
|
32
|
+
# much quicker in consolidation mode. So we avoid the issue by just using
|
|
33
|
+
# the short executor instead - then jobs.launch will not be blocked by
|
|
34
|
+
# sky.launch.
|
|
35
|
+
consolidation_mode = managed_jobs_utils.is_consolidation_mode()
|
|
36
|
+
schedule_type = (api_requests.ScheduleType.SHORT
|
|
37
|
+
if consolidation_mode else api_requests.ScheduleType.LONG)
|
|
25
38
|
executor.schedule_request(
|
|
26
39
|
request_id=request.state.request_id,
|
|
27
40
|
request_name='jobs.launch',
|
|
28
41
|
request_body=jobs_launch_body,
|
|
29
42
|
func=core.launch,
|
|
30
|
-
schedule_type=
|
|
43
|
+
schedule_type=schedule_type,
|
|
31
44
|
request_cluster_name=common.JOB_CONTROLLER_NAME,
|
|
32
45
|
)
|
|
33
46
|
|
sky/jobs/state.py
CHANGED
|
@@ -613,7 +613,7 @@ async def set_backoff_pending_async(job_id: int, task_id: int):
|
|
|
613
613
|
"""
|
|
614
614
|
assert _SQLALCHEMY_ENGINE_ASYNC is not None
|
|
615
615
|
async with sql_async.AsyncSession(_SQLALCHEMY_ENGINE_ASYNC) as session:
|
|
616
|
-
|
|
616
|
+
result = await session.execute(
|
|
617
617
|
sqlalchemy.update(spot_table).where(
|
|
618
618
|
sqlalchemy.and_(
|
|
619
619
|
spot_table.c.spot_job_id == job_id,
|
|
@@ -625,6 +625,7 @@ async def set_backoff_pending_async(job_id: int, task_id: int):
|
|
|
625
625
|
spot_table.c.end_at.is_(None),
|
|
626
626
|
)).values({spot_table.c.status: ManagedJobStatus.PENDING.value})
|
|
627
627
|
)
|
|
628
|
+
count = result.rowcount
|
|
628
629
|
await session.commit()
|
|
629
630
|
if count != 1:
|
|
630
631
|
raise exceptions.ManagedJobStatusError(
|
|
@@ -712,7 +713,19 @@ def set_failed(
|
|
|
712
713
|
where_conditions = [spot_table.c.spot_job_id == job_id]
|
|
713
714
|
if task_id is not None:
|
|
714
715
|
where_conditions.append(spot_table.c.task_id == task_id)
|
|
716
|
+
|
|
717
|
+
# Handle failure_reason prepending when override_terminal is True
|
|
715
718
|
if override_terminal:
|
|
719
|
+
# Get existing failure_reason with row lock to prevent race
|
|
720
|
+
# conditions
|
|
721
|
+
existing_reason_result = session.execute(
|
|
722
|
+
sqlalchemy.select(spot_table.c.failure_reason).where(
|
|
723
|
+
sqlalchemy.and_(*where_conditions)).with_for_update())
|
|
724
|
+
existing_reason_row = existing_reason_result.fetchone()
|
|
725
|
+
if existing_reason_row and existing_reason_row[0]:
|
|
726
|
+
# Prepend new failure reason to existing one
|
|
727
|
+
fields_to_set[spot_table.c.failure_reason] = (
|
|
728
|
+
failure_reason + '. Previously: ' + existing_reason_row[0])
|
|
716
729
|
# Use COALESCE for end_at to avoid overriding the existing end_at if
|
|
717
730
|
# it's already set.
|
|
718
731
|
fields_to_set[spot_table.c.end_at] = sqlalchemy.func.coalesce(
|
|
@@ -1651,7 +1664,19 @@ async def set_failed_async(
|
|
|
1651
1664
|
where_conditions = [spot_table.c.spot_job_id == job_id]
|
|
1652
1665
|
if task_id is not None:
|
|
1653
1666
|
where_conditions.append(spot_table.c.task_id == task_id)
|
|
1667
|
+
|
|
1668
|
+
# Handle failure_reason prepending when override_terminal is True
|
|
1654
1669
|
if override_terminal:
|
|
1670
|
+
# Get existing failure_reason with row lock to prevent race
|
|
1671
|
+
# conditions
|
|
1672
|
+
existing_reason_result = await session.execute(
|
|
1673
|
+
sqlalchemy.select(spot_table.c.failure_reason).where(
|
|
1674
|
+
sqlalchemy.and_(*where_conditions)).with_for_update())
|
|
1675
|
+
existing_reason_row = existing_reason_result.fetchone()
|
|
1676
|
+
if existing_reason_row and existing_reason_row[0]:
|
|
1677
|
+
# Prepend new failure reason to existing one
|
|
1678
|
+
fields_to_set[spot_table.c.failure_reason] = (
|
|
1679
|
+
failure_reason + '. Previously: ' + existing_reason_row[0])
|
|
1655
1680
|
fields_to_set[spot_table.c.end_at] = sqlalchemy.func.coalesce(
|
|
1656
1681
|
spot_table.c.end_at, end_time)
|
|
1657
1682
|
else:
|