add documentation to config class

This commit is contained in:
WorldTeacher
2024-10-08 10:14:45 +02:00
parent c85a777e5b
commit edb530dc9e

View File

@@ -141,6 +141,17 @@ class Config:
else:
raise KeyError(f"Option {option} not found in configuration")
@property
def documentation(self)->bool:
if self._config is None:
raise RuntimeError("Configuration not loaded")
return self._config.documentation
@documentation.setter
def documentation(self, value: bool):
if self._config is None:
raise RuntimeError("Configuration not loaded")
self._config.documentation = value
def to_Omegaconf(self):
return omegaconf.OmegaConf.create(self._config)