fix: fix ExtendedSettingsConfigDict does not work (#660)

* refactor: Replace ExtendedSettingsConfigDict with SettingsConfigDict

* lint

* lint
This commit is contained in:
you-n-g
2025-03-05 18:30:02 +08:00
committed by GitHub
parent 67dc1fc13e
commit 943d2087fc
9 changed files with 68 additions and 51 deletions
+18
View File
@@ -0,0 +1,18 @@
import unittest
class ConfUtils(unittest.TestCase):
def test_conf(self):
import os
from rdagent.utils.env import QlibDockerConf
os.environ["MEM_LIMIT"] = "200g"
assert QlibDockerConf().mem_limit == "200g" # base class will affect subclasses
os.environ["QLIB_DOCKER_MEM_LIMIT"] = "300g"
assert QlibDockerConf().mem_limit == "300g" # more accurate subclass will override the base class
if __name__ == "__main__":
unittest.main()