skypilot-nightly 1.0.0.dev20240825__py3-none-any.whl → 1.0.0.dev20240826__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 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 = '4e7478bcf4ef837ae749a183fd74ce04dabe0d62'
8
+ _SKYPILOT_COMMIT_SHA = '6067e2bcd60c9ae48fa4fb883bbede4b98b4d545'
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.dev20240825'
38
+ __version__ = '1.0.0.dev20240826'
39
39
  __root_dir__ = os.path.dirname(os.path.abspath(__file__))
40
40
 
41
41
 
@@ -39,29 +39,30 @@ _WHEEL_PATTERN = (f'{_PACKAGE_WHEEL_NAME}-'
39
39
  f'{version.parse(sky.__version__)}-*.whl')
40
40
 
41
41
 
42
- def _get_latest_wheel_and_remove_all_others() -> pathlib.Path:
43
- wheel_name = (f'**/{_WHEEL_PATTERN}')
42
+ def _remove_stale_wheels(latest_wheel_dir: pathlib.Path) -> None:
43
+ """Remove all wheels except the latest one."""
44
+ for f in WHEEL_DIR.iterdir():
45
+ if f != latest_wheel_dir:
46
+ if f.is_dir() and not f.is_symlink():
47
+ shutil.rmtree(f, ignore_errors=True)
48
+
49
+
50
+ def _get_latest_wheel() -> pathlib.Path:
51
+ wheel_name = f'**/{_WHEEL_PATTERN}'
44
52
  try:
45
53
  latest_wheel = max(WHEEL_DIR.glob(wheel_name), key=os.path.getctime)
46
54
  except ValueError:
47
55
  raise FileNotFoundError(
48
56
  'Could not find built SkyPilot wheels with glob pattern '
49
57
  f'{wheel_name} under {WHEEL_DIR!r}') from None
50
-
51
- latest_wheel_dir_name = latest_wheel.parent
52
- # Cleanup older wheels.
53
- for f in WHEEL_DIR.iterdir():
54
- if f != latest_wheel_dir_name:
55
- if f.is_dir() and not f.is_symlink():
56
- shutil.rmtree(f, ignore_errors=True)
57
58
  return latest_wheel
58
59
 
59
60
 
60
- def _build_sky_wheel():
61
- """Build a wheel for SkyPilot."""
62
- with tempfile.TemporaryDirectory() as tmp_dir:
61
+ def _build_sky_wheel() -> pathlib.Path:
62
+ """Build a wheel for SkyPilot and return the path to the wheel."""
63
+ with tempfile.TemporaryDirectory() as tmp_dir_str:
63
64
  # prepare files
64
- tmp_dir = pathlib.Path(tmp_dir)
65
+ tmp_dir = pathlib.Path(tmp_dir_str)
65
66
  sky_tmp_dir = tmp_dir / 'sky'
66
67
  sky_tmp_dir.mkdir()
67
68
  for item in SKY_PACKAGE_PATH.iterdir():
@@ -129,6 +130,7 @@ def _build_sky_wheel():
129
130
  wheel_dir = WHEEL_DIR / hash_of_latest_wheel
130
131
  wheel_dir.mkdir(parents=True, exist_ok=True)
131
132
  shutil.move(str(wheel_path), wheel_dir)
133
+ return wheel_dir / wheel_path.name
132
134
 
133
135
 
134
136
  def build_sky_wheel() -> Tuple[pathlib.Path, str]:
@@ -161,13 +163,22 @@ def build_sky_wheel() -> Tuple[pathlib.Path, str]:
161
163
  last_modification_time = _get_latest_modification_time(SKY_PACKAGE_PATH)
162
164
  last_wheel_modification_time = _get_latest_modification_time(WHEEL_DIR)
163
165
 
164
- # only build wheels if the wheel is outdated
165
- if last_wheel_modification_time < last_modification_time:
166
+ # Only build wheels if the wheel is outdated or wheel does not exist
167
+ # for the requested version.
168
+ if (last_wheel_modification_time < last_modification_time) or not any(
169
+ WHEEL_DIR.glob(f'**/{_WHEEL_PATTERN}')):
166
170
  if not WHEEL_DIR.exists():
167
171
  WHEEL_DIR.mkdir(parents=True, exist_ok=True)
168
- _build_sky_wheel()
169
-
170
- latest_wheel = _get_latest_wheel_and_remove_all_others()
172
+ latest_wheel = _build_sky_wheel()
173
+ else:
174
+ latest_wheel = _get_latest_wheel()
175
+
176
+ # We remove all wheels except the latest one for garbage collection.
177
+ # Otherwise stale wheels will accumulate over time.
178
+ # TODO(romilb): If the user switches versions every alternate launch,
179
+ # the wheel will be rebuilt every time. At the risk of adding
180
+ # complexity, we can consider TTL caching wheels by version here.
181
+ _remove_stale_wheels(latest_wheel.parent)
171
182
 
172
183
  wheel_hash = latest_wheel.parent.name
173
184
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: skypilot-nightly
3
- Version: 1.0.0.dev20240825
3
+ Version: 1.0.0.dev20240826
4
4
  Summary: SkyPilot: An intercloud broker for the clouds
5
5
  Author: SkyPilot Team
6
6
  License: Apache 2.0
@@ -1,4 +1,4 @@
1
- sky/__init__.py,sha256=Xsw4aeSr5vw12FyGDpZcJ5ovuWrmo8r9aLK4ZRRpSDE,5588
1
+ sky/__init__.py,sha256=irQAdlzMvPbSpPhz6DApwrGhWnyaBnXANdTbIfZcdQ0,5588
2
2
  sky/authentication.py,sha256=PXKsabUKnvhoTNoNwZzo66qjCLAsuc5pQ8esVu0IYh8,20424
3
3
  sky/check.py,sha256=sqUCow5Gqqtp2ouk7tZ3whwDOK23wqyUJvcxMBsich8,9080
4
4
  sky/cli.py,sha256=XlgRr617B_yE2HV_nW01D_m5nWntW2GstutNrMp86UA,201504
@@ -33,7 +33,7 @@ sky/backends/backend_utils.py,sha256=k-DQ-xlQElzlb5KhoyoaySw8t36gmsWtgeR24TM23iw
33
33
  sky/backends/cloud_vm_ray_backend.py,sha256=EXrJdc2wqKlgPkIrKtF2GYLw-wW_U49HDb0CpaVlIMA,230185
34
34
  sky/backends/docker_utils.py,sha256=Hyw1YY20EyghhEbYx6O2FIMDcGkNzBzV9TM7LFynei8,8358
35
35
  sky/backends/local_docker_backend.py,sha256=H4GBo0KFUC_EEf-ziv1OUbfAkOI5BrwkYs9fYOxSoNw,16741
36
- sky/backends/wheel_utils.py,sha256=Kt2WOtVvOdw1DCx-wM5QydQoIMbqzcTcHvbbHa9DYY4,7297
36
+ sky/backends/wheel_utils.py,sha256=3QS4T_Ydvo4DbYhogtyADyNBEf04I6jUCL71M285shQ,7963
37
37
  sky/backends/monkey_patches/monkey_patch_ray_up.py,sha256=76-y2fCaE3JINj8lEwHT1eirYzCbpD8O1ySsysuGu8o,3450
38
38
  sky/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  sky/benchmark/benchmark_state.py,sha256=X8CXmuU9KgsDRhKedhFgjeRMUFWtQsjFs1qECvPG2yg,8723
@@ -270,9 +270,9 @@ sky/utils/kubernetes/k8s_gpu_labeler_job.yaml,sha256=KPqp23B-zQ2SZK03jdHeF9fLTog
270
270
  sky/utils/kubernetes/k8s_gpu_labeler_setup.yaml,sha256=VLKT2KKimZu1GDg_4AIlIt488oMQvhRZWwsj9vBbPUg,3812
271
271
  sky/utils/kubernetes/rsync_helper.sh,sha256=1ad-m4s8QTPxaBQxNIL8AGDfX4un6T0dxZgk-R7OLyE,154
272
272
  sky/utils/kubernetes/ssh_jump_lifecycle_manager.py,sha256=RFLJ3k7MR5UN4SKHykQ0lV9SgXumoULpKYIAt1vh-HU,6560
273
- skypilot_nightly-1.0.0.dev20240825.dist-info/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
274
- skypilot_nightly-1.0.0.dev20240825.dist-info/METADATA,sha256=G_C-q4tUdHTzTw03Te6npNjMdtPkylXVaPpf3VljFFw,18870
275
- skypilot_nightly-1.0.0.dev20240825.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
276
- skypilot_nightly-1.0.0.dev20240825.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
277
- skypilot_nightly-1.0.0.dev20240825.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
278
- skypilot_nightly-1.0.0.dev20240825.dist-info/RECORD,,
273
+ skypilot_nightly-1.0.0.dev20240826.dist-info/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
274
+ skypilot_nightly-1.0.0.dev20240826.dist-info/METADATA,sha256=Ys16mAgml6_cs23iKJzpUEWJnF1fR0b6YQUegH-uKSY,18870
275
+ skypilot_nightly-1.0.0.dev20240826.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
276
+ skypilot_nightly-1.0.0.dev20240826.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
277
+ skypilot_nightly-1.0.0.dev20240826.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
278
+ skypilot_nightly-1.0.0.dev20240826.dist-info/RECORD,,