Skip to content

Commit

Permalink
remove more
Browse files Browse the repository at this point in the history
  • Loading branch information
cblmemo committed Oct 25, 2024
1 parent c9bcf25 commit 34c28e9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 31 deletions.
5 changes: 0 additions & 5 deletions sky/backends/backend_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,6 @@ def write_cluster_config(

# User-supplied global instance tags from ~/.sky/config.yaml.
labels = skypilot_config.get_nested((str(cloud).lower(), 'labels'), {})
# Deprecated: instance_tags have been replaced by labels. For backward
# compatibility, we support them and the schema allows them only if
# `labels` are not specified. This should be removed after 0.7.0.
labels = skypilot_config.get_nested((str(cloud).lower(), 'instance_tags'),
labels)
# labels is a dict, which is guaranteed by the type check in
# schemas.py
assert isinstance(labels, dict), labels
Expand Down
19 changes: 5 additions & 14 deletions sky/skylet/log_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,11 @@ def run_with_log(
daemon_script = os.path.join(
os.path.dirname(os.path.abspath(job_lib.__file__)),
'subprocess_daemon.py')
if not hasattr(constants, 'SKY_GET_PYTHON_PATH_CMD'):
# Backward compatibility: for cluster started before #3326, this
# constant does not exist. Since we generate the job script
# in backends.cloud_vm_ray_backend with inspect, so the
# the lates `run_with_log` will be used, but the `constants` is
# not updated. We fallback to `python3` in this case.
# TODO(zhwu): remove this after 0.7.0.
python_path = 'python3'
else:
python_path = subprocess.check_output(
constants.SKY_GET_PYTHON_PATH_CMD,
shell=True,
stderr=subprocess.DEVNULL,
encoding='utf-8').strip()
python_path = subprocess.check_output(
constants.SKY_GET_PYTHON_PATH_CMD,
shell=True,
stderr=subprocess.DEVNULL,
encoding='utf-8').strip()
daemon_cmd = [
python_path,
daemon_script,
Expand Down
11 changes: 0 additions & 11 deletions sky/utils/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,15 +581,6 @@ def get_cluster_schema():
}

_LABELS_SCHEMA = {
# Deprecated: 'instance_tags' is replaced by 'labels'. Keeping for backward
# compatibility. Will be removed after 0.7.0.
'instance_tags': {
'type': 'object',
'required': [],
'additionalProperties': {
'type': 'string',
},
},
'labels': {
'type': 'object',
'required': [],
Expand Down Expand Up @@ -710,7 +701,6 @@ def get_config_schema():
**_LABELS_SCHEMA,
**_NETWORK_CONFIG_SCHEMA,
},
**_check_not_both_fields_present('instance_tags', 'labels')
},
'gcp': {
'type': 'object',
Expand Down Expand Up @@ -748,7 +738,6 @@ def get_config_schema():
**_LABELS_SCHEMA,
**_NETWORK_CONFIG_SCHEMA,
},
**_check_not_both_fields_present('instance_tags', 'labels')
},
'azure': {
'type': 'object',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ def test_runpod_http_server_with_custom_ports():
run_one_test(test)


# ---------- Labels from task on AWS (instance_tags) ----------
# ---------- Labels from task on AWS ----------
@pytest.mark.aws
def test_task_labels_aws():
name = _get_cluster_name()
Expand Down

0 comments on commit 34c28e9

Please sign in to comment.