skypilot-nightly 1.0.0.dev20250114__py3-none-any.whl → 1.0.0.dev20250115__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 = '35f0cf4cf8fee06aadcac639740d25c7493b5534'
8
+ _SKYPILOT_COMMIT_SHA = 'd9bb51a66a33ed06f9f0c791ac3ed5ad93ffa587'
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.dev20250114'
38
+ __version__ = '1.0.0.dev20250115'
39
39
  __root_dir__ = os.path.dirname(os.path.abspath(__file__))
40
40
 
41
41
 
@@ -115,6 +115,16 @@ def _list_accelerators(
115
115
 
116
116
  If the user does not have sufficient permissions to list pods in all
117
117
  namespaces, the function will return free GPUs as -1.
118
+
119
+ Returns:
120
+ A tuple of three dictionaries:
121
+ - qtys_map: Dict mapping accelerator names to lists of InstanceTypeInfo
122
+ objects with quantity information.
123
+ - total_accelerators_capacity: Dict mapping accelerator names to their
124
+ total capacity in the cluster.
125
+ - total_accelerators_available: Dict mapping accelerator names to their
126
+ current availability. Returns -1 for each accelerator if
127
+ realtime=False or if insufficient permissions.
118
128
  """
119
129
  # TODO(romilb): This should be refactored to use get_kubernetes_node_info()
120
130
  # function from kubernetes_utils.
@@ -243,6 +253,10 @@ def _list_accelerators(
243
253
 
244
254
  accelerators_available = accelerator_count - allocated_qty
245
255
 
256
+ # Initialize the entry if it doesn't exist yet
257
+ if accelerator_name not in total_accelerators_available:
258
+ total_accelerators_available[accelerator_name] = 0
259
+
246
260
  if accelerators_available >= min_quantity_filter:
247
261
  quantized_availability = min_quantity_filter * (
248
262
  accelerators_available // min_quantity_filter)
sky/utils/db_utils.py CHANGED
@@ -4,11 +4,27 @@ import sqlite3
4
4
  import threading
5
5
  from typing import Any, Callable, Optional
6
6
 
7
+ # This parameter (passed to sqlite3.connect) controls how long we will wait to
8
+ # obtains a database lock (not necessarily during connection, but whenever it is
9
+ # needed). It is not a connection timeout.
10
+ # Even in WAL mode, only a single writer is allowed at a time. Other writers
11
+ # will block until the write lock can be obtained. This behavior is described in
12
+ # the SQLite documentation for WAL: https://www.sqlite.org/wal.html
13
+ # Python's default timeout is 5s. In normal usage, lock contention is very low,
14
+ # and this is more than sufficient. However, in some highly concurrent cases,
15
+ # such as a jobs controller suddenly recovering thousands of jobs at once, we
16
+ # can see a small number of processes that take much longer to obtain the lock.
17
+ # In contrived highly contentious cases, around 0.1% of transactions will take
18
+ # >30s to take the lock. We have not seen cases that take >60s. For cases up to
19
+ # 1000x parallelism, this is thus thought to be a conservative setting.
20
+ # For more info, see the PR description for #4552.
21
+ _DB_TIMEOUT_S = 60
22
+
7
23
 
8
24
  @contextlib.contextmanager
9
25
  def safe_cursor(db_path: str):
10
26
  """A newly created, auto-committing, auto-closing cursor."""
11
- conn = sqlite3.connect(db_path)
27
+ conn = sqlite3.connect(db_path, timeout=_DB_TIMEOUT_S)
12
28
  cursor = conn.cursor()
13
29
  try:
14
30
  yield cursor
@@ -79,8 +95,6 @@ class SQLiteConn(threading.local):
79
95
  def __init__(self, db_path: str, create_table: Callable):
80
96
  super().__init__()
81
97
  self.db_path = db_path
82
- # NOTE: We use a timeout of 10 seconds to avoid database locked
83
- # errors. This is a hack, but it works.
84
- self.conn = sqlite3.connect(db_path, timeout=10)
98
+ self.conn = sqlite3.connect(db_path, timeout=_DB_TIMEOUT_S)
85
99
  self.cursor = self.conn.cursor()
86
100
  create_table(self.cursor, self.conn)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: skypilot-nightly
3
- Version: 1.0.0.dev20250114
3
+ Version: 1.0.0.dev20250115
4
4
  Summary: SkyPilot: An intercloud broker for the clouds
5
5
  Author: SkyPilot Team
6
6
  License: Apache 2.0
@@ -351,6 +351,8 @@ Read the research:
351
351
  - [Sky Computing vision paper](https://sigops.org/s/conferences/hotos/2021/papers/hotos21-s02-stoica.pdf) (HotOS 2021)
352
352
  - [Policy for Managed Spot Jobs](https://www.usenix.org/conference/nsdi24/presentation/wu-zhanghao) (NSDI 2024)
353
353
 
354
+ SkyPilot was initially started at the [Sky Computing Lab](https://sky.cs.berkeley.edu) at UC Berkeley and has since gained many industry contributors. Read more about the project's origin [here](https://docs.skypilot.co/en/latest/sky-computing.html).
355
+
354
356
  ## Support and Questions
355
357
  We are excited to hear your feedback!
356
358
  * For issues and feature requests, please [open a GitHub issue](https://github.com/skypilot-org/skypilot/issues/new).
@@ -1,4 +1,4 @@
1
- sky/__init__.py,sha256=8Saq3iWLIsCns9jB3ywi08wxlNICyDj6uFxY4ej12OA,5944
1
+ sky/__init__.py,sha256=UAjMZW9jvx-0gdHn5FPa2lTkzlErK7Hu0pqF32A7B1c,5944
2
2
  sky/admin_policy.py,sha256=hPo02f_A32gCqhUueF0QYy1fMSSKqRwYEg_9FxScN_s,3248
3
3
  sky/authentication.py,sha256=LXUDABKP1FJCS256xTTDJa40WXwHKF5x49S-4hZbD1M,21501
4
4
  sky/check.py,sha256=s8deMVL-k9y8gd519K7NWZc3DqWsEySwiAr0uH3Vvcc,9459
@@ -68,7 +68,7 @@ sky/clouds/service_catalog/do_catalog.py,sha256=Cug2QaQlSN6nFhba7f1ksyzs6z0ICTj6
68
68
  sky/clouds/service_catalog/fluidstack_catalog.py,sha256=21-cvrYEYTIi7n3ZNF2e7_0QX-PF4BkhlVJUWQOvKrY,5059
69
69
  sky/clouds/service_catalog/gcp_catalog.py,sha256=jJEfWjZ4ItsE657LjIf9mruJVZERFegCD5Qtu20AFNc,24542
70
70
  sky/clouds/service_catalog/ibm_catalog.py,sha256=1iK0KvbI82U7sySb7chr-qm_16x3tTnZ6nIo7o76ouc,4493
71
- sky/clouds/service_catalog/kubernetes_catalog.py,sha256=D0DvhVlK6Z6HJcZHPOWqRNAbXgFaQOKUnS_xkmqzukA,12550
71
+ sky/clouds/service_catalog/kubernetes_catalog.py,sha256=449eTIw-ZIwliMWGPx6ENAYuX8nW2M4kO4mh5V3cea4,13268
72
72
  sky/clouds/service_catalog/lambda_catalog.py,sha256=2R-ccu63BbdvO6X80MtxiniA-jLewXb6I0Ye1rYD9fY,5302
73
73
  sky/clouds/service_catalog/oci_catalog.py,sha256=cyA6ZqwHGOKuPxUl_dKmFGdeWdQGMrvl_-o2MtyF998,8580
74
74
  sky/clouds/service_catalog/paperspace_catalog.py,sha256=MOlfoGRChjEwMzu4nRAho8DrIwwUJ3QlRzrMA1RLqvE,3789
@@ -264,7 +264,7 @@ sky/utils/common_utils.py,sha256=Kh0iymQl9I4HXxYSc3TTcv-xeso27pU_1hGNOc9Xw2o,253
264
264
  sky/utils/control_master_utils.py,sha256=90hnxiAUP20gbJ9e3MERh7rb04ZO_I3LsljNjR26H5I,1416
265
265
  sky/utils/controller_utils.py,sha256=g4wvp6BrXUcwjRbMvy_LBtZPMPOzHXeRWyEoXORoZrU,44381
266
266
  sky/utils/dag_utils.py,sha256=R1yhJssvzDg13p6PJIC8OkYFBiR64eIx5xQeRpAG9n4,6099
267
- sky/utils/db_utils.py,sha256=AOvMmBEN9cF4I7CoXihPCtus4mU2VDGjBQSVMMgzKlA,2786
267
+ sky/utils/db_utils.py,sha256=K2-OHPg0FeHCarevMdWe0IWzm6wWumViEeYeJuGoFUE,3747
268
268
  sky/utils/env_options.py,sha256=E5iwRFBUY2Iq6e0y0c1Mv5OSQ4MRNdk0-p38xUyVerc,1366
269
269
  sky/utils/kubernetes_enums.py,sha256=imGqHSa8O07zD_6xH1SDMM7dBU5lF5fzFFlQuQy00QM,1384
270
270
  sky/utils/log_utils.py,sha256=xEbUZfDiIiZkyWoLHXwIcqVMCBDEENsLCiogEXMDLt0,14139
@@ -288,9 +288,9 @@ sky/utils/kubernetes/k8s_gpu_labeler_job.yaml,sha256=k0TBoQ4zgf79-sVkixKSGYFHQ7Z
288
288
  sky/utils/kubernetes/k8s_gpu_labeler_setup.yaml,sha256=VLKT2KKimZu1GDg_4AIlIt488oMQvhRZWwsj9vBbPUg,3812
289
289
  sky/utils/kubernetes/rsync_helper.sh,sha256=h4YwrPFf9727CACnMJvF3EyK_0OeOYKKt4su_daKekw,1256
290
290
  sky/utils/kubernetes/ssh_jump_lifecycle_manager.py,sha256=Kq1MDygF2IxFmu9FXpCxqucXLmeUrvs6OtRij6XTQbo,6554
291
- skypilot_nightly-1.0.0.dev20250114.dist-info/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
292
- skypilot_nightly-1.0.0.dev20250114.dist-info/METADATA,sha256=NRUZuDh7YqD-D3dPuCRRLGK19a88kgP5BQr-UOkJHcQ,20632
293
- skypilot_nightly-1.0.0.dev20250114.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
294
- skypilot_nightly-1.0.0.dev20250114.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
295
- skypilot_nightly-1.0.0.dev20250114.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
296
- skypilot_nightly-1.0.0.dev20250114.dist-info/RECORD,,
291
+ skypilot_nightly-1.0.0.dev20250115.dist-info/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
292
+ skypilot_nightly-1.0.0.dev20250115.dist-info/METADATA,sha256=-lAA4FLTOtuusE4mPzY1fSOIimvAVooos0h4Og89Hzs,20884
293
+ skypilot_nightly-1.0.0.dev20250115.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
294
+ skypilot_nightly-1.0.0.dev20250115.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
295
+ skypilot_nightly-1.0.0.dev20250115.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
296
+ skypilot_nightly-1.0.0.dev20250115.dist-info/RECORD,,