Skip to content

Commit f49aa63

Browse files
committed
make model config changable
1 parent 347dc33 commit f49aa63

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

hydra_vl4ai/util/config.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,23 @@
77
class Config:
88

99
def __init__(self):
10-
self.model_config_path: str | None = None
10+
self._model_config_path: str | None = None
1111
self._base_config_path: str | None = None
1212
self._dqn_config_path: str | None = None
13+
self.model_config: dict[str, Any] = dict()
1314
self.base_config: dict[str, Any] = dict()
1415
self.dqn_config: dict[str, Any] = dict()
1516

17+
@property
18+
def model_config_path(self):
19+
return self._model_config_path
20+
21+
@model_config_path.setter
22+
def model_config_path(self, value):
23+
if value is not None:
24+
self._model_config_path = value
25+
self.model_config = N.read(value)
26+
1627
@property
1728
def base_config_path(self):
1829
return self._base_config_path
@@ -36,7 +47,7 @@ def dqn_config_path(self, value):
3647
@property
3748
def debug(self):
3849
return Config.base_config["debug"]
39-
50+
4051
@debug.setter
4152
def debug(self, value):
4253
Config.base_config["debug"] = value

0 commit comments

Comments
 (0)