feat: add ws CLI and support optional timeout/cache (#1066)

* feat: add ws CLI and support optional timeout/cache

* lint

* fix bugs

* convert extra_volumes to dict for multiprocess

* lint
This commit is contained in:
you-n-g
2025-07-12 18:26:45 +08:00
committed by GitHub
parent 4c78a601a5
commit 3e6bb27dd1
4 changed files with 81 additions and 13 deletions
+3 -1
View File
@@ -9,11 +9,13 @@ class ConfUtils(unittest.TestCase):
from rdagent.utils.env import EnvConf, QlibDockerConf
os.environ["MEM_LIMIT"] = "200g"
os.environ["RUNNING_TIMEOUT_PERIOD"] = "None"
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
assert QlibDockerConf().running_timeout_period is None
os.environ["default_entry"] = "which python"
os.environ["DEFAULT_ENTRY"] = "which python"
os.environ["ENABLE_CACHE"] = "False"
assert EnvConf().enable_cache is False