feat: rework settings, conf to detect settings changes better

This commit is contained in:
WorldTeacher
2024-10-01 14:08:45 +02:00
parent 83636f65c2
commit c7309e047b
2 changed files with 86 additions and 65 deletions

View File

@@ -140,7 +140,15 @@ class Config:
self._config[option] = True
else:
raise KeyError(f"Option {option} not found in configuration")
def to_Omegaconf(self):
return omegaconf.OmegaConf.create(self._config)
def updateValue(self, key:str, value):
if self._config is None:
raise RuntimeError("Configuration not loaded")
self._config[key] = value
if __name__ == "__main__":
cfg = Config("config/settings.yaml")
#print(cfg.database.path)