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
@@ -27,7 +27,8 @@ class DSCoderCoSTEERSettings(CoSTEERSettings):
def get_ds_env(
conf_type: Literal["kaggle", "mlebench"] = "kaggle",
extra_volumes: dict = {},
running_timeout_period: int = DS_RD_SETTING.debug_timeout,
running_timeout_period: int | None = DS_RD_SETTING.debug_timeout,
enable_cache: bool | None = None,
) -> Env:
"""
Retrieve the appropriate environment configuration based on the env_type setting.
@@ -52,8 +53,10 @@ def get_ds_env(
)
else:
raise ValueError(f"Unknown env type: {conf.env_type}")
env.conf.extra_volumes = extra_volumes
env.conf.extra_volumes = extra_volumes.copy()
env.conf.running_timeout_period = running_timeout_period
if enable_cache is not None:
env.conf.enable_cache = enable_cache
env.prepare()
return env