def substitute_env_var(string): match = self.pattern.match(string) if match is None: return string starting, env_var, remaining = match.groups() LOG.debug( 'Found environment variable {}, will be substituted if found'. format(env_var)) return substitute_env_var(starting) + os.getenv( env_var, '{env.' + env_var + '}') + remaining
def initialize_default_checkpoint_store(): LOG.debug('Initialized with default YAML checkpoint store') checkpoint_store = YamlFileStore() checkpoint_store.configure({PATH: DEFAULT_CHECKPOINT_FILENAME}) return checkpoint_store