skypilot-nightly 1.0.0.dev20250602__py3-none-any.whl → 1.0.0.dev20250604__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.
Files changed (138) hide show
  1. sky/__init__.py +3 -3
  2. sky/adaptors/kubernetes.py +8 -0
  3. sky/backends/backend_utils.py +1 -0
  4. sky/backends/cloud_vm_ray_backend.py +8 -4
  5. sky/{clouds/service_catalog → catalog}/__init__.py +6 -17
  6. sky/{clouds/service_catalog → catalog}/aws_catalog.py +3 -3
  7. sky/{clouds/service_catalog → catalog}/azure_catalog.py +2 -2
  8. sky/{clouds/service_catalog → catalog}/common.py +10 -8
  9. sky/{clouds/service_catalog → catalog}/cudo_catalog.py +1 -1
  10. sky/{clouds/service_catalog → catalog}/data_fetchers/analyze.py +1 -1
  11. sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_aws.py +1 -1
  12. sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_vsphere.py +1 -1
  13. sky/{clouds/service_catalog → catalog}/do_catalog.py +1 -1
  14. sky/{clouds/service_catalog → catalog}/fluidstack_catalog.py +1 -1
  15. sky/{clouds/service_catalog → catalog}/gcp_catalog.py +2 -2
  16. sky/{clouds/service_catalog → catalog}/ibm_catalog.py +1 -1
  17. sky/{clouds/service_catalog → catalog}/kubernetes_catalog.py +2 -2
  18. sky/{clouds/service_catalog → catalog}/lambda_catalog.py +1 -1
  19. sky/{clouds/service_catalog → catalog}/nebius_catalog.py +1 -1
  20. sky/{clouds/service_catalog → catalog}/oci_catalog.py +1 -1
  21. sky/{clouds/service_catalog → catalog}/paperspace_catalog.py +1 -1
  22. sky/{clouds/service_catalog → catalog}/runpod_catalog.py +1 -1
  23. sky/{clouds/service_catalog → catalog}/scp_catalog.py +1 -1
  24. sky/{clouds/service_catalog → catalog}/ssh_catalog.py +3 -3
  25. sky/{clouds/service_catalog → catalog}/vast_catalog.py +1 -1
  26. sky/{clouds/service_catalog → catalog}/vsphere_catalog.py +1 -1
  27. sky/cli.py +7 -6
  28. sky/client/cli.py +7 -6
  29. sky/client/sdk.py +3 -4
  30. sky/clouds/aws.py +41 -40
  31. sky/clouds/azure.py +31 -34
  32. sky/clouds/cloud.py +8 -8
  33. sky/clouds/cudo.py +26 -26
  34. sky/clouds/do.py +24 -24
  35. sky/clouds/fluidstack.py +27 -29
  36. sky/clouds/gcp.py +45 -48
  37. sky/clouds/ibm.py +26 -26
  38. sky/clouds/kubernetes.py +24 -12
  39. sky/clouds/lambda_cloud.py +28 -30
  40. sky/clouds/nebius.py +26 -28
  41. sky/clouds/oci.py +32 -32
  42. sky/clouds/paperspace.py +24 -26
  43. sky/clouds/runpod.py +26 -28
  44. sky/clouds/scp.py +37 -36
  45. sky/clouds/utils/gcp_utils.py +3 -2
  46. sky/clouds/vast.py +27 -27
  47. sky/clouds/vsphere.py +12 -15
  48. sky/core.py +2 -2
  49. sky/dashboard/out/404.html +1 -1
  50. sky/dashboard/out/_next/static/chunks/236-fef38aa6e5639300.js +6 -0
  51. sky/dashboard/out/_next/static/chunks/37-947904ccc5687bac.js +6 -0
  52. sky/dashboard/out/_next/static/chunks/682-2be9b0f169727f2f.js +6 -0
  53. sky/dashboard/out/_next/static/chunks/856-f1b1f7f47edde2e8.js +1 -0
  54. sky/dashboard/out/_next/static/chunks/969-d7b6fb7f602bfcb3.js +1 -0
  55. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-158b70da336d8607.js +6 -0
  56. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-62c9982dc3675725.js +6 -0
  57. sky/dashboard/out/_next/static/chunks/pages/{clusters-f37ff20f0af29aae.js → clusters-5549a350f97d7ef3.js} +1 -1
  58. sky/dashboard/out/_next/static/chunks/pages/config-35383adcb0edb5e2.js +6 -0
  59. sky/dashboard/out/_next/static/chunks/pages/infra/{[context]-342bc15bb78ab2e5.js → [context]-b68ddeed712d45b5.js} +1 -1
  60. sky/dashboard/out/_next/static/chunks/pages/{infra-7b4b8e7fa9fa0827.js → infra-13b117a831702196.js} +1 -1
  61. sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-a62a3c65dc9bc57c.js +11 -0
  62. sky/dashboard/out/_next/static/chunks/pages/{jobs-78a6c5ba3e24c0cf.js → jobs-a76b2700eca236f7.js} +1 -1
  63. sky/dashboard/out/_next/static/chunks/pages/{users-89f9212b81d8897e.js → users-07b523ccb19317ad.js} +1 -1
  64. sky/dashboard/out/_next/static/chunks/pages/workspace/{new-198b6e00d7d724c5.js → new-c7516f2b4c3727c0.js} +1 -1
  65. sky/dashboard/out/_next/static/chunks/pages/workspaces/{[name]-2ce792183b03c341.js → [name]-7799de9e691e35d8.js} +1 -1
  66. sky/dashboard/out/_next/static/chunks/pages/workspaces-f54921ec9eb20965.js +1 -0
  67. sky/dashboard/out/_next/static/css/63d3995d8b528eb1.css +3 -0
  68. sky/dashboard/out/_next/static/vWwfD3jOky5J5jULHp8JT/_buildManifest.js +1 -0
  69. sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
  70. sky/dashboard/out/clusters/[cluster].html +1 -1
  71. sky/dashboard/out/clusters.html +1 -1
  72. sky/dashboard/out/config.html +1 -1
  73. sky/dashboard/out/index.html +1 -1
  74. sky/dashboard/out/infra/[context].html +1 -1
  75. sky/dashboard/out/infra.html +1 -1
  76. sky/dashboard/out/jobs/[job].html +1 -1
  77. sky/dashboard/out/jobs.html +1 -1
  78. sky/dashboard/out/users.html +1 -1
  79. sky/dashboard/out/workspace/new.html +1 -1
  80. sky/dashboard/out/workspaces/[name].html +1 -1
  81. sky/dashboard/out/workspaces.html +1 -1
  82. sky/data/storage_utils.py +5 -2
  83. sky/execution.py +1 -2
  84. sky/global_user_state.py +2 -4
  85. sky/jobs/server/core.py +1 -1
  86. sky/jobs/utils.py +31 -1
  87. sky/optimizer.py +1 -1
  88. sky/provision/cudo/cudo_machine_type.py +1 -1
  89. sky/provision/gcp/constants.py +4 -0
  90. sky/provision/kubernetes/utils.py +35 -22
  91. sky/provision/vast/utils.py +1 -1
  92. sky/provision/vsphere/common/vim_utils.py +1 -2
  93. sky/provision/vsphere/instance.py +1 -1
  94. sky/provision/vsphere/vsphere_utils.py +7 -11
  95. sky/resources.py +33 -2
  96. sky/serve/server/core.py +1 -1
  97. sky/server/common.py +86 -53
  98. sky/server/constants.py +1 -1
  99. sky/server/requests/executor.py +4 -1
  100. sky/server/requests/payloads.py +16 -0
  101. sky/server/requests/serializers/decoders.py +1 -1
  102. sky/server/server.py +3 -3
  103. sky/skypilot_config.py +88 -37
  104. sky/usage/usage_lib.py +4 -3
  105. sky/utils/accelerator_registry.py +3 -3
  106. sky/utils/controller_utils.py +4 -14
  107. sky/utils/kubernetes/deploy_remote_cluster.py +2 -1
  108. sky/utils/schemas.py +6 -9
  109. {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/METADATA +1 -1
  110. {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/RECORD +127 -126
  111. sky/dashboard/out/_next/static/chunks/236-7458fda7b295f305.js +0 -6
  112. sky/dashboard/out/_next/static/chunks/37-b638675d511d58b4.js +0 -6
  113. sky/dashboard/out/_next/static/chunks/682-5c12535476a21ce3.js +0 -6
  114. sky/dashboard/out/_next/static/chunks/856-ab9627e7e8ac35e8.js +0 -1
  115. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-8f270e2c9c59fa1a.js +0 -6
  116. sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-25edb867a41b6b20.js +0 -6
  117. sky/dashboard/out/_next/static/chunks/pages/config-3c6a2dabf56e8cd6.js +0 -6
  118. sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-c0c1dff3cd463d9e.js +0 -11
  119. sky/dashboard/out/_next/static/chunks/pages/workspaces-17d41826537196e7.js +0 -1
  120. sky/dashboard/out/_next/static/css/2b3ee34e586949a3.css +0 -3
  121. sky/dashboard/out/_next/static/dev-ndwjPgd_uQ4dcXXiv/_buildManifest.js +0 -1
  122. /sky/{clouds/service_catalog → catalog}/config.py +0 -0
  123. /sky/{clouds/service_catalog → catalog}/constants.py +0 -0
  124. /sky/{clouds/service_catalog → catalog}/data_fetchers/__init__.py +0 -0
  125. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_azure.py +0 -0
  126. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_cudo.py +0 -0
  127. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_fluidstack.py +0 -0
  128. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_gcp.py +0 -0
  129. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_ibm.py +0 -0
  130. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_lambda_cloud.py +0 -0
  131. /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_vast.py +0 -0
  132. /sky/dashboard/out/_next/static/chunks/{843-786c36624d5ff61f.js → 843-a097338acb89b7d7.js} +0 -0
  133. /sky/dashboard/out/_next/static/chunks/pages/{_app-ad1edd7fe17ea796.js → _app-67925f5e6382e22f.js} +0 -0
  134. /sky/dashboard/out/_next/static/{dev-ndwjPgd_uQ4dcXXiv → vWwfD3jOky5J5jULHp8JT}/_ssgManifest.js +0 -0
  135. {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/WHEEL +0 -0
  136. {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/entry_points.txt +0 -0
  137. {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/licenses/LICENSE +0 -0
  138. {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.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 = '9c73386fdafb1dc43a5e83fbf16e67ba3fa5dbf8'
8
+ _SKYPILOT_COMMIT_SHA = '3c15a1fa980f6ac4d4ed742bb2e538dcf3c6650f'
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.dev20250602'
38
+ __version__ = '1.0.0.dev20250604'
39
39
  __root_dir__ = os.path.dirname(os.path.abspath(__file__))
40
40
 
41
41
 
@@ -86,6 +86,7 @@ from sky import clouds
86
86
  from sky.admin_policy import AdminPolicy
87
87
  from sky.admin_policy import MutatedUserRequest
88
88
  from sky.admin_policy import UserRequest
89
+ from sky.catalog import list_accelerators
89
90
  from sky.client.sdk import api_cancel
90
91
  from sky.client.sdk import api_info
91
92
  from sky.client.sdk import api_server_logs
@@ -110,7 +111,6 @@ from sky.client.sdk import storage_delete
110
111
  from sky.client.sdk import storage_ls
111
112
  from sky.client.sdk import stream_and_get
112
113
  from sky.client.sdk import tail_logs
113
- from sky.clouds.service_catalog import list_accelerators
114
114
  from sky.dag import Dag
115
115
  from sky.data import Storage
116
116
  from sky.data import StorageMode
@@ -1,6 +1,7 @@
1
1
  """Kubernetes adaptors"""
2
2
  import logging
3
3
  import os
4
+ import platform
4
5
  from typing import Any, Callable, Optional, Set
5
6
 
6
7
  from sky import sky_logging
@@ -19,6 +20,13 @@ urllib3 = common.LazyImport('urllib3',
19
20
  # Timeout to use for API calls
20
21
  API_TIMEOUT = 5
21
22
 
23
+ # Check if KUBECONFIG is set, and use it if it is.
24
+ DEFAULT_KUBECONFIG_PATH = '~/.kube/config'
25
+ # From kubernetes package, keep a copy here to avoid actually importing
26
+ # kubernetes package when parsing the KUBECONFIG env var to do credential
27
+ # file mounts.
28
+ ENV_KUBECONFIG_PATH_SEPARATOR = ';' if platform.system() == 'Windows' else ':'
29
+
22
30
  DEFAULT_IN_CLUSTER_REGION = 'in-cluster'
23
31
  # The name for the environment variable that stores the in-cluster context name
24
32
  # for Kubernetes clusters. This is used to associate a name with the current
@@ -2836,6 +2836,7 @@ def get_task_resources_str(task: 'task_lib.Task',
2836
2836
  if is_managed_job:
2837
2837
  if task.best_resources.use_spot:
2838
2838
  spot_str = '[Spot]'
2839
+ assert task.best_resources.cpus is not None
2839
2840
  task_cpu_demand = task.best_resources.cpus
2840
2841
  if accelerator_dict is None:
2841
2842
  resources_str = f'CPU:{task_cpu_demand}'
@@ -24,6 +24,7 @@ import filelock
24
24
 
25
25
  import sky
26
26
  from sky import backends
27
+ from sky import catalog
27
28
  from sky import check as sky_check
28
29
  from sky import cloud_stores
29
30
  from sky import clouds
@@ -39,7 +40,6 @@ from sky import task as task_lib
39
40
  from sky.backends import backend_utils
40
41
  from sky.backends import wheel_utils
41
42
  from sky.clouds import cloud as sky_cloud
42
- from sky.clouds import service_catalog
43
43
  from sky.clouds.utils import gcp_utils
44
44
  from sky.data import data_utils
45
45
  from sky.data import storage as storage_lib
@@ -699,6 +699,10 @@ class RayCodeGen:
699
699
  # 139 is the return code of SIGSEGV, i.e. Segmentation Fault.
700
700
  if any(r == 139 for r in returncodes):
701
701
  reason = '(likely due to Segmentation Fault)'
702
+ if any(r == 137 for r in returncodes):
703
+ # Find the first non-137 return code
704
+ non_137 = next(r for r in returncodes if r != 137)
705
+ reason = f'(A Worker failed with return code {{non_137}}, SkyPilot cleaned up the processes on other nodes with return code 137)'
702
706
  print('ERROR: {colorama.Fore.RED}Job {self.job_id} failed with '
703
707
  'return code list:{colorama.Style.RESET_ALL}',
704
708
  returncodes,
@@ -803,7 +807,7 @@ class FailoverCloudErrorHandlerV1:
803
807
  # Sometimes, SCPError will list available regions.
804
808
  for e in errors:
805
809
  if e.find('Regions with capacity available:') != -1:
806
- for r in service_catalog.regions('scp'):
810
+ for r in catalog.regions('scp'):
807
811
  if e.find(r.name) == -1:
808
812
  _add_to_blocked_resources(
809
813
  blocked_resources,
@@ -1088,7 +1092,7 @@ class FailoverCloudErrorHandlerV2:
1088
1092
  output = str(error)
1089
1093
  # Sometimes, lambda cloud error will list available regions.
1090
1094
  if output.find('Regions with capacity available:') != -1:
1091
- for r in service_catalog.regions('lambda'):
1095
+ for r in catalog.regions('lambda'):
1092
1096
  if output.find(r.name) == -1:
1093
1097
  _add_to_blocked_resources(
1094
1098
  blocked_resources,
@@ -2696,7 +2700,7 @@ class CloudVmRayBackend(backends.Backend['CloudVmRayResourceHandle']):
2696
2700
  NAME = 'cloudvmray'
2697
2701
 
2698
2702
  # Backward compatibility, with the old name of the handle.
2699
- ResourceHandle = CloudVmRayResourceHandle # pylint: disable=invalid-name
2703
+ ResourceHandle = CloudVmRayResourceHandle # type: ignore
2700
2704
 
2701
2705
  def __init__(self):
2702
2706
  self.run_timestamp = sky_logging.get_run_timestamp()
@@ -4,26 +4,21 @@ import importlib
4
4
  import typing
5
5
  from typing import Dict, List, Optional, Set, Tuple, Union
6
6
 
7
- from sky.clouds.service_catalog.config import fallback_to_default_catalog
8
- from sky.clouds.service_catalog.constants import ALL_CLOUDS
9
- from sky.clouds.service_catalog.constants import CATALOG_DIR
10
- from sky.clouds.service_catalog.constants import CATALOG_SCHEMA_VERSION
11
- from sky.clouds.service_catalog.constants import HOSTED_CATALOG_DIR_URL
12
- from sky.clouds.service_catalog.constants import (
13
- HOSTED_CATALOG_DIR_URL_S3_MIRROR)
7
+ from sky.catalog import constants as service_catalog_constants
8
+ from sky.catalog.config import fallback_to_default_catalog
14
9
  from sky.utils import resources_utils
15
10
  from sky.utils import subprocess_utils
16
11
 
17
12
  if typing.TYPE_CHECKING:
13
+ from sky.catalog import common
18
14
  from sky.clouds import cloud
19
- from sky.clouds.service_catalog import common
20
15
 
21
16
  CloudFilter = Optional[Union[List[str], str]]
22
17
 
23
18
 
24
19
  def _map_clouds_catalog(clouds: CloudFilter, method_name: str, *args, **kwargs):
25
20
  if clouds is None:
26
- clouds = list(ALL_CLOUDS)
21
+ clouds = list(service_catalog_constants.ALL_CLOUDS)
27
22
 
28
23
  # TODO(hemil): Remove this once the common service catalog
29
24
  # functions are refactored from clouds/kubernetes.py to
@@ -37,10 +32,10 @@ def _map_clouds_catalog(clouds: CloudFilter, method_name: str, *args, **kwargs):
37
32
  def _execute_catalog_method(cloud: str):
38
33
  try:
39
34
  cloud_module = importlib.import_module(
40
- f'sky.clouds.service_catalog.{cloud.lower()}_catalog')
35
+ f'sky.catalog.{cloud.lower()}_catalog')
41
36
  except ModuleNotFoundError:
42
37
  raise ValueError(
43
- 'Cannot find module "sky.clouds.service_catalog'
38
+ 'Cannot find module "sky.catalog'
44
39
  f'.{cloud}_catalog" for cloud "{cloud}".') from None
45
40
  try:
46
41
  method = getattr(cloud_module, method_name)
@@ -382,10 +377,4 @@ __all__ = [
382
377
  'is_image_tag_valid',
383
378
  # Configuration
384
379
  'fallback_to_default_catalog',
385
- # Constants
386
- 'ALL_CLOUDS',
387
- 'HOSTED_CATALOG_DIR_URL',
388
- 'HOSTED_CATALOG_DIR_URL_S3_MIRROR',
389
- 'CATALOG_SCHEMA_VERSION',
390
- 'CATALOG_DIR',
391
380
  ]
@@ -13,10 +13,10 @@ from typing import Dict, List, Optional, Tuple, Union
13
13
  from sky import exceptions
14
14
  from sky import sky_logging
15
15
  from sky.adaptors import common as adaptors_common
16
+ from sky.catalog import common
17
+ from sky.catalog import config
18
+ from sky.catalog.data_fetchers import fetch_aws
16
19
  from sky.clouds import aws
17
- from sky.clouds.service_catalog import common
18
- from sky.clouds.service_catalog import config
19
- from sky.clouds.service_catalog.data_fetchers import fetch_aws
20
20
  from sky.utils import common_utils
21
21
  from sky.utils import resources_utils
22
22
  from sky.utils import rich_utils
@@ -8,8 +8,8 @@ from typing import Dict, List, Optional, Tuple, Union
8
8
 
9
9
  from sky import clouds as cloud_lib
10
10
  from sky import sky_logging
11
+ from sky.catalog import common
11
12
  from sky.clouds import Azure
12
- from sky.clouds.service_catalog import common
13
13
  from sky.utils import resources_utils
14
14
  from sky.utils import ux_utils
15
15
 
@@ -17,7 +17,7 @@ logger = sky_logging.init_logger(__name__)
17
17
 
18
18
  # This list should match the list of regions in
19
19
  # skypilot image generation Packer script's replication_regions
20
- # sky/clouds/service_catalog/images/skypilot-azure-cpu-ubuntu.pkr.hcl
20
+ # sky/clouds/catalog/images/skypilot-azure-cpu-ubuntu.pkr.hcl
21
21
  COMMUNITY_IMAGE_AVAILABLE_REGIONS = {
22
22
  'centralus',
23
23
  'eastus',
@@ -11,8 +11,8 @@ import filelock
11
11
 
12
12
  from sky import sky_logging
13
13
  from sky.adaptors import common as adaptors_common
14
+ from sky.catalog import constants as service_catalog_constants
14
15
  from sky.clouds import cloud as cloud_lib
15
- from sky.clouds.service_catalog import constants
16
16
  from sky.utils import common_utils
17
17
  from sky.utils import registry
18
18
  from sky.utils import rich_utils
@@ -28,7 +28,8 @@ else:
28
28
  logger = sky_logging.init_logger(__name__)
29
29
 
30
30
  _ABSOLUTE_VERSIONED_CATALOG_DIR = os.path.join(
31
- os.path.expanduser(constants.CATALOG_DIR), constants.CATALOG_SCHEMA_VERSION)
31
+ os.path.expanduser(service_catalog_constants.CATALOG_DIR),
32
+ service_catalog_constants.CATALOG_SCHEMA_VERSION)
32
33
  os.makedirs(_ABSOLUTE_VERSIONED_CATALOG_DIR, exist_ok=True)
33
34
 
34
35
 
@@ -95,7 +96,7 @@ def get_modified_catalog_file_mounts() -> Dict[str, str]:
95
96
  def _get_modified_catalogs() -> List[str]:
96
97
  """Returns a list of modified catalogs relative to the catalog dir."""
97
98
  modified_catalogs = []
98
- for cloud_name in constants.ALL_CLOUDS:
99
+ for cloud_name in service_catalog_constants.ALL_CLOUDS:
99
100
  cloud_catalog_dir = os.path.join(_ABSOLUTE_VERSIONED_CATALOG_DIR,
100
101
  cloud_name)
101
102
  if not os.path.exists(cloud_catalog_dir):
@@ -113,8 +114,9 @@ def get_modified_catalog_file_mounts() -> Dict[str, str]:
113
114
  modified_catalog_path_map = {} # Map of remote: local catalog paths
114
115
  for catalog in modified_catalog_list:
115
116
  # Use relative paths for remote to handle varying usernames on the cloud
116
- remote_path = os.path.join(constants.CATALOG_DIR,
117
- constants.CATALOG_SCHEMA_VERSION, catalog)
117
+ remote_path = os.path.join(
118
+ service_catalog_constants.CATALOG_DIR,
119
+ service_catalog_constants.CATALOG_SCHEMA_VERSION, catalog)
118
120
  local_path = os.path.expanduser(remote_path)
119
121
  modified_catalog_path_map[remote_path] = local_path
120
122
  return modified_catalog_path_map
@@ -196,8 +198,8 @@ def read_catalog(filename: str,
196
198
  # Atomic check, to avoid conflicts with other processes.
197
199
  with filelock.FileLock(meta_path + '.lock'):
198
200
  if _need_update():
199
- url = f'{constants.HOSTED_CATALOG_DIR_URL}/{constants.CATALOG_SCHEMA_VERSION}/{filename}' # pylint: disable=line-too-long
200
- url_fallback = f'{constants.HOSTED_CATALOG_DIR_URL_S3_MIRROR}/{constants.CATALOG_SCHEMA_VERSION}/{filename}' # pylint: disable=line-too-long
201
+ url = f'{service_catalog_constants.HOSTED_CATALOG_DIR_URL}/{service_catalog_constants.CATALOG_SCHEMA_VERSION}/{filename}' # pylint: disable=line-too-long
202
+ url_fallback = f'{service_catalog_constants.HOSTED_CATALOG_DIR_URL_S3_MIRROR}/{service_catalog_constants.CATALOG_SCHEMA_VERSION}/{filename}' # pylint: disable=line-too-long
201
203
  headers = {'User-Agent': 'SkyPilot/0.7'}
202
204
  update_frequency_str = ''
203
205
  if pull_frequency_hours is not None:
@@ -344,7 +346,7 @@ def get_hourly_cost_impl(
344
346
  ) -> float:
345
347
  """Returns the hourly price of a VM instance in the given region and zone.
346
348
 
347
- Refer to get_hourly_cost in service_catalog/__init__.py for the docstring.
349
+ Refer to get_hourly_cost in catalog/__init__.py for the docstring.
348
350
  """
349
351
  df = _get_instance_type(df, instance_type, region, zone)
350
352
  if df.empty:
@@ -3,7 +3,7 @@
3
3
  import typing
4
4
  from typing import Dict, List, Optional, Tuple, Union
5
5
 
6
- from sky.clouds.service_catalog import common
6
+ from sky.catalog import common
7
7
  import sky.provision.cudo.cudo_machine_type as cudo_mt
8
8
  from sky.utils import ux_utils
9
9
 
@@ -3,7 +3,7 @@ import typing
3
3
  from typing import List
4
4
 
5
5
  from sky.adaptors import common as adaptors_common
6
- from sky.clouds.service_catalog import common
6
+ from sky.catalog import common
7
7
 
8
8
  if typing.TYPE_CHECKING:
9
9
  import pandas as pd
@@ -546,7 +546,7 @@ if __name__ == '__main__':
546
546
  print('AWS Service Catalog saved to aws/vms.csv')
547
547
 
548
548
  # Disable refreshing images.csv as we are using skypilot custom AMIs
549
- # See sky/clouds/service_catalog/images/README.md for more details.
549
+ # See sky/clouds/catalog/images/README.md for more details.
550
550
  # image_df = get_all_regions_images_df(user_regions)
551
551
  # _check_regions_integrity(image_df, 'images')
552
552
 
@@ -6,7 +6,7 @@ import typing
6
6
 
7
7
  from sky.adaptors import common as adaptors_common
8
8
  from sky.adaptors import vsphere as vsphere_adaptor
9
- from sky.clouds.service_catalog.common import get_catalog_path
9
+ from sky.catalog.common import get_catalog_path
10
10
  from sky.provision.vsphere.common.cls_api_client import ClsApiClient
11
11
 
12
12
  if typing.TYPE_CHECKING:
@@ -7,7 +7,7 @@ query instance types and pricing information for digital ocean.
7
7
  import typing
8
8
  from typing import Dict, List, Optional, Tuple, Union
9
9
 
10
- from sky.clouds.service_catalog import common
10
+ from sky.catalog import common
11
11
  from sky.utils import ux_utils
12
12
 
13
13
  if typing.TYPE_CHECKING:
@@ -6,7 +6,7 @@ instance types and pricing information for FluidStack.
6
6
  import typing
7
7
  from typing import Dict, List, Optional, Tuple, Union
8
8
 
9
- from sky.clouds.service_catalog import common
9
+ from sky.catalog import common
10
10
  from sky.utils import ux_utils
11
11
 
12
12
  if typing.TYPE_CHECKING:
@@ -9,8 +9,8 @@ from typing import Dict, List, Optional, Tuple
9
9
  from sky import exceptions
10
10
  from sky import sky_logging
11
11
  from sky.adaptors import common as adaptors_common
12
+ from sky.catalog import common
12
13
  from sky.clouds import GCP
13
- from sky.clouds.service_catalog import common
14
14
  from sky.utils import resources_utils
15
15
  from sky.utils import ux_utils
16
16
 
@@ -125,7 +125,7 @@ GCP_ACC_INSTANCE_TYPES = list(_INSTANCE_TYPE_TO_ACC.keys())
125
125
 
126
126
  # Number of CPU cores per GPU based on the AWS setting.
127
127
  # GCP A100 has its own instance type mapping.
128
- # Refer to sky/clouds/service_catalog/gcp_catalog.py
128
+ # Refer to sky/clouds/catalog/gcp_catalog.py
129
129
  _NUM_ACC_TO_NUM_CPU = {
130
130
  # Based on p2 on AWS.
131
131
  'K80': {
@@ -8,8 +8,8 @@ from typing import Dict, List, Optional, Tuple, Union
8
8
 
9
9
  from sky import sky_logging
10
10
  from sky.adaptors import ibm
11
+ from sky.catalog import common
11
12
  from sky.clouds import cloud
12
- from sky.clouds.service_catalog import common
13
13
  from sky.utils import resources_utils
14
14
 
15
15
  logger = sky_logging.init_logger(__name__)
@@ -12,9 +12,9 @@ from sky import clouds as sky_clouds
12
12
  from sky import sky_logging
13
13
  from sky.adaptors import common as adaptors_common
14
14
  from sky.adaptors import kubernetes
15
+ from sky.catalog import CloudFilter
16
+ from sky.catalog import common
15
17
  from sky.clouds import cloud
16
- from sky.clouds.service_catalog import CloudFilter
17
- from sky.clouds.service_catalog import common
18
18
  from sky.provision.kubernetes import utils as kubernetes_utils
19
19
 
20
20
  logger = sky_logging.init_logger(__name__)
@@ -6,7 +6,7 @@ instance types and pricing information for Lambda.
6
6
  import typing
7
7
  from typing import Dict, List, Optional, Tuple, Union
8
8
 
9
- from sky.clouds.service_catalog import common
9
+ from sky.catalog import common
10
10
  from sky.utils import resources_utils
11
11
  from sky.utils import ux_utils
12
12
 
@@ -6,7 +6,7 @@ instance types and pricing information for Nebius.
6
6
  import typing
7
7
  from typing import Dict, List, Optional, Tuple, Union
8
8
 
9
- from sky.clouds.service_catalog import common
9
+ from sky.catalog import common
10
10
  from sky.utils import resources_utils
11
11
  from sky.utils import ux_utils
12
12
 
@@ -17,8 +17,8 @@ import typing
17
17
  from typing import Dict, List, Optional, Tuple, Union
18
18
 
19
19
  from sky.adaptors import oci as oci_adaptor
20
+ from sky.catalog import common
20
21
  from sky.clouds import OCI
21
- from sky.clouds.service_catalog import common
22
22
  from sky.clouds.utils import oci_utils
23
23
  from sky.utils import resources_utils
24
24
 
@@ -7,7 +7,7 @@ query instance types and pricing information for Paperspace.
7
7
  import typing
8
8
  from typing import Dict, List, Optional, Tuple, Union
9
9
 
10
- from sky.clouds.service_catalog import common
10
+ from sky.catalog import common
11
11
  from sky.utils import ux_utils
12
12
 
13
13
  if typing.TYPE_CHECKING:
@@ -7,7 +7,7 @@ query instance types and pricing information for RunPod.
7
7
  import typing
8
8
  from typing import Dict, List, Optional, Tuple, Union
9
9
 
10
- from sky.clouds.service_catalog import common
10
+ from sky.catalog import common
11
11
 
12
12
  if typing.TYPE_CHECKING:
13
13
  from sky.clouds import cloud
@@ -7,7 +7,7 @@ instance types and pricing information for SCP.
7
7
  import typing
8
8
  from typing import Dict, List, Optional, Tuple, Union
9
9
 
10
- from sky.clouds.service_catalog import common
10
+ from sky.catalog import common
11
11
  from sky.utils import resources_utils
12
12
  from sky.utils import ux_utils
13
13
 
@@ -7,10 +7,10 @@ import typing
7
7
  from typing import Dict, List, Optional, Tuple
8
8
 
9
9
  from sky import sky_logging
10
+ from sky.catalog import CloudFilter
11
+ from sky.catalog import common
12
+ from sky.catalog import kubernetes_catalog
10
13
  from sky.clouds import ssh
11
- from sky.clouds.service_catalog import CloudFilter
12
- from sky.clouds.service_catalog import common
13
- from sky.clouds.service_catalog import kubernetes_catalog
14
14
 
15
15
  logger = sky_logging.init_logger(__name__)
16
16
 
@@ -7,7 +7,7 @@ query instance types and pricing information for Vast.ai.
7
7
  import typing
8
8
  from typing import Dict, List, Optional, Tuple, Union
9
9
 
10
- from sky.clouds.service_catalog import common
10
+ from sky.catalog import common
11
11
  from sky.utils import ux_utils
12
12
 
13
13
  if typing.TYPE_CHECKING:
@@ -5,7 +5,7 @@ import typing
5
5
  from typing import Dict, List, Optional, Tuple, Union
6
6
 
7
7
  from sky.adaptors import common as adaptors_common
8
- from sky.clouds.service_catalog import common
8
+ from sky.catalog import common
9
9
 
10
10
  if typing.TYPE_CHECKING:
11
11
  import pandas as pd
sky/cli.py CHANGED
@@ -49,6 +49,7 @@ import yaml
49
49
 
50
50
  import sky
51
51
  from sky import backends
52
+ from sky import catalog
52
53
  from sky import clouds
53
54
  from sky import exceptions
54
55
  from sky import global_user_state
@@ -60,8 +61,8 @@ from sky import skypilot_config
60
61
  from sky.adaptors import common as adaptors_common
61
62
  from sky.benchmark import benchmark_state
62
63
  from sky.benchmark import benchmark_utils
64
+ from sky.catalog import constants as service_catalog_constants
63
65
  from sky.client import sdk
64
- from sky.clouds import service_catalog
65
66
  from sky.data import storage_utils
66
67
  from sky.provision.kubernetes import constants as kubernetes_constants
67
68
  from sky.provision.kubernetes import utils as kubernetes_utils
@@ -3455,7 +3456,7 @@ def check(infra_list: Tuple[str],
3455
3456
  default=False,
3456
3457
  help='Show pricing and instance details for a specified accelerator across '
3457
3458
  'all regions and clouds.')
3458
- @service_catalog.fallback_to_default_catalog
3459
+ @catalog.fallback_to_default_catalog
3459
3460
  @usage_lib.entrypoint
3460
3461
  def show_gpus(
3461
3462
  accelerator_str: Optional[str],
@@ -3835,7 +3836,7 @@ def show_gpus(
3835
3836
  clouds_to_list: Union[Optional[str], List[str]] = cloud_name
3836
3837
  if cloud_name is None:
3837
3838
  clouds_to_list = [
3838
- c for c in service_catalog.ALL_CLOUDS
3839
+ c for c in service_catalog_constants.ALL_CLOUDS
3839
3840
  if c != 'kubernetes' and c != 'ssh'
3840
3841
  ]
3841
3842
 
@@ -3881,13 +3882,13 @@ def show_gpus(
3881
3882
  f'Cloud GPUs{colorama.Style.RESET_ALL}\n')
3882
3883
 
3883
3884
  # "Common" GPUs
3884
- for gpu in service_catalog.get_common_gpus():
3885
+ for gpu in catalog.get_common_gpus():
3885
3886
  if gpu in result:
3886
3887
  gpu_table.add_row([gpu, _list_to_str(result.pop(gpu))])
3887
3888
  yield from gpu_table.get_string()
3888
3889
 
3889
3890
  # Google TPUs
3890
- for tpu in service_catalog.get_tpus():
3891
+ for tpu in catalog.get_tpus():
3891
3892
  if tpu in result:
3892
3893
  tpu_table.add_row([tpu, _list_to_str(result.pop(tpu))])
3893
3894
  if tpu_table.get_string():
@@ -3958,7 +3959,7 @@ def show_gpus(
3958
3959
  all_regions=all_regions))
3959
3960
  # Import here to save module load speed.
3960
3961
  # pylint: disable=import-outside-toplevel,line-too-long
3961
- from sky.clouds.service_catalog import common as catalog_common
3962
+ from sky.catalog import common as catalog_common
3962
3963
 
3963
3964
  # For each gpu name (count not included):
3964
3965
  # - Group by cloud
sky/client/cli.py CHANGED
@@ -49,6 +49,7 @@ import yaml
49
49
 
50
50
  import sky
51
51
  from sky import backends
52
+ from sky import catalog
52
53
  from sky import clouds
53
54
  from sky import exceptions
54
55
  from sky import global_user_state
@@ -60,8 +61,8 @@ from sky import skypilot_config
60
61
  from sky.adaptors import common as adaptors_common
61
62
  from sky.benchmark import benchmark_state
62
63
  from sky.benchmark import benchmark_utils
64
+ from sky.catalog import constants as service_catalog_constants
63
65
  from sky.client import sdk
64
- from sky.clouds import service_catalog
65
66
  from sky.data import storage_utils
66
67
  from sky.provision.kubernetes import constants as kubernetes_constants
67
68
  from sky.provision.kubernetes import utils as kubernetes_utils
@@ -3455,7 +3456,7 @@ def check(infra_list: Tuple[str],
3455
3456
  default=False,
3456
3457
  help='Show pricing and instance details for a specified accelerator across '
3457
3458
  'all regions and clouds.')
3458
- @service_catalog.fallback_to_default_catalog
3459
+ @catalog.fallback_to_default_catalog
3459
3460
  @usage_lib.entrypoint
3460
3461
  def show_gpus(
3461
3462
  accelerator_str: Optional[str],
@@ -3835,7 +3836,7 @@ def show_gpus(
3835
3836
  clouds_to_list: Union[Optional[str], List[str]] = cloud_name
3836
3837
  if cloud_name is None:
3837
3838
  clouds_to_list = [
3838
- c for c in service_catalog.ALL_CLOUDS
3839
+ c for c in service_catalog_constants.ALL_CLOUDS
3839
3840
  if c != 'kubernetes' and c != 'ssh'
3840
3841
  ]
3841
3842
 
@@ -3881,13 +3882,13 @@ def show_gpus(
3881
3882
  f'Cloud GPUs{colorama.Style.RESET_ALL}\n')
3882
3883
 
3883
3884
  # "Common" GPUs
3884
- for gpu in service_catalog.get_common_gpus():
3885
+ for gpu in catalog.get_common_gpus():
3885
3886
  if gpu in result:
3886
3887
  gpu_table.add_row([gpu, _list_to_str(result.pop(gpu))])
3887
3888
  yield from gpu_table.get_string()
3888
3889
 
3889
3890
  # Google TPUs
3890
- for tpu in service_catalog.get_tpus():
3891
+ for tpu in catalog.get_tpus():
3891
3892
  if tpu in result:
3892
3893
  tpu_table.add_row([tpu, _list_to_str(result.pop(tpu))])
3893
3894
  if tpu_table.get_string():
@@ -3958,7 +3959,7 @@ def show_gpus(
3958
3959
  all_regions=all_regions))
3959
3960
  # Import here to save module load speed.
3960
3961
  # pylint: disable=import-outside-toplevel,line-too-long
3961
- from sky.clouds.service_catalog import common as catalog_common
3962
+ from sky.catalog import common as catalog_common
3962
3963
 
3963
3964
  # For each gpu name (count not included):
3964
3965
  # - Group by cloud
sky/client/sdk.py CHANGED
@@ -2022,6 +2022,7 @@ def api_login(endpoint: Optional[str] = None, get_token: bool = False) -> None:
2022
2022
  expires = int(time.time()) + 604800
2023
2023
  domain = str(parsed_url.hostname)
2024
2024
  domain_initial_dot = domain.startswith('.')
2025
+ secure = parsed_url.scheme == 'https'
2025
2026
  if not domain_initial_dot:
2026
2027
  domain = '.' + domain
2027
2028
 
@@ -2037,7 +2038,7 @@ def api_login(endpoint: Optional[str] = None, get_token: bool = False) -> None:
2037
2038
  domain_initial_dot=domain_initial_dot,
2038
2039
  path='',
2039
2040
  path_specified=False,
2040
- secure=False,
2041
+ secure=secure,
2041
2042
  expires=expires,
2042
2043
  discard=False,
2043
2044
  comment=None,
@@ -2046,9 +2047,7 @@ def api_login(endpoint: Optional[str] = None, get_token: bool = False) -> None:
2046
2047
  ))
2047
2048
 
2048
2049
  # Now that the cookies are parsed, save them to the cookie jar.
2049
- cookie_jar_path = os.path.expanduser(
2050
- server_common.get_api_cookie_jar_path())
2051
- cookie_jar.save(cookie_jar_path)
2050
+ server_common.set_api_cookie_jar(cookie_jar)
2052
2051
 
2053
2052
  # If we have a user_hash, save it to the local file
2054
2053
  if user_hash is not None: