skypilot-nightly 1.0.0.dev20241215__py3-none-any.whl → 1.0.0.dev20241217__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 = '346646949beead6d93f793851e959da4b56246b0'
8
+ _SKYPILOT_COMMIT_SHA = 'f0ebf13b5b164d012f4b033609eb1b364dc6caf3'
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.dev20241215'
38
+ __version__ = '1.0.0.dev20241217'
39
39
  __root_dir__ = os.path.dirname(os.path.abspath(__file__))
40
40
 
41
41
 
@@ -173,6 +173,16 @@ _RAY_YAML_KEYS_TO_RESTORE_EXCEPTIONS = [
173
173
  ('available_node_types', 'ray.head.default', 'node_config',
174
174
  'azure_arm_parameters', 'cloudInitSetupCommands'),
175
175
  ]
176
+ # These keys are expected to change when provisioning on an existing cluster,
177
+ # but they don't actually represent a change that requires re-provisioning the
178
+ # cluster. If the cluster yaml is the same except for these keys, we can safely
179
+ # skip reprovisioning. See _deterministic_cluster_yaml_hash.
180
+ _RAY_YAML_KEYS_TO_REMOVE_FOR_HASH = [
181
+ # On first launch, availability_zones will include all possible zones. Once
182
+ # the cluster exists, it will only include the zone that the cluster is
183
+ # actually in.
184
+ ('provider', 'availability_zone'),
185
+ ]
176
186
 
177
187
 
178
188
  def is_ip(s: str) -> bool:
@@ -1087,7 +1097,7 @@ def _deterministic_cluster_yaml_hash(yaml_path: str) -> str:
1087
1097
  yaml file and all the files in the file mounts, then hash the byte sequence.
1088
1098
 
1089
1099
  The format of the byte sequence is:
1090
- 32 bytes - sha256 hash of the yaml file
1100
+ 32 bytes - sha256 hash of the yaml
1091
1101
  for each file mount:
1092
1102
  file mount remote destination (UTF-8), \0
1093
1103
  if the file mount source is a file:
@@ -1111,14 +1121,29 @@ def _deterministic_cluster_yaml_hash(yaml_path: str) -> str:
1111
1121
  we construct it incrementally by using hash.update() to add new bytes.
1112
1122
  """
1113
1123
 
1124
+ # Load the yaml contents so that we can directly remove keys.
1125
+ yaml_config = common_utils.read_yaml(yaml_path)
1126
+ for key_list in _RAY_YAML_KEYS_TO_REMOVE_FOR_HASH:
1127
+ dict_to_remove_from = yaml_config
1128
+ found_key = True
1129
+ for key in key_list[:-1]:
1130
+ if (not isinstance(dict_to_remove_from, dict) or
1131
+ key not in dict_to_remove_from):
1132
+ found_key = False
1133
+ break
1134
+ dict_to_remove_from = dict_to_remove_from[key]
1135
+ if found_key and key_list[-1] in dict_to_remove_from:
1136
+ dict_to_remove_from.pop(key_list[-1])
1137
+
1114
1138
  def _hash_file(path: str) -> bytes:
1115
1139
  return common_utils.hash_file(path, 'sha256').digest()
1116
1140
 
1117
1141
  config_hash = hashlib.sha256()
1118
1142
 
1119
- config_hash.update(_hash_file(yaml_path))
1143
+ yaml_hash = hashlib.sha256(
1144
+ common_utils.dump_yaml_str(yaml_config).encode('utf-8'))
1145
+ config_hash.update(yaml_hash.digest())
1120
1146
 
1121
- yaml_config = common_utils.read_yaml(yaml_path)
1122
1147
  file_mounts = yaml_config.get('file_mounts', {})
1123
1148
  # Remove the file mounts added by the newline.
1124
1149
  if '' in file_mounts:
@@ -1126,6 +1151,11 @@ def _deterministic_cluster_yaml_hash(yaml_path: str) -> str:
1126
1151
  file_mounts.pop('')
1127
1152
 
1128
1153
  for dst, src in sorted(file_mounts.items()):
1154
+ if src == yaml_path:
1155
+ # Skip the yaml file itself. We have already hashed a modified
1156
+ # version of it. The file may include fields we don't want to hash.
1157
+ continue
1158
+
1129
1159
  expanded_src = os.path.expanduser(src)
1130
1160
  config_hash.update(dst.encode('utf-8') + b'\0')
1131
1161
 
sky/cli.py CHANGED
@@ -3601,15 +3601,12 @@ def jobs():
3601
3601
  default=False,
3602
3602
  required=False,
3603
3603
  help='Skip confirmation prompt.')
3604
- # TODO(cooperc): remove this flag once --fast can robustly detect cluster
3605
- # yaml config changes
3604
+ # TODO(cooperc): remove this flag before releasing 0.8.0
3606
3605
  @click.option('--fast',
3607
3606
  default=False,
3608
3607
  is_flag=True,
3609
- help='[Experimental] Launch the job faster by skipping '
3610
- 'controller initialization steps. If you update SkyPilot or '
3611
- 'your local cloud credentials, they will not be reflected until '
3612
- 'you run `sky jobs launch` at least once without this flag.')
3608
+ help=('[Deprecated] Does nothing. Previous flag behavior is now '
3609
+ 'enabled by default.'))
3613
3610
  @timeline.event
3614
3611
  @usage_lib.entrypoint
3615
3612
  def jobs_launch(
@@ -3634,7 +3631,7 @@ def jobs_launch(
3634
3631
  disk_tier: Optional[str],
3635
3632
  ports: Tuple[str],
3636
3633
  detach_run: bool,
3637
- retry_until_up: bool,
3634
+ retry_until_up: Optional[bool],
3638
3635
  yes: bool,
3639
3636
  fast: bool,
3640
3637
  ):
@@ -3692,6 +3689,16 @@ def jobs_launch(
3692
3689
  else:
3693
3690
  retry_until_up = True
3694
3691
 
3692
+ # Deprecation. The default behavior is fast, and the flag will be removed.
3693
+ # The flag was not present in 0.7.x (only nightly), so we will remove before
3694
+ # 0.8.0 so that it never enters a stable release.
3695
+ if fast:
3696
+ click.secho(
3697
+ 'Flag --fast is deprecated, as the behavior is now default. The '
3698
+ 'flag will be removed soon. Please do not use it, so that you '
3699
+ 'avoid "No such option" errors.',
3700
+ fg='yellow')
3701
+
3695
3702
  if not isinstance(task_or_dag, sky.Dag):
3696
3703
  assert isinstance(task_or_dag, sky.Task), task_or_dag
3697
3704
  with sky.Dag() as dag:
@@ -3733,8 +3740,7 @@ def jobs_launch(
3733
3740
  managed_jobs.launch(dag,
3734
3741
  name,
3735
3742
  detach_run=detach_run,
3736
- retry_until_up=retry_until_up,
3737
- fast=fast)
3743
+ retry_until_up=retry_until_up)
3738
3744
 
3739
3745
 
3740
3746
  @jobs.command('queue', cls=_DocumentedCodeCommand)
sky/jobs/core.py CHANGED
@@ -37,12 +37,13 @@ if typing.TYPE_CHECKING:
37
37
  @timeline.event
38
38
  @usage_lib.entrypoint
39
39
  def launch(
40
- task: Union['sky.Task', 'sky.Dag'],
41
- name: Optional[str] = None,
42
- stream_logs: bool = True,
43
- detach_run: bool = False,
44
- retry_until_up: bool = False,
45
- fast: bool = False,
40
+ task: Union['sky.Task', 'sky.Dag'],
41
+ name: Optional[str] = None,
42
+ stream_logs: bool = True,
43
+ detach_run: bool = False,
44
+ retry_until_up: bool = False,
45
+ # TODO(cooperc): remove fast arg before 0.8.0
46
+ fast: bool = True, # pylint: disable=unused-argument for compatibility
46
47
  ) -> None:
47
48
  # NOTE(dev): Keep the docstring consistent between the Python API and CLI.
48
49
  """Launch a managed job.
@@ -54,9 +55,8 @@ def launch(
54
55
  managed job.
55
56
  name: Name of the managed job.
56
57
  detach_run: Whether to detach the run.
57
- fast: Whether to use sky.launch(fast=True) for the jobs controller. If
58
- True, the SkyPilot wheel and the cloud credentials may not be updated
59
- on the jobs controller.
58
+ fast: [Deprecated] Does nothing, and will be removed soon. We will
59
+ always use fast mode as it's fully safe now.
60
60
 
61
61
  Raises:
62
62
  ValueError: cluster does not exist. Or, the entrypoint is not a valid
@@ -149,7 +149,7 @@ def launch(
149
149
  idle_minutes_to_autostop=skylet_constants.
150
150
  CONTROLLER_IDLE_MINUTES_TO_AUTOSTOP,
151
151
  retry_until_up=True,
152
- fast=fast,
152
+ fast=True,
153
153
  _disable_controller_check=True)
154
154
 
155
155
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: skypilot-nightly
3
- Version: 1.0.0.dev20241215
3
+ Version: 1.0.0.dev20241217
4
4
  Summary: SkyPilot: An intercloud broker for the clouds
5
5
  Author: SkyPilot Team
6
6
  License: Apache 2.0
@@ -1,8 +1,8 @@
1
- sky/__init__.py,sha256=ZjU_aYoa6x_NpZU0aYvilPU4TLWJfelh2YntjgWRo94,5944
1
+ sky/__init__.py,sha256=JHbf7e8GajLWffg9ISrtGnttqzcBPT__4FogJSUvPQk,5944
2
2
  sky/admin_policy.py,sha256=hPo02f_A32gCqhUueF0QYy1fMSSKqRwYEg_9FxScN_s,3248
3
3
  sky/authentication.py,sha256=kACHmiZgWgRpYd1wx1ofbXRMErfMcFmWrkw4a9NxYrY,20988
4
4
  sky/check.py,sha256=D3Y3saIFAYVvPxuBHnVgJEO0fUVDxgjwuMBaO-D778k,9472
5
- sky/cli.py,sha256=UQCEEHEvMVWvrVtdsMiBNQdkQdDpyeTI6VuXKCbafRo,214009
5
+ sky/cli.py,sha256=j8r2Vc8gGWTQ81D3JM2fvFbFHA9bn7rLESj2UWBke28,214240
6
6
  sky/cloud_stores.py,sha256=RjFgmRhUh1Kk__f6g3KxzLp9s7dA0pFK4W1AukEuUaw,21153
7
7
  sky/core.py,sha256=TQnSe7-bod1qmOwBArk9a2PVCWFlJZX9Ahn2FUHt7M8,38615
8
8
  sky/dag.py,sha256=f3sJlkH4bE6Uuz3ozNtsMhcBpRx7KmC9Sa4seDKt4hU,3104
@@ -30,7 +30,7 @@ sky/adaptors/runpod.py,sha256=4Nt_BfZhJAKQNA3wO8cxvvNI8x4NsDGHu_4EhRDlGYQ,225
30
30
  sky/adaptors/vsphere.py,sha256=zJP9SeObEoLrpgHW2VHvZE48EhgVf8GfAEIwBeaDMfM,2129
31
31
  sky/backends/__init__.py,sha256=UDjwbUgpTRApbPJnNfR786GadUuwgRk3vsWoVu5RB_c,536
32
32
  sky/backends/backend.py,sha256=iBs5gnMaaUoH2OIQ3xhAjWdrJWqj8T61Za9TGsBFpvQ,7515
33
- sky/backends/backend_utils.py,sha256=hpYYXXRG25L4PUxqGbSwPfn_6cjDXBlbPxSCKPvYFwo,134028
33
+ sky/backends/backend_utils.py,sha256=gWLucPCYroR0qlsRXP7FXjgo2I9CEf_cZB_eR67Rdl8,135440
34
34
  sky/backends/cloud_vm_ray_backend.py,sha256=JQ5T1b0Pa12IEHJLHHEk0gPZDd0K_wViHEYer84j1Ls,239283
35
35
  sky/backends/docker_utils.py,sha256=Hyw1YY20EyghhEbYx6O2FIMDcGkNzBzV9TM7LFynei8,8358
36
36
  sky/backends/local_docker_backend.py,sha256=nSYCjms3HOPjPNOrcCqsUKm1WV3AAovRFjEQ7hcEXW4,17021
@@ -96,7 +96,7 @@ sky/data/storage_utils.py,sha256=cM3kxlffYE7PnJySDu8huyUsMX_JYsf9uer8r5OYsjo,955
96
96
  sky/jobs/__init__.py,sha256=yucibSB_ZimtJMvOhMxn6ZqwBIYNfcwmc6pSXtCqmNQ,1483
97
97
  sky/jobs/constants.py,sha256=YLgcCg_RHSYr_rfsI_4UIdXk78KKKOK29Oem88t5j8I,1350
98
98
  sky/jobs/controller.py,sha256=DDt92Sa0TV3VULnEyM5QopUowciH6PE9u0yTDumFatM,28538
99
- sky/jobs/core.py,sha256=iOPH4QNeQPncV7Ss6_hDr-q3nmqUp3eo96U7PP9j4vI,18237
99
+ sky/jobs/core.py,sha256=VBLsCrHKydIbt2KAG9SzGoxo85_mAenaBeaVVjyEF8Y,18304
100
100
  sky/jobs/recovery_strategy.py,sha256=eP9CLy5qiNTyMJTWWzAxdQ4YolUZWL1g3cLMH7tw8Es,27312
101
101
  sky/jobs/state.py,sha256=wMh2fMK4HQY32FPFCXaeIY26CL1KDQ_ZId7GiQLolGo,26507
102
102
  sky/jobs/utils.py,sha256=GOc9rXy12vAGLpglf7VjWOWdAWPj2mOBpzxXP5q8yAg,38703
@@ -279,9 +279,9 @@ sky/utils/kubernetes/k8s_gpu_labeler_job.yaml,sha256=k0TBoQ4zgf79-sVkixKSGYFHQ7Z
279
279
  sky/utils/kubernetes/k8s_gpu_labeler_setup.yaml,sha256=VLKT2KKimZu1GDg_4AIlIt488oMQvhRZWwsj9vBbPUg,3812
280
280
  sky/utils/kubernetes/rsync_helper.sh,sha256=h4YwrPFf9727CACnMJvF3EyK_0OeOYKKt4su_daKekw,1256
281
281
  sky/utils/kubernetes/ssh_jump_lifecycle_manager.py,sha256=RFLJ3k7MR5UN4SKHykQ0lV9SgXumoULpKYIAt1vh-HU,6560
282
- skypilot_nightly-1.0.0.dev20241215.dist-info/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
283
- skypilot_nightly-1.0.0.dev20241215.dist-info/METADATA,sha256=bBqzXOLYhFG-9X6DhofK4AXMa3bWlD7U2CvWyy7NkI0,20319
284
- skypilot_nightly-1.0.0.dev20241215.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
285
- skypilot_nightly-1.0.0.dev20241215.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
286
- skypilot_nightly-1.0.0.dev20241215.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
287
- skypilot_nightly-1.0.0.dev20241215.dist-info/RECORD,,
282
+ skypilot_nightly-1.0.0.dev20241217.dist-info/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
283
+ skypilot_nightly-1.0.0.dev20241217.dist-info/METADATA,sha256=euUug0TyS3lZGt2c-t9T68hDJUmSpyrNzB-pKtZbURE,20319
284
+ skypilot_nightly-1.0.0.dev20241217.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
285
+ skypilot_nightly-1.0.0.dev20241217.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
286
+ skypilot_nightly-1.0.0.dev20241217.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
287
+ skypilot_nightly-1.0.0.dev20241217.dist-info/RECORD,,