skypilot-nightly 1.0.0.dev20250611__py3-none-any.whl → 1.0.0.dev20250612__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.
- sky/__init__.py +2 -2
- sky/check.py +41 -2
- sky/clouds/kubernetes.py +1 -1
- sky/dashboard/out/404.html +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.html +1 -1
- sky/dashboard/out/users.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 +38 -0
- sky/jobs/server/core.py +1 -68
- sky/templates/jobs-controller.yaml.j2 +0 -23
- sky/utils/controller_utils.py +10 -0
- {skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/METADATA +1 -1
- {skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/RECORD +29 -33
- sky/jobs/dashboard/dashboard.py +0 -223
- sky/jobs/dashboard/static/favicon.ico +0 -0
- sky/jobs/dashboard/templates/index.html +0 -831
- sky/jobs/server/dashboard_utils.py +0 -69
- /sky/dashboard/out/_next/static/{zJqasksBQ3HcqMpA2wTUZ → G3DXdMFu2Jzd-Dody9iq1}/_buildManifest.js +0 -0
- /sky/dashboard/out/_next/static/{zJqasksBQ3HcqMpA2wTUZ → G3DXdMFu2Jzd-Dody9iq1}/_ssgManifest.js +0 -0
- {skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/top_level.txt +0 -0
{skypilot_nightly-1.0.0.dev20250611.dist-info → skypilot_nightly-1.0.0.dev20250612.dist-info}/RECORD
RENAMED
@@ -1,14 +1,14 @@
|
|
1
|
-
sky/__init__.py,sha256=
|
1
|
+
sky/__init__.py,sha256=ss-7CkUkOp1OzvaxGhEv8rCdJsDT4KGqPTcMbkT1aYo,6413
|
2
2
|
sky/admin_policy.py,sha256=ICP2Q3O93uVgUWc3sSvQDnRXgvFCA6APRX33hU3P3OI,8502
|
3
3
|
sky/authentication.py,sha256=znccODHpqQV_wo4Y5zAEA9I43gdMRyj_bKiO1feZBgc,24799
|
4
|
-
sky/check.py,sha256=
|
4
|
+
sky/check.py,sha256=UurgFjOL_s3Gfx2nHPff6fpYcrIziZj6UQGy84oTeB8,30191
|
5
5
|
sky/cli.py,sha256=kH2ljshZiKiYDeBNJKI-751i7_d5PJnVDZ7BChYWT_o,245252
|
6
6
|
sky/cloud_stores.py,sha256=Ln5GBpel-sEs7rVx7bBrMkfLwA_bctI05Rox2uoz7Lo,26388
|
7
7
|
sky/core.py,sha256=1A2vRsNScNduqZITNJXzwgQ2d49YGa1O6WG5x_Wkg1Q,52185
|
8
8
|
sky/dag.py,sha256=8x-VMtjvSi0lYBemCMPLYq5ONljhoABjWzMKjmmdjSo,3369
|
9
9
|
sky/exceptions.py,sha256=hjqKX-WafKDvwBTpZp0f63E_bLCe56ml2jUBJpfEQ7I,18404
|
10
10
|
sky/execution.py,sha256=LIRTPuRJFyvNkx1ZlIyUhbcy7k4YUnU-MEx6lnH1pg0,32990
|
11
|
-
sky/global_user_state.py,sha256=
|
11
|
+
sky/global_user_state.py,sha256=yvPFa5v01ZfNf14pdzHbwQ3qF7w8wqS43gzLYrTLFN4,53284
|
12
12
|
sky/models.py,sha256=VGMzCHRwjJRQBm6Y054vL6Yvfkrcm79b5dPpdXS3Syk,2183
|
13
13
|
sky/optimizer.py,sha256=2JZl6exFMuOAzpWefvfY9CZPWnvjDLLvR92A2qpvtRs,61418
|
14
14
|
sky/resources.py,sha256=pmDPdoScIQy_9kAlBdGTeRqtWfafKlcqUAA-NrtxfVk,97155
|
@@ -87,7 +87,7 @@ sky/clouds/do.py,sha256=lBXN9x8ZeS1P4r5znfSTcDVPWAiLif7gt7agcWdchMo,11900
|
|
87
87
|
sky/clouds/fluidstack.py,sha256=ya9eUT9jCaTsRozIjyq1M_c0EQDJWeNQJrscBAzKZv0,12933
|
88
88
|
sky/clouds/gcp.py,sha256=DNk624joqKWAs1_LPaPzbInOtXZpY_0A9vLcIQPx4JM,67668
|
89
89
|
sky/clouds/ibm.py,sha256=FPU8j20LSBxr7gilD4F2liMG40eQyxp2ZDqNh-pmKYU,22262
|
90
|
-
sky/clouds/kubernetes.py,sha256=
|
90
|
+
sky/clouds/kubernetes.py,sha256=nyW5NgcJ-9gXSSjfrb5mJB6VZ2u1xWgMz2w7Z1XMnf0,43723
|
91
91
|
sky/clouds/lambda_cloud.py,sha256=ZBpIA3wO8aNV-Ox1TpxE91J4K6Tcfp8pFXLh192lE3c,12993
|
92
92
|
sky/clouds/nebius.py,sha256=sgQnDY6Tjaur5VgjqWi00LB5sixo4xqxIUD15DZeiEM,20521
|
93
93
|
sky/clouds/oci.py,sha256=lMUO5SjgFZK1rs2KOoBG-hePRLiHEcbNWP44weugav8,27875
|
@@ -103,16 +103,18 @@ sky/clouds/utils/azure_utils.py,sha256=NToRBnhEyuUvb-nBnsKTxjhOBRkMcrelL8LK4w6s4
|
|
103
103
|
sky/clouds/utils/gcp_utils.py,sha256=rh4a91euYFflq6V7bLpY9XnAwnwyNczRueOShpD-E8U,7204
|
104
104
|
sky/clouds/utils/oci_utils.py,sha256=0YxhgZdeIHQUI1AZ86YuswsZg5HdVCIVfSTRJsSHYI0,6396
|
105
105
|
sky/clouds/utils/scp_utils.py,sha256=MqawUhhFHHxVnn29nOI4gJ_nF665ich4Po7bsy1afsA,15948
|
106
|
-
sky/dashboard/out/404.html,sha256=
|
107
|
-
sky/dashboard/out/clusters.html,sha256=
|
108
|
-
sky/dashboard/out/config.html,sha256=
|
106
|
+
sky/dashboard/out/404.html,sha256=C3fdWMIlm2OJ38s7NDi0PWwDHd_-KEavVVzBlTGFmR4,1423
|
107
|
+
sky/dashboard/out/clusters.html,sha256=OAzSRiFM3wzF0j13UVcvtRAgYlkZl6o6yYif0xMKw5Q,1418
|
108
|
+
sky/dashboard/out/config.html,sha256=3L6BD_DIJkuxYvxhMshGg35o921NWR0Oa8FhZcNqs9Q,1414
|
109
109
|
sky/dashboard/out/favicon.ico,sha256=XilUZZglAl_1zRsg85QsbQgmQAzGPQjcUIJ-A3AzYn8,93590
|
110
|
-
sky/dashboard/out/index.html,sha256=
|
111
|
-
sky/dashboard/out/infra.html,sha256=
|
112
|
-
sky/dashboard/out/jobs.html,sha256=
|
110
|
+
sky/dashboard/out/index.html,sha256=ksYYXGVas14Up-G3gVxncTbqBzjpO8ZRX-NTILx65TI,1407
|
111
|
+
sky/dashboard/out/infra.html,sha256=Zup4zRA6G0Vrhh3CuFEd3exMJTPs2jq9vfixg9rmMnQ,1412
|
112
|
+
sky/dashboard/out/jobs.html,sha256=jWx2Q0XA6FcBBDgmDYyvOuUqtbKGcDwp1XJbHqACGqc,1410
|
113
113
|
sky/dashboard/out/skypilot.svg,sha256=c0iRtlfLlaUm2p0rG9NFmo5FN0Qhf3pq5Xph-AeMPJw,5064
|
114
|
-
sky/dashboard/out/users.html,sha256=
|
115
|
-
sky/dashboard/out/workspaces.html,sha256=
|
114
|
+
sky/dashboard/out/users.html,sha256=RR2OUYDTb41S44cfDa1t9mkFzbxkrE2UKqc-fUKyXBc,1412
|
115
|
+
sky/dashboard/out/workspaces.html,sha256=G39fTgEhY-o5L7v-tjhnp1wnsRtCEzSQiShcXbPSeS0,1422
|
116
|
+
sky/dashboard/out/_next/static/G3DXdMFu2Jzd-Dody9iq1/_buildManifest.js,sha256=W7MSUq6ZDL-PV43G52s_pEnn-xt7FCGvm63yyGhAvsk,2046
|
117
|
+
sky/dashboard/out/_next/static/G3DXdMFu2Jzd-Dody9iq1/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
116
118
|
sky/dashboard/out/_next/static/chunks/211.692afc57e812ae1a.js,sha256=TbpmhT-AzGXhDbjA6mJG_D5dLgq_st-hMr0nbCpRsEY,3778
|
117
119
|
sky/dashboard/out/_next/static/chunks/350.9e123a4551f68b0d.js,sha256=Sj1tcifLEZKm43SFf3zYfT0VC-kcGSb18EV3kV_KTTs,266
|
118
120
|
sky/dashboard/out/_next/static/chunks/37-d8aebf1683522a0b.js,sha256=FytwU6I8f34I_jXSOhYikikHTDxmfME77m4AJ0HNz2o,14258
|
@@ -159,15 +161,13 @@ sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-b3dbf38b51cb29be.js,sha25
|
|
159
161
|
sky/dashboard/out/_next/static/chunks/pages/workspace/new-31aa8bdcb7592635.js,sha256=Rp48cs4oSH9b8voWWgYMePJdmKx9Qt0KpjcOWOeBp5o,758
|
160
162
|
sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-c8c2191328532b7d.js,sha256=Fy7YhuXjR14ZLOKUEYVtJnaoDDLX5AM_etnoZf65V3k,4385
|
161
163
|
sky/dashboard/out/_next/static/css/5d71bfc09f184bab.css,sha256=bcfpiDci6pzA_D7qpHppavKzotSeYzFQFLsc71AARxA,40435
|
162
|
-
sky/dashboard/out/
|
163
|
-
sky/dashboard/out/
|
164
|
-
sky/dashboard/out/
|
165
|
-
sky/dashboard/out/
|
166
|
-
sky/dashboard/out/infra/[context].html,sha256=qWdaPFTV5pXgSS2pAa4UpY-EfJySu2roheyFMvPLIbA,1436
|
167
|
-
sky/dashboard/out/jobs/[job].html,sha256=Qqp-wM79XWkiWZ9B4U2DZzikunfAWm6_JcJl5WDmIH0,2122
|
164
|
+
sky/dashboard/out/clusters/[cluster].html,sha256=fNVlPckgl0a-yJ-3YzVI-lpDq8h_fKzD4TnObsuhDy4,2659
|
165
|
+
sky/dashboard/out/clusters/[cluster]/[job].html,sha256=3Z-SgU78B-NkyLXyaFKGmt048cLXLVt5Au4sO3_J4wA,1980
|
166
|
+
sky/dashboard/out/infra/[context].html,sha256=HsxAYWIeVzE9B8YNnVWXahKDEfyAd5nm836bs1bVgQg,1436
|
167
|
+
sky/dashboard/out/jobs/[job].html,sha256=3wI252fnmQacqfOdKrx7IjK4iK5_hPnAZoZUr_YSxw0,2122
|
168
168
|
sky/dashboard/out/videos/cursor-small.mp4,sha256=8tRdp1vjawOrXUar1cfjOc-nkaKmcwCPZx_LO0XlCvQ,203285
|
169
|
-
sky/dashboard/out/workspace/new.html,sha256=
|
170
|
-
sky/dashboard/out/workspaces/[name].html,sha256=
|
169
|
+
sky/dashboard/out/workspace/new.html,sha256=nEelfSHFGi5jVbmUQroiPnAI5BmW7iOlmNuoq-l30Cc,1428
|
170
|
+
sky/dashboard/out/workspaces/[name].html,sha256=4vItCXBK8ikE4eg2kvPc-wp2qnPgwFk6fVInwfWCOuM,2658
|
171
171
|
sky/data/__init__.py,sha256=Nhaf1NURisXpZuwWANa2IuCyppIuc720FRwqSE2oEwY,184
|
172
172
|
sky/data/data_transfer.py,sha256=N8b0CQebDuHieXjvEVwlYmK6DbQxUGG1RQJEyTbh3dU,12040
|
173
173
|
sky/data/data_utils.py,sha256=CNYPM963qby5ddW0DZNbhiWXkqgB9MHh_jrC5DoBctM,33437
|
@@ -183,12 +183,8 @@ sky/jobs/state.py,sha256=OZK1HaLAOh3H1DVV9PutMX2zugIT8NGxuyge8l3h6hs,52538
|
|
183
183
|
sky/jobs/utils.py,sha256=KM57CrD1RcQWxrTJAooGBzwRGmlHmUPZPk4ChGzCRYY,65155
|
184
184
|
sky/jobs/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
185
185
|
sky/jobs/client/sdk.py,sha256=cVylGbRVBVigNENbxb5bw4M5IRz22toOP8GIaih0gMw,11172
|
186
|
-
sky/jobs/dashboard/dashboard.py,sha256=JKg8cCH_Y0sf3MoDTx85BghVEXWpp8ItPLshp09-_Js,7618
|
187
|
-
sky/jobs/dashboard/static/favicon.ico,sha256=uYlvgxSM7gjBmXpZ8wydvZUPAbJiiix-rc2Xe5mma9s,15086
|
188
|
-
sky/jobs/dashboard/templates/index.html,sha256=NrlTDiEHJDt7sViwWgXUSxVCyVl_IEukE5jdvN8WhtQ,33132
|
189
186
|
sky/jobs/server/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
190
|
-
sky/jobs/server/core.py,sha256=
|
191
|
-
sky/jobs/server/dashboard_utils.py,sha256=2Mbx40W1pQqPEPHsSDbHeaF0j5cgyKy-_A9Owdwp_AQ,2315
|
187
|
+
sky/jobs/server/core.py,sha256=fwtfN5XXAoXrozoDR1PY_2Oeb4uC9KLllmxQI6_DmcU,26508
|
192
188
|
sky/jobs/server/server.py,sha256=ae8JAs-2ipWqL_GsA3x8T2mY-OJLc3ioWg_CfRzCUIY,4011
|
193
189
|
sky/provision/__init__.py,sha256=c4QZli6zQz1YVG0plR27kGDjxhRQwDrT5d0UZemrNPI,6487
|
194
190
|
sky/provision/common.py,sha256=mTsL1UU-kPYGAc1gWUo-btI8bdL6tAWg9OMMAb-v8ws,10197
|
@@ -359,7 +355,7 @@ sky/templates/do-ray.yml.j2,sha256=7XZsM2H6RF2muHCm6xnqglnKhONXH8S3Y_mFiVxD558,4
|
|
359
355
|
sky/templates/fluidstack-ray.yml.j2,sha256=dNr9svMNp0z6-PHyQeRa6Hl3SbgqMESgBdfpvtP3aH0,3789
|
360
356
|
sky/templates/gcp-ray.yml.j2,sha256=2wK1j7nkLzZm2kHIbc76WZ-dk4yxObzBEEhzTEQUOuc,11789
|
361
357
|
sky/templates/ibm-ray.yml.j2,sha256=n_EsoqQx1DUPDh7ZgCxvlEEZnROJ4rBXrFcHYVRIN2c,6907
|
362
|
-
sky/templates/jobs-controller.yaml.j2,sha256=
|
358
|
+
sky/templates/jobs-controller.yaml.j2,sha256=vtHZdioV_KopcAf1wpzH_J0WXvq2o0oFs8TE3QQ3KYY,1949
|
363
359
|
sky/templates/kubernetes-ingress.yml.j2,sha256=73iDklVDWBMbItg0IexCa6_ClXPJOxw7PWz3leku4nE,1340
|
364
360
|
sky/templates/kubernetes-loadbalancer.yml.j2,sha256=IxrNYM366N01bbkJEbZ_UPYxUP8wyVEbRNFHRsBuLsw,626
|
365
361
|
sky/templates/kubernetes-port-forward-proxy-command.sh,sha256=iw7mypHszg6Ggq9MbyiYMFOkSlXaQZulaxqC5IWYGCc,3381
|
@@ -399,7 +395,7 @@ sky/utils/config_utils.py,sha256=v8yZcr8OvEfXmBDYcdOj3U-AH1XERY76zGJMNdqzvqc,103
|
|
399
395
|
sky/utils/context.py,sha256=SfWg8vGb-nKYvzY-LL1PhxzoPLRmqGB0g0oTqdXXsXY,9842
|
400
396
|
sky/utils/context_utils.py,sha256=cby-QPmnGObjIE4K7eZ_dkWZdUo7YJUmnJr5oKf_v54,6712
|
401
397
|
sky/utils/control_master_utils.py,sha256=iD4M0onjYOdZ2RuxjwMBl4KhafHXJzuHjvqlBUnu-VE,1450
|
402
|
-
sky/utils/controller_utils.py,sha256=
|
398
|
+
sky/utils/controller_utils.py,sha256=DabTg70Vcnpqnbf6U3vBnzozhl0PYXDWctVzg8FSm_U,54851
|
403
399
|
sky/utils/dag_utils.py,sha256=FjxMaAT6ia4ndVg-ogXgiekLGD1GiPCAdK_c-cjIeuY,7607
|
404
400
|
sky/utils/db_utils.py,sha256=MlJN4dVUEcMkLMn5rYi1F-WnD9ap2oOoF9lDiqlL0h4,5243
|
405
401
|
sky/utils/env_options.py,sha256=aaD6GoYK0LaZIqjOEZ-R7eccQuiRriW3EuLWtOI5En8,1578
|
@@ -441,9 +437,9 @@ sky/workspaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
441
437
|
sky/workspaces/core.py,sha256=2kKUP-V5Qo1n-xfayA4M1OE_ina6_4bxkTF3dv3yBEU,20704
|
442
438
|
sky/workspaces/server.py,sha256=Box45DS54xXGHy7I3tGKGy-JP0a8G_z6IhfvGlEXtsA,3439
|
443
439
|
sky/workspaces/utils.py,sha256=IIAiFoS6sdb2t0X5YoX9AietpTanZUQNTK8cePun-sY,2143
|
444
|
-
skypilot_nightly-1.0.0.
|
445
|
-
skypilot_nightly-1.0.0.
|
446
|
-
skypilot_nightly-1.0.0.
|
447
|
-
skypilot_nightly-1.0.0.
|
448
|
-
skypilot_nightly-1.0.0.
|
449
|
-
skypilot_nightly-1.0.0.
|
440
|
+
skypilot_nightly-1.0.0.dev20250612.dist-info/licenses/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
|
441
|
+
skypilot_nightly-1.0.0.dev20250612.dist-info/METADATA,sha256=Vy1CBmbfGe8IBvBWf-zEjuORCSJbyBQEUVT6xAIBISQ,18434
|
442
|
+
skypilot_nightly-1.0.0.dev20250612.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
443
|
+
skypilot_nightly-1.0.0.dev20250612.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
|
444
|
+
skypilot_nightly-1.0.0.dev20250612.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
|
445
|
+
skypilot_nightly-1.0.0.dev20250612.dist-info/RECORD,,
|
sky/jobs/dashboard/dashboard.py
DELETED
@@ -1,223 +0,0 @@
|
|
1
|
-
"""Dashboard for managed jobs based on Flask.
|
2
|
-
|
3
|
-
TODO(zongheng): This is a basic version. In the future we can beef up the web
|
4
|
-
frameworks used (e.g.,
|
5
|
-
https://github.com/ray-project/ray/tree/master/dashboard/client/src) and/or get
|
6
|
-
rid of the SSH port-forwarding business (see cli.py's job_dashboard()
|
7
|
-
comment).
|
8
|
-
"""
|
9
|
-
import collections
|
10
|
-
import datetime
|
11
|
-
import enum
|
12
|
-
import os
|
13
|
-
import pathlib
|
14
|
-
|
15
|
-
import flask
|
16
|
-
import yaml
|
17
|
-
|
18
|
-
from sky import jobs as managed_jobs
|
19
|
-
from sky.client import sdk
|
20
|
-
from sky.jobs import constants as managed_job_constants
|
21
|
-
from sky.utils import common_utils
|
22
|
-
from sky.utils import controller_utils
|
23
|
-
|
24
|
-
app = flask.Flask(__name__)
|
25
|
-
|
26
|
-
|
27
|
-
def _is_running_on_jobs_controller() -> bool:
|
28
|
-
"""Am I running on jobs controller?
|
29
|
-
|
30
|
-
Loads ~/.sky/sky_ray.yml and check cluster_name.
|
31
|
-
"""
|
32
|
-
if pathlib.Path('~/.sky/sky_ray.yml').expanduser().exists():
|
33
|
-
config = yaml.safe_load(
|
34
|
-
pathlib.Path('~/.sky/sky_ray.yml').expanduser().read_text(
|
35
|
-
encoding='utf-8'))
|
36
|
-
cluster_name = config.get('cluster_name', '')
|
37
|
-
# We use startswith instead of exact match because the cluster name in
|
38
|
-
# the yaml file is cluster_name_on_cloud which may have additional
|
39
|
-
# suffices.
|
40
|
-
return cluster_name.startswith(
|
41
|
-
controller_utils.Controllers.JOBS_CONTROLLER.value.cluster_name)
|
42
|
-
return False
|
43
|
-
|
44
|
-
|
45
|
-
# Column indices for job table
|
46
|
-
class JobTableColumns(enum.IntEnum):
|
47
|
-
"""Column indices for the jobs table in the dashboard.
|
48
|
-
|
49
|
-
- DROPDOWN (0): Column for expandable dropdown arrow
|
50
|
-
- ID (1): Job ID column
|
51
|
-
- TASK (2): Task name/number column
|
52
|
-
- NAME (3): Job name column
|
53
|
-
- RESOURCES (4): Resources used by job
|
54
|
-
- SUBMITTED (5): Job submission timestamp
|
55
|
-
- TOTAL_DURATION (6): Total time since job submission
|
56
|
-
- JOB_DURATION (7): Actual job runtime
|
57
|
-
- RECOVERIES (8): Number of job recoveries
|
58
|
-
- STATUS (9): Current job status
|
59
|
-
- STARTED (10): Job start timestamp
|
60
|
-
- CLUSTER (11): Cluster name
|
61
|
-
- REGION (12): Cloud region
|
62
|
-
- FAILOVER (13): Job failover history
|
63
|
-
- DETAILS (14): Job details
|
64
|
-
- ACTIONS (15): Available actions column
|
65
|
-
- LOG_CONTENT (16): Log content column
|
66
|
-
"""
|
67
|
-
DROPDOWN = 0
|
68
|
-
ID = 1
|
69
|
-
TASK = 2
|
70
|
-
NAME = 3
|
71
|
-
RESOURCES = 4
|
72
|
-
SUBMITTED = 5
|
73
|
-
TOTAL_DURATION = 6
|
74
|
-
JOB_DURATION = 7
|
75
|
-
RECOVERIES = 8
|
76
|
-
STATUS = 9
|
77
|
-
STARTED = 10
|
78
|
-
CLUSTER = 11
|
79
|
-
REGION = 12
|
80
|
-
DETAILS = 13
|
81
|
-
FAILOVER = 14
|
82
|
-
ACTIONS = 15
|
83
|
-
LOG_CONTENT = 16
|
84
|
-
|
85
|
-
|
86
|
-
# Column headers matching the indices above
|
87
|
-
JOB_TABLE_COLUMNS = [
|
88
|
-
'', 'ID', 'Task', 'Name', 'Resources', 'Submitted', 'Total Duration',
|
89
|
-
'Job Duration', 'Status', 'Started', 'Cluster', 'Region', 'Failover',
|
90
|
-
'Recoveries', 'Details', 'Actions', 'Log Content'
|
91
|
-
]
|
92
|
-
|
93
|
-
# This column is given by format_job_table but should be ignored.
|
94
|
-
SCHED_STATE_COLUMN = 12
|
95
|
-
|
96
|
-
|
97
|
-
def _extract_launch_history(log_content: str) -> str:
|
98
|
-
"""Extract launch history from log content.
|
99
|
-
|
100
|
-
Args:
|
101
|
-
log_content: Content of the log file.
|
102
|
-
Returns:
|
103
|
-
A formatted string containing the launch history.
|
104
|
-
"""
|
105
|
-
launches = []
|
106
|
-
current_launch = None
|
107
|
-
|
108
|
-
for line in log_content.splitlines():
|
109
|
-
if 'Launching on' in line:
|
110
|
-
try:
|
111
|
-
parts = line.split(']')
|
112
|
-
if len(parts) >= 2:
|
113
|
-
timestamp = parts[0].split()[1:3]
|
114
|
-
message = parts[1].replace('[0m⚙︎', '').strip()
|
115
|
-
formatted_line = f'{" ".join(timestamp)} {message}'
|
116
|
-
if current_launch:
|
117
|
-
prev_time, prev_target = current_launch.rsplit(
|
118
|
-
' Launching on ', 1)
|
119
|
-
launches.append(
|
120
|
-
f'{prev_time} Tried to launch on {prev_target}')
|
121
|
-
|
122
|
-
# Store the current launch
|
123
|
-
current_launch = formatted_line
|
124
|
-
except IndexError:
|
125
|
-
launches.append(line.strip())
|
126
|
-
|
127
|
-
# Add the final (successful) launch at the beginning
|
128
|
-
if current_launch:
|
129
|
-
result = [current_launch]
|
130
|
-
result.extend(launches)
|
131
|
-
return '\n'.join(result)
|
132
|
-
|
133
|
-
return 'No launch history found'
|
134
|
-
|
135
|
-
|
136
|
-
@app.route('/')
|
137
|
-
def home():
|
138
|
-
if not _is_running_on_jobs_controller():
|
139
|
-
# Experimental: run on laptop (refresh is very slow).
|
140
|
-
request_id = managed_jobs.queue(refresh=True, skip_finished=False)
|
141
|
-
all_managed_jobs = sdk.get(request_id)
|
142
|
-
else:
|
143
|
-
job_table = managed_jobs.dump_managed_job_queue()
|
144
|
-
all_managed_jobs = managed_jobs.load_managed_job_queue(job_table)
|
145
|
-
|
146
|
-
timestamp = datetime.datetime.now(datetime.timezone.utc)
|
147
|
-
rows = managed_jobs.format_job_table(all_managed_jobs,
|
148
|
-
show_all=True,
|
149
|
-
show_user=False,
|
150
|
-
return_rows=True)
|
151
|
-
|
152
|
-
status_counts = collections.defaultdict(int)
|
153
|
-
for task in all_managed_jobs:
|
154
|
-
if not task['status'].is_terminal():
|
155
|
-
status_counts[task['status'].value] += 1
|
156
|
-
|
157
|
-
# Add an empty column for the dropdown button and actions column
|
158
|
-
# Exclude SCHED. STATE and LOG_CONTENT columns
|
159
|
-
rows = [
|
160
|
-
[''] + row[:SCHED_STATE_COLUMN] + row[SCHED_STATE_COLUMN + 1:] +
|
161
|
-
# Add empty cell for failover and actions column
|
162
|
-
[''] + [''] + [''] for row in rows
|
163
|
-
]
|
164
|
-
|
165
|
-
# Add log content as a regular column for each job
|
166
|
-
for row in rows:
|
167
|
-
job_id = str(row[JobTableColumns.ID]).strip().replace(' ⤳', '')
|
168
|
-
if job_id and job_id != '-':
|
169
|
-
try:
|
170
|
-
log_path = os.path.join(
|
171
|
-
os.path.expanduser(
|
172
|
-
managed_job_constants.JOBS_CONTROLLER_LOGS_DIR),
|
173
|
-
f'{job_id}.log')
|
174
|
-
if os.path.exists(log_path):
|
175
|
-
with open(log_path, 'r', encoding='utf-8') as f:
|
176
|
-
log_content = f.read()
|
177
|
-
row[JobTableColumns.FAILOVER] = _extract_launch_history(
|
178
|
-
log_content)
|
179
|
-
row[JobTableColumns.LOG_CONTENT] = log_content
|
180
|
-
else:
|
181
|
-
row[JobTableColumns.FAILOVER] = 'Log file not found'
|
182
|
-
row[JobTableColumns.LOG_CONTENT] = 'Log file not found'
|
183
|
-
except (IOError, OSError) as e:
|
184
|
-
error_msg = f'Error reading log: {str(e)}'
|
185
|
-
row[JobTableColumns.FAILOVER] = error_msg
|
186
|
-
row[JobTableColumns.LOG_CONTENT] = error_msg
|
187
|
-
else:
|
188
|
-
row[JobTableColumns.LOG_CONTENT] = ''
|
189
|
-
|
190
|
-
if rows and len(rows[0]) != len(JOB_TABLE_COLUMNS):
|
191
|
-
raise RuntimeError(
|
192
|
-
f'Dashboard code and managed job queue code are out of sync. '
|
193
|
-
f'Expected {JOB_TABLE_COLUMNS} columns, got {rows[0]}')
|
194
|
-
|
195
|
-
# Fix STATUS color codes: '\x1b[33mCANCELLED\x1b[0m' -> 'CANCELLED'
|
196
|
-
for row in rows:
|
197
|
-
row[JobTableColumns.STATUS] = common_utils.remove_color(
|
198
|
-
row[JobTableColumns.STATUS])
|
199
|
-
|
200
|
-
# Remove filler rows ([''], ..., ['-'])
|
201
|
-
rows = [
|
202
|
-
row for row in rows
|
203
|
-
if ''.join(map(str, row[:JobTableColumns.ACTIONS])) != ''
|
204
|
-
]
|
205
|
-
|
206
|
-
# Get all unique status values
|
207
|
-
status_values = sorted(
|
208
|
-
list(set(row[JobTableColumns.STATUS] for row in rows)))
|
209
|
-
|
210
|
-
rendered_html = flask.render_template(
|
211
|
-
'index.html',
|
212
|
-
columns=JOB_TABLE_COLUMNS,
|
213
|
-
rows=rows,
|
214
|
-
last_updated_timestamp=timestamp,
|
215
|
-
status_values=status_values,
|
216
|
-
status_counts=status_counts,
|
217
|
-
request=flask.request,
|
218
|
-
)
|
219
|
-
return rendered_html
|
220
|
-
|
221
|
-
|
222
|
-
if __name__ == '__main__':
|
223
|
-
app.run()
|
Binary file
|