Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions mlos_bench/mlos_bench/services/config_persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ def load_config(
if any(c in json for c in ("{", "[")):
# If the path contains braces, it is likely already a json string,
# so just parse it.
_LOG.info("Load config from json string: %s", json)
_LOG.info("Load config from json string: %s", sanitize_config(json))
try:
config: Any = json5.loads(json)
except ValueError as ex:
_LOG.error("Failed to parse config from JSON string: %s", json)
_LOG.error("Failed to parse config from JSON string: %s", sanitize_config(json))
raise ValueError(f"Failed to parse config from JSON string: {json}") from ex
else:
json = self.resolve_path(json)
Expand Down Expand Up @@ -224,7 +224,7 @@ def load_config(
# (e.g. Azure ARM templates).
del config["$schema"]
else:
_LOG.warning("Config %s is not validated against a schema.", json)
_LOG.warning("Config %s is not validated against a schema.", sanitize_config(json))
return config # type: ignore[no-any-return]

def prepare_class_load(
Expand Down Expand Up @@ -700,7 +700,7 @@ def load_services(
--------
mlos_bench.services : Examples of service configurations.
"""
_LOG.info("Load services: %s parent: %s", jsons, parent.__class__.__name__)
_LOG.info("Load services: %s parent: %s", sanitize_config(jsons), parent.__class__.__name__)
service = Service({}, global_config, parent)
for json in jsons:
config = self.load_config(json, ConfigSchema.SERVICE)
Expand Down Expand Up @@ -736,7 +736,7 @@ def load_tunables(
--------
mlos_bench.tunables : Examples of tunable parameter configurations.
"""
_LOG.info("Load tunables: '%s'", jsons)
_LOG.info("Load tunables: '%s'", sanitize_config(jsons))
if parent is None:
parent = TunableGroups()
tunables = parent.copy()
Expand Down
Loading