skypilot-nightly 1.0.0.dev20250306__py3-none-any.whl → 1.0.0.dev20250307__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/backends/wheel_utils.py +29 -14
- sky/jobs/server/core.py +2 -2
- sky/jobs/server/server.py +3 -0
- sky/templates/jobs-controller.yaml.j2 +2 -3
- sky/utils/command_runner.py +2 -2
- sky/utils/rich_utils.py +41 -3
- {skypilot_nightly-1.0.0.dev20250306.dist-info → skypilot_nightly-1.0.0.dev20250307.dist-info}/METADATA +1 -1
- {skypilot_nightly-1.0.0.dev20250306.dist-info → skypilot_nightly-1.0.0.dev20250307.dist-info}/RECORD +13 -13
- {skypilot_nightly-1.0.0.dev20250306.dist-info → skypilot_nightly-1.0.0.dev20250307.dist-info}/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250306.dist-info → skypilot_nightly-1.0.0.dev20250307.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250306.dist-info → skypilot_nightly-1.0.0.dev20250307.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250306.dist-info → skypilot_nightly-1.0.0.dev20250307.dist-info}/top_level.txt +0 -0
sky/__init__.py
CHANGED
@@ -5,7 +5,7 @@ from typing import Optional
|
|
5
5
|
import urllib.request
|
6
6
|
|
7
7
|
# Replaced with the current commit when building the wheels.
|
8
|
-
_SKYPILOT_COMMIT_SHA = '
|
8
|
+
_SKYPILOT_COMMIT_SHA = 'f6a65c2ea0ac00976d06e47c46e8df1297cb70a2'
|
9
9
|
|
10
10
|
|
11
11
|
def _get_git_commit():
|
@@ -35,7 +35,7 @@ def _get_git_commit():
|
|
35
35
|
|
36
36
|
|
37
37
|
__commit__ = _get_git_commit()
|
38
|
-
__version__ = '1.0.0.
|
38
|
+
__version__ = '1.0.0.dev20250307'
|
39
39
|
__root_dir__ = os.path.dirname(os.path.abspath(__file__))
|
40
40
|
|
41
41
|
|
sky/backends/wheel_utils.py
CHANGED
@@ -17,7 +17,7 @@ import re
|
|
17
17
|
import shutil
|
18
18
|
import subprocess
|
19
19
|
import tempfile
|
20
|
-
from typing import Tuple
|
20
|
+
from typing import Optional, Tuple
|
21
21
|
|
22
22
|
import filelock
|
23
23
|
from packaging import version
|
@@ -149,16 +149,29 @@ def build_sky_wheel() -> Tuple[pathlib.Path, str]:
|
|
149
149
|
- wheel_hash: The wheel content hash.
|
150
150
|
"""
|
151
151
|
|
152
|
-
def _get_latest_modification_time(path: pathlib.Path) -> float:
|
152
|
+
def _get_latest_modification_time(path: pathlib.Path) -> Optional[float]:
|
153
|
+
max_time = -1.
|
153
154
|
if not path.exists():
|
154
|
-
return
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
155
|
+
return max_time
|
156
|
+
for root, dirs, files in os.walk(path):
|
157
|
+
# Prune __pycache__ directories to prevent walking into them and
|
158
|
+
# exclude them from processing
|
159
|
+
if '__pycache__' in dirs:
|
160
|
+
dirs.remove('__pycache__')
|
161
|
+
# Filter out .pyc files
|
162
|
+
filtered_files = [f for f in files if not f.endswith('.pyc')]
|
163
|
+
# Process remaining directories and files
|
164
|
+
for entry in (*dirs, *filtered_files):
|
165
|
+
entry_path = os.path.join(root, entry)
|
166
|
+
try:
|
167
|
+
mtime = os.path.getmtime(entry_path)
|
168
|
+
if mtime > max_time:
|
169
|
+
max_time = mtime
|
170
|
+
except OSError:
|
171
|
+
# Handle cases where file might have been deleted after
|
172
|
+
# listing
|
173
|
+
return None
|
174
|
+
return max_time
|
162
175
|
|
163
176
|
# This lock prevents that the wheel is updated while being copied.
|
164
177
|
# Although the current caller already uses a lock, we still lock it here
|
@@ -170,10 +183,12 @@ def build_sky_wheel() -> Tuple[pathlib.Path, str]:
|
|
170
183
|
last_modification_time = _get_latest_modification_time(SKY_PACKAGE_PATH)
|
171
184
|
last_wheel_modification_time = _get_latest_modification_time(WHEEL_DIR)
|
172
185
|
|
173
|
-
# Only build wheels if the wheel is outdated
|
174
|
-
# for the requested version.
|
175
|
-
if (
|
176
|
-
|
186
|
+
# Only build wheels if the wheel is outdated, wheel does not exist
|
187
|
+
# for the requested version, or files were deleted during checking.
|
188
|
+
if ((last_modification_time is None or
|
189
|
+
last_wheel_modification_time is None) or
|
190
|
+
(last_wheel_modification_time < last_modification_time) or
|
191
|
+
not any(WHEEL_DIR.glob(f'**/{_WHEEL_PATTERN}'))):
|
177
192
|
if not WHEEL_DIR.exists():
|
178
193
|
WHEEL_DIR.mkdir(parents=True, exist_ok=True)
|
179
194
|
latest_wheel = _build_sky_wheel()
|
sky/jobs/server/core.py
CHANGED
@@ -157,6 +157,7 @@ def launch(
|
|
157
157
|
'modified_catalogs':
|
158
158
|
service_catalog_common.get_modified_catalog_file_mounts(),
|
159
159
|
'dashboard_setup_cmd': managed_job_constants.DASHBOARD_SETUP_CMD,
|
160
|
+
'dashboard_user_id': common.SERVER_ID,
|
160
161
|
**controller_utils.shared_controller_vars_to_fill(
|
161
162
|
controller_utils.Controllers.JOBS_CONTROLLER,
|
162
163
|
remote_user_config_path=remote_user_config_path,
|
@@ -305,10 +306,9 @@ def _maybe_restart_controller(
|
|
305
306
|
with rich_utils.safe_status(
|
306
307
|
ux_utils.spinner_message('Starting dashboard...')):
|
307
308
|
runner = handle.get_command_runners()[0]
|
308
|
-
user_hash = common_utils.get_user_hash()
|
309
309
|
runner.run(
|
310
310
|
f'export '
|
311
|
-
f'{skylet_constants.USER_ID_ENV_VAR}={
|
311
|
+
f'{skylet_constants.USER_ID_ENV_VAR}={common.SERVER_ID!r}; '
|
312
312
|
f'{managed_job_constants.DASHBOARD_SETUP_CMD}',
|
313
313
|
stream_logs=True,
|
314
314
|
)
|
sky/jobs/server/server.py
CHANGED
@@ -159,6 +159,9 @@ async def dashboard(request: fastapi.Request,
|
|
159
159
|
except Exception as e: # pylint: disable=broad-except
|
160
160
|
# We catch all exceptions to gracefully handle unknown
|
161
161
|
# errors and retry or raise an HTTPException to the client.
|
162
|
+
# Assume an exception indicates that the dashboard connection
|
163
|
+
# is stale - remove it so that a new one is created.
|
164
|
+
dashboard_utils.remove_dashboard_session(user_hash)
|
162
165
|
msg = (
|
163
166
|
f'Dashboard connection attempt {attempt + 1} failed with '
|
164
167
|
f'{common_utils.format_exception(e, use_bracket=True)}')
|
@@ -39,9 +39,7 @@ setup: |
|
|
39
39
|
After=network.target
|
40
40
|
|
41
41
|
[Service]
|
42
|
-
Environment="
|
43
|
-
Environment="SKYPILOT_USER_ID={{controller_envs.SKYPILOT_USER_ID}}"
|
44
|
-
Environment="SKYPILOT_USER={{controller_envs.SKYPILOT_USER}}"
|
42
|
+
Environment="SKYPILOT_USER_ID={{ dashboard_user_id }}"
|
45
43
|
Restart=always
|
46
44
|
StandardOutput=append:/home/$USER/.sky/job-dashboard.log
|
47
45
|
StandardError=append:/home/$USER/.sky/job-dashboard.log
|
@@ -51,6 +49,7 @@ setup: |
|
|
51
49
|
WantedBy=default.target
|
52
50
|
EOF
|
53
51
|
|
52
|
+
export SKYPILOT_USER_ID="{{ dashboard_user_id }}"
|
54
53
|
{{ dashboard_setup_cmd }}
|
55
54
|
|
56
55
|
run: |
|
sky/utils/command_runner.py
CHANGED
@@ -531,8 +531,8 @@ class SSHCommandRunner(CommandRunner):
|
|
531
531
|
if port_forward is not None:
|
532
532
|
for local, remote in port_forward:
|
533
533
|
logger.info(
|
534
|
-
f'Forwarding port {local} to port {remote}
|
535
|
-
ssh += ['-NL', f'{
|
534
|
+
f'Forwarding local port {local} to remote port {remote}.')
|
535
|
+
ssh += ['-NL', f'{local}:localhost:{remote}']
|
536
536
|
if self._docker_ssh_proxy_command is not None:
|
537
537
|
docker_ssh_proxy_command = self._docker_ssh_proxy_command(ssh)
|
538
538
|
else:
|
sky/utils/rich_utils.py
CHANGED
@@ -230,15 +230,53 @@ def decode_rich_status(
|
|
230
230
|
decoding_status = None
|
231
231
|
try:
|
232
232
|
last_line = ''
|
233
|
+
# Buffer to store incomplete UTF-8 bytes between chunks
|
234
|
+
undecoded_buffer = b''
|
235
|
+
|
233
236
|
# Iterate over the response content in chunks. We do not use iter_lines
|
234
237
|
# because it will strip the trailing newline characters, causing the
|
235
238
|
# progress bar ending with `\r` becomes a pyramid.
|
236
|
-
for
|
237
|
-
if
|
239
|
+
for chunk in response.iter_content(chunk_size=None):
|
240
|
+
if chunk is None:
|
238
241
|
return
|
239
|
-
|
242
|
+
|
243
|
+
# Append the new chunk to any leftover bytes from previous iteration
|
244
|
+
current_bytes = undecoded_buffer + chunk
|
245
|
+
undecoded_buffer = b''
|
246
|
+
|
247
|
+
# Try to decode the combined bytes
|
248
|
+
try:
|
249
|
+
encoded_msg = current_bytes.decode('utf-8')
|
250
|
+
except UnicodeDecodeError as e:
|
251
|
+
# Check if this is potentially an incomplete sequence at the end
|
252
|
+
if e.start > 0:
|
253
|
+
# Decode the valid part
|
254
|
+
encoded_msg = current_bytes[:e.start].decode('utf-8')
|
255
|
+
|
256
|
+
# Check if the remaining bytes are likely a partial char
|
257
|
+
# or actually invalid UTF-8
|
258
|
+
remaining_bytes = current_bytes[e.start:]
|
259
|
+
if len(remaining_bytes) < 4: # Max UTF-8 char is 4 bytes
|
260
|
+
# Likely incomplete - save for next chunk
|
261
|
+
undecoded_buffer = remaining_bytes
|
262
|
+
else:
|
263
|
+
# Likely invalid - replace with replacement character
|
264
|
+
encoded_msg += remaining_bytes.decode('utf-8',
|
265
|
+
errors='replace')
|
266
|
+
undecoded_buffer = b''
|
267
|
+
else:
|
268
|
+
# Error at the very beginning of the buffer - invalid UTF-8
|
269
|
+
encoded_msg = current_bytes.decode('utf-8',
|
270
|
+
errors='replace')
|
271
|
+
undecoded_buffer = b''
|
272
|
+
|
240
273
|
lines = encoded_msg.splitlines(keepends=True)
|
241
274
|
|
275
|
+
# Skip processing if lines is empty to avoid IndexError
|
276
|
+
if not lines:
|
277
|
+
continue
|
278
|
+
|
279
|
+
# Append any leftover text from previous chunk to first line
|
242
280
|
lines[0] = last_line + lines[0]
|
243
281
|
last_line = lines[-1]
|
244
282
|
# If the last line is not ended with `\r` or `\n` (with ending
|
{skypilot_nightly-1.0.0.dev20250306.dist-info → skypilot_nightly-1.0.0.dev20250307.dist-info}/RECORD
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
sky/__init__.py,sha256=
|
1
|
+
sky/__init__.py,sha256=cmT84Dydiggdvaa-qQIJa-J9yvRrYJn5nsetNtM2JCo,6428
|
2
2
|
sky/admin_policy.py,sha256=hPo02f_A32gCqhUueF0QYy1fMSSKqRwYEg_9FxScN_s,3248
|
3
3
|
sky/authentication.py,sha256=hCEqi77nprQEg3ktfRL51xiiw16zwZOmFEDB_Z7fWVU,22384
|
4
4
|
sky/check.py,sha256=NDKx_Zm7YRxPjMv82wz3ESLnGIPljaACyqVdVNM0PzY,11258
|
@@ -37,7 +37,7 @@ sky/backends/backend_utils.py,sha256=B_46tG9PyrppxLWdg4mWGuuIr3TEcWTz6qhYXjAY2bw
|
|
37
37
|
sky/backends/cloud_vm_ray_backend.py,sha256=KIU4IkUTBGE__7MC3ayjYMwE14mSxeiHjrGnK7wAQXw,247773
|
38
38
|
sky/backends/docker_utils.py,sha256=Hyw1YY20EyghhEbYx6O2FIMDcGkNzBzV9TM7LFynei8,8358
|
39
39
|
sky/backends/local_docker_backend.py,sha256=nSYCjms3HOPjPNOrcCqsUKm1WV3AAovRFjEQ7hcEXW4,17021
|
40
|
-
sky/backends/wheel_utils.py,sha256=
|
40
|
+
sky/backends/wheel_utils.py,sha256=meypuMaygSXXjGdXfq6dhWl-OrpAybg9KVRoup4D0wU,9098
|
41
41
|
sky/backends/monkey_patches/monkey_patch_ray_up.py,sha256=76-y2fCaE3JINj8lEwHT1eirYzCbpD8O1ySsysuGu8o,3450
|
42
42
|
sky/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
43
43
|
sky/benchmark/benchmark_state.py,sha256=X8CXmuU9KgsDRhKedhFgjeRMUFWtQsjFs1qECvPG2yg,8723
|
@@ -119,9 +119,9 @@ sky/jobs/dashboard/dashboard.py,sha256=JKg8cCH_Y0sf3MoDTx85BghVEXWpp8ItPLshp09-_
|
|
119
119
|
sky/jobs/dashboard/static/favicon.ico,sha256=uYlvgxSM7gjBmXpZ8wydvZUPAbJiiix-rc2Xe5mma9s,15086
|
120
120
|
sky/jobs/dashboard/templates/index.html,sha256=NrlTDiEHJDt7sViwWgXUSxVCyVl_IEukE5jdvN8WhtQ,33132
|
121
121
|
sky/jobs/server/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
122
|
-
sky/jobs/server/core.py,sha256=
|
122
|
+
sky/jobs/server/core.py,sha256=tewaCC-yAB1YmTmwbKaVbrjeLHQNz0_zgrB042ii4o4,25252
|
123
123
|
sky/jobs/server/dashboard_utils.py,sha256=2Mbx40W1pQqPEPHsSDbHeaF0j5cgyKy-_A9Owdwp_AQ,2315
|
124
|
-
sky/jobs/server/server.py,sha256=
|
124
|
+
sky/jobs/server/server.py,sha256=UIg2C0SkeGc_GXGudLWXoJePfPNO30n8qvqrcbgZCec,8018
|
125
125
|
sky/provision/__init__.py,sha256=LzOo5LjkRXwSf29dUqN14YbjzQu3liXLQcmweTeZ4dE,6457
|
126
126
|
sky/provision/common.py,sha256=E8AlSUFcn0FYQq1erNmoVfMAdsF9tP2yxfyk-9PLvQU,10286
|
127
127
|
sky/provision/constants.py,sha256=oc_XDUkcoLQ_lwDy5yMeMSWviKS0j0s1c0pjlvpNeWY,800
|
@@ -281,7 +281,7 @@ sky/templates/do-ray.yml.j2,sha256=sRKpn0tC-uPYtSZ20OB4fMzE7RbPQUr8kOCIbuJ4b4Q,4
|
|
281
281
|
sky/templates/fluidstack-ray.yml.j2,sha256=4M3ONqrTaViv7tzN19bSaWT-7c16183DoRVXeZGqgv0,3756
|
282
282
|
sky/templates/gcp-ray.yml.j2,sha256=CriBoM3XF80x9Rx8X-4VVQUFEo5osW6LRbz5ESrEcOg,9850
|
283
283
|
sky/templates/ibm-ray.yml.j2,sha256=uehn7ZZPNIxIXMytqyiEUpTljmwfynCCkdNJURVN31Y,6877
|
284
|
-
sky/templates/jobs-controller.yaml.j2,sha256=
|
284
|
+
sky/templates/jobs-controller.yaml.j2,sha256=LbeWGkarOcrRbbdvkZv_ZfyydEcJBohKItCoAfWK6X0,2432
|
285
285
|
sky/templates/kubernetes-ingress.yml.j2,sha256=73iDklVDWBMbItg0IexCa6_ClXPJOxw7PWz3leku4nE,1340
|
286
286
|
sky/templates/kubernetes-loadbalancer.yml.j2,sha256=IxrNYM366N01bbkJEbZ_UPYxUP8wyVEbRNFHRsBuLsw,626
|
287
287
|
sky/templates/kubernetes-port-forward-proxy-command.sh,sha256=iw7mypHszg6Ggq9MbyiYMFOkSlXaQZulaxqC5IWYGCc,3381
|
@@ -307,7 +307,7 @@ sky/utils/accelerator_registry.py,sha256=GjOgqT0s0n5hT-wcpCcTRu74rnKb8LwQ6MJl6dK
|
|
307
307
|
sky/utils/admin_policy_utils.py,sha256=y_do0VH6qh163EqSuRW1uGeKvTnJhiYNrHUs77uoOcA,6013
|
308
308
|
sky/utils/annotations.py,sha256=-rfacB30Sl0xkFriejGvxma3oKctGfXXLZkQPHG33eo,1626
|
309
309
|
sky/utils/cluster_utils.py,sha256=s6DFRXktv6_gF_DnwDEXJ7CniifHp8CAPeGciRCbXgI,14432
|
310
|
-
sky/utils/command_runner.py,sha256
|
310
|
+
sky/utils/command_runner.py,sha256=4ZXBjDUgU13CZz7pNrAG9ucNV27voRfWc9TdcP5WpHk,39063
|
311
311
|
sky/utils/command_runner.pyi,sha256=mJOzCgcYZAfHwnY_6Wf1YwlTEJGb9ihzc2f0rE0Kw98,7751
|
312
312
|
sky/utils/common.py,sha256=P4oVXFATUYgkruHX92cN12SJBtfb8DiOOYZtbN1kvP0,1927
|
313
313
|
sky/utils/common_utils.py,sha256=1KfqF_hgH9l1ieyV-_3fJd6ma41-tOstj-ihAQcEDIM,31162
|
@@ -322,7 +322,7 @@ sky/utils/log_utils.py,sha256=Y7Sxt6-Br_SB34dPIqZov-46U2S7zhyFzg4ghXtgVaI,16521
|
|
322
322
|
sky/utils/message_utils.py,sha256=zi2Z7PEX6Xq_zvho-aEZe_J7UvpKOLdVDdGAcipRQPU,2662
|
323
323
|
sky/utils/registry.py,sha256=sH_VBupeczMHJIQMXPFv9jNMqE_ZF1ytOUcDFGdHjxA,4132
|
324
324
|
sky/utils/resources_utils.py,sha256=URp6OS9B9nc9tIB5ibZCgGK4XSABmI4kRG0wOM6qgvs,7774
|
325
|
-
sky/utils/rich_utils.py,sha256=
|
325
|
+
sky/utils/rich_utils.py,sha256=3xdDzmn-TQXAE83EevAtOf9N4aak3Bl4ZeD33xIxjOo,11931
|
326
326
|
sky/utils/schemas.py,sha256=KJCHrn1nMZ3XqzddWuu_nFQoRQw01cZh9qh19OrRtps,30145
|
327
327
|
sky/utils/status_lib.py,sha256=zn_MSuRYQdNKF8pnFOGQ54X_s_R7dyqWS6Q3a9zENw8,1512
|
328
328
|
sky/utils/subprocess_utils.py,sha256=lqhSHoy93GsVeQgQ48C6f77bixD6yfsGQP40rbXofts,12779
|
@@ -344,9 +344,9 @@ sky/utils/kubernetes/k8s_gpu_labeler_setup.yaml,sha256=VLKT2KKimZu1GDg_4AIlIt488
|
|
344
344
|
sky/utils/kubernetes/kubernetes_deploy_utils.py,sha256=otzHzpliHDCpzYT-nU9Q0ZExbiFpDPWvhxwkvchZj7k,10073
|
345
345
|
sky/utils/kubernetes/rsync_helper.sh,sha256=h4YwrPFf9727CACnMJvF3EyK_0OeOYKKt4su_daKekw,1256
|
346
346
|
sky/utils/kubernetes/ssh_jump_lifecycle_manager.py,sha256=Kq1MDygF2IxFmu9FXpCxqucXLmeUrvs6OtRij6XTQbo,6554
|
347
|
-
skypilot_nightly-1.0.0.
|
348
|
-
skypilot_nightly-1.0.0.
|
349
|
-
skypilot_nightly-1.0.0.
|
350
|
-
skypilot_nightly-1.0.0.
|
351
|
-
skypilot_nightly-1.0.0.
|
352
|
-
skypilot_nightly-1.0.0.
|
347
|
+
skypilot_nightly-1.0.0.dev20250307.dist-info/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
|
348
|
+
skypilot_nightly-1.0.0.dev20250307.dist-info/METADATA,sha256=O26UAtGUSZuxm_xOzh_sxkbTRyED8VYZtxZwG2nPWx4,18173
|
349
|
+
skypilot_nightly-1.0.0.dev20250307.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
350
|
+
skypilot_nightly-1.0.0.dev20250307.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
|
351
|
+
skypilot_nightly-1.0.0.dev20250307.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
|
352
|
+
skypilot_nightly-1.0.0.dev20250307.dist-info/RECORD,,
|
File without changes
|
{skypilot_nightly-1.0.0.dev20250306.dist-info → skypilot_nightly-1.0.0.dev20250307.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|