add documentation to config class
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user