Open GuillaumeDesforges opened 2 years ago
Should be fixed by something like
diff --git a/python/ray/autoscaler/_private/util.py b/python/ray/autoscaler/_private/util.py
index f9e5dbf2a..3c23a7419 100644
--- a/python/ray/autoscaler/_private/util.py
+++ b/python/ray/autoscaler/_private/util.py
@@ -330,12 +330,15 @@ def merge_legacy_yaml_with_defaults(merged_config: Dict[str, Any]) -> Dict[str,
def merge_setup_commands(config):
- config["head_setup_commands"] = (
- config["setup_commands"] + config["head_setup_commands"]
- )
- config["worker_setup_commands"] = (
- config["setup_commands"] + config["worker_setup_commands"]
- )
+ if config["setup_commands"] is not None:
+ if config["head_setup_commands"] is not None:
+ config["head_setup_commands"] = (
+ config["setup_commands"] + config["head_setup_commands"]
+ )
+ if config["worker_setup_commands"] is not None:
+ config["worker_setup_commands"] = (
+ config["setup_commands"] + config["worker_setup_commands"]
+ )
return config
In my case, I'm using pydantic to generate a Python model of the config from the schema in the ray repo, and passed .dict()
result to create_or_update_cluster
.
I worked around it using .dict(exclude_none=True)
What happened + What you expected to happen
When calling
ray.autoscaler.sdk.create_or_update_cluster
:when there should be no TypeError
Versions / Dependencies
ray 1.13.0
Reproduction script
setup_commands
to None.ray.autoscaler.sdk.create_or_update_cluster
with this dict.Issue Severity
Low: It annoys or frustrates me.