mirror of
https://github.com/wassname/ray.git
synced 2026-09-12 12:51:15 +08:00
[Autoscaler] Making bootstrap config part of the node provider interface (#9443)
* supporting custom bootstrap config for external node providers * bootstrap config * renamed config to cluster_config * lint * remove 2 args from importer * complete move of bootstrap to node_provider * renamed provider_cls * move imports outside functions * lint * Update python/ray/autoscaler/node_provider.py Co-authored-by: Eric Liang <ekhliang@gmail.com> * final fixes * keeping lines to reduce diff * lint * lamba config * filling in -> adding for lint Co-authored-by: Ameer Haj Ali <ameerhajali@Ameers-MacBook-Pro.local> Co-authored-by: Eric Liang <ekhliang@gmail.com>
This commit is contained in:
co-authored by
Eric Liang
Ameer Haj Ali
parent
63e052a5f3
commit
1e46d4e29f
@@ -117,8 +117,8 @@ def _bootstrap_config(config, no_config_cache=False):
|
||||
raise NotImplementedError("Unsupported provider {}".format(
|
||||
config["provider"]))
|
||||
|
||||
bootstrap_config, _ = importer()
|
||||
resolved_config = bootstrap_config(config)
|
||||
provider_cls = importer(config["provider"])
|
||||
resolved_config = provider_cls.bootstrap_config(config)
|
||||
if not no_config_cache:
|
||||
with open(cache_key, "w") as f:
|
||||
f.write(json.dumps(resolved_config))
|
||||
|
||||
Reference in New Issue
Block a user