Add CLEARML_AGENT_CONFIG_VERBOSE for verbose configuration file loading

This commit is contained in:
clearml 2025-01-26 22:50:49 +02:00
parent 823c92ba0e
commit 44709673f4
2 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,5 @@
from ...backend_config import Config from ...backend_config import Config
from ...backend_config.defs import ENV_CONFIG_VERBOSE
from pathlib2 import Path from pathlib2 import Path
@ -10,7 +11,7 @@ def load(*additional_module_paths):
configurations should be loaded as well configurations should be loaded as well
:return: Config object :return: Config object
""" """
config = Config(verbose=False) config = Config(verbose=ENV_CONFIG_VERBOSE.get(default=False))
this_module_path = Path(__file__).parent this_module_path = Path(__file__).parent
config.load_relative_to(this_module_path, *additional_module_paths) config.load_relative_to(this_module_path, *additional_module_paths)
return config return config

View File

@ -41,6 +41,8 @@ ENV_CONFIG_PATH_OVERRIDE_VAR = EnvEntry('CLEARML_CONFIG_PATH', 'TRAINS_CONFIG_PA
Environment-related config path override environment variable. If this is set, no other env config path will be used. Environment-related config path override environment variable. If this is set, no other env config path will be used.
""" """
ENV_CONFIG_VERBOSE = EnvEntry("CLEARML_AGENT_CONFIG_VERBOSE", default=False, converter=bool)
class Environment(object): class Environment(object):
""" Supported environment names """ """ Supported environment names """