mirror of
https://github.com/wassname/ray.git
synced 2026-07-20 12:40:20 +08:00
Extract out "fillout_defaults" from other config preparation actions (#8996)
This commit is contained in:
@@ -2,7 +2,7 @@ import os
|
||||
import yaml
|
||||
import ray
|
||||
|
||||
from ray.autoscaler.commands import fillout_defaults, validate_config
|
||||
from ray.autoscaler.commands import prepare_config, validate_config
|
||||
from ray.tests.aws.utils.constants import DEFAULT_CLUSTER_NAME
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ def load_aws_example_config_file(file_name):
|
||||
|
||||
|
||||
def bootstrap_aws_config(config):
|
||||
config = fillout_defaults(config)
|
||||
config = prepare_config(config)
|
||||
validate_config(config)
|
||||
config["cluster_name"] = DEFAULT_CLUSTER_NAME
|
||||
return ray.autoscaler.aws.config.bootstrap_aws(config)
|
||||
|
||||
@@ -10,7 +10,7 @@ from jsonschema.exceptions import ValidationError
|
||||
|
||||
import ray
|
||||
import ray.services as services
|
||||
from ray.autoscaler.util import fillout_defaults, validate_config
|
||||
from ray.autoscaler.util import prepare_config, validate_config
|
||||
from ray.autoscaler.load_metrics import LoadMetrics
|
||||
from ray.autoscaler.autoscaler import StandardAutoscaler
|
||||
from ray.autoscaler.tags import TAG_RAY_NODE_TYPE, TAG_RAY_NODE_STATUS, \
|
||||
@@ -341,7 +341,7 @@ class AutoscalingTest(unittest.TestCase):
|
||||
"region": "us-east-1",
|
||||
"availability_zone": "us-east-1a",
|
||||
}
|
||||
config = fillout_defaults(config)
|
||||
config = prepare_config(config)
|
||||
try:
|
||||
validate_config(config)
|
||||
except ValidationError:
|
||||
@@ -747,7 +747,7 @@ class AutoscalingTest(unittest.TestCase):
|
||||
def testReportsConfigFailures(self):
|
||||
config = copy.deepcopy(SMALL_CLUSTER)
|
||||
config["provider"]["type"] = "external"
|
||||
config = fillout_defaults(config)
|
||||
config = prepare_config(config)
|
||||
config["provider"]["type"] = "mock"
|
||||
config_path = self.write_config(config)
|
||||
self.provider = MockProvider()
|
||||
|
||||
@@ -5,7 +5,7 @@ import yaml
|
||||
import urllib
|
||||
import tempfile
|
||||
|
||||
from ray.autoscaler.util import fillout_defaults, validate_config
|
||||
from ray.autoscaler.util import prepare_config, validate_config
|
||||
from ray.test_utils import recursive_fnmatch
|
||||
|
||||
RAY_PATH = os.path.abspath(os.path.join(__file__, "../../"))
|
||||
@@ -21,7 +21,7 @@ class AutoscalingConfigTest(unittest.TestCase):
|
||||
for config_path in CONFIG_PATHS:
|
||||
with open(config_path) as f:
|
||||
config = yaml.safe_load(f)
|
||||
config = fillout_defaults(config)
|
||||
config = prepare_config(config)
|
||||
try:
|
||||
validate_config(config)
|
||||
except Exception:
|
||||
@@ -36,7 +36,7 @@ class AutoscalingConfigTest(unittest.TestCase):
|
||||
f.write(content)
|
||||
f.seek(0)
|
||||
config = yaml.safe_load(f)
|
||||
config = fillout_defaults(config)
|
||||
config = prepare_config(config)
|
||||
try:
|
||||
validate_config(config)
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user