diff --git a/skyrl-train/examples/terminal_bench/README.md b/skyrl-train/examples/terminal_bench/README.md index 3f5e0e3bb..8f36e27de 100644 --- a/skyrl-train/examples/terminal_bench/README.md +++ b/skyrl-train/examples/terminal_bench/README.md @@ -5,7 +5,7 @@ Integration with Terminal-Bench is a work in progress. We specify a specific harbor commit in our `pyproject.toml`, which you can easily substitute or even use a local copy of Harbor. ```toml -harbor = { git = "https://github.com/laude-institute/harbor", rev = "fdfe296145cf13663dc6a0233f8faab7bfcf5fe1" } +harbor = { git = "https://github.com/laude-institute/harbor", rev = "5921cc40e8f6b5b0df0a3dc6354e0e679447eb54" } ``` Tracked here: https://github.com/NovaSky-AI/SkyRL/issues/866 @@ -46,4 +46,11 @@ To configure the Harbor-specific parameters (e.g. the maximum turns a rollout ca You can override any config supported by Harbor's `TrialConfig` in the script with `++`, just like what we do for `trials_dir` here. -For all the configurations, see [Harbor's documentation](https://harborframework.com/docs), and the `TrialConfig` definition: https://github.com/laude-institute/harbor/blob/fdfe296145cf13663dc6a0233f8faab7bfcf5fe1/src/harbor/models/trial/config.py +For all the configurations, see [Harbor's documentation](https://harborframework.com/docs), and the `TrialConfig` definition: https://github.com/laude-institute/harbor/blob/5921cc40e8f6b5b0df0a3dc6354e0e679447eb54/src/harbor/models/trial/config.py + +### Main configuration knobs + +- `++terminal_bench_config.environment.type=daytona` or `=modal` + - Harbor supports various ways of [hosting the sandboxes](https://harborframework.com/docs/core-concepts#container-environment) for the agent to run the task (Daytona, Modal, E2B, GKE (Google Kubernetes Engine)) + - SkyRL + Harbor integration has tested with Daytona and Modal, but the other providers should work out of the box +- More documentations to come diff --git a/skyrl-train/examples/terminal_bench/terminal_bench_config/default.yaml b/skyrl-train/examples/terminal_bench/terminal_bench_config/default.yaml index c37fd2671..bcc3a84b5 100644 --- a/skyrl-train/examples/terminal_bench/terminal_bench_config/default.yaml +++ b/skyrl-train/examples/terminal_bench/terminal_bench_config/default.yaml @@ -12,7 +12,7 @@ # See Harbor documentation for all available options: # https://harborframework.com/docs # And a full list of fields that TrialConfig supports: -# https://github.com/laude-institute/harbor/blob/fdfe296145cf13663dc6a0233f8faab7bfcf5fe1/src/harbor/models/trial/config.py +# https://github.com/laude-institute/harbor/blob/5921cc40e8f6b5b0df0a3dc6354e0e679447eb54/src/harbor/models/trial/config.py # Harbor TrialConfig fields below # -------------------------------- diff --git a/skyrl-train/pyproject.toml b/skyrl-train/pyproject.toml index 5e076d34f..25a82d0ba 100644 --- a/skyrl-train/pyproject.toml +++ b/skyrl-train/pyproject.toml @@ -97,7 +97,7 @@ torch = [ { index = "pytorch-cu128", marker = "sys_platform == 'linux'" }, { index = "pytorch-cpu", marker = "sys_platform == 'darwin'" }, ] -harbor = { git = "https://github.com/laude-institute/harbor", rev = "fdfe296145cf13663dc6a0233f8faab7bfcf5fe1" } +harbor = { git = "https://github.com/laude-institute/harbor", rev = "5921cc40e8f6b5b0df0a3dc6354e0e679447eb54" } torchvision = [ { index = "pytorch-cu128", marker = "sys_platform == 'linux'" }, { index = "pytorch-cpu", marker = "sys_platform == 'darwin'" }, diff --git a/skyrl-train/skyrl_train/utils/utils.py b/skyrl-train/skyrl_train/utils/utils.py index 1fe223456..c057d03a5 100644 --- a/skyrl-train/skyrl_train/utils/utils.py +++ b/skyrl-train/skyrl_train/utils/utils.py @@ -653,9 +653,11 @@ def prepare_runtime_environment(cfg: Union[SkyRLConfig, DictConfig]) -> dict[str logger.info("Exporting mlflow tracking token to ray runtime env") env_vars["MLFLOW_TRACKING_TOKEN"] = os.environ["MLFLOW_TRACKING_TOKEN"] - if os.environ.get("DAYTONA_API_KEY"): - logger.info("Exporting daytona api key to ray runtime env") - env_vars["DAYTONA_API_KEY"] = os.environ["DAYTONA_API_KEY"] + # NOTE(charlie): these are for Harbor. We should remove these once we have a sustainable way to handle these environment vars. + for var_name in ["DAYTONA_API_KEY", "MODAL_TOKEN_ID", "MODAL_TOKEN_SECRET"]: + if value := os.environ.get(var_name): + logger.info(f"Exporting {var_name} to ray runtime env") + env_vars[var_name] = value if SKYRL_LD_LIBRARY_PATH_EXPORT: # export `LD_LIBRARY_PATH` to ray runtime env. diff --git a/skyrl-train/uv.lock b/skyrl-train/uv.lock index 6eb7aa372..fc990361d 100644 --- a/skyrl-train/uv.lock +++ b/skyrl-train/uv.lock @@ -1394,8 +1394,8 @@ wheels = [ [[package]] name = "harbor" -version = "0.1.42" -source = { git = "https://github.com/laude-institute/harbor?rev=fdfe296145cf13663dc6a0233f8faab7bfcf5fe1#fdfe296145cf13663dc6a0233f8faab7bfcf5fe1" } +version = "0.1.43" +source = { git = "https://github.com/laude-institute/harbor?rev=5921cc40e8f6b5b0df0a3dc6354e0e679447eb54#5921cc40e8f6b5b0df0a3dc6354e0e679447eb54" } dependencies = [ { name = "claude-agent-sdk" }, { name = "datasets" }, @@ -4720,7 +4720,7 @@ requires-dist = [ { name = "flash-attn", marker = "sys_platform == 'linux' and extra == 'sglang'", specifier = "==2.8.3" }, { name = "flash-attn", marker = "sys_platform == 'linux' and extra == 'vllm'", specifier = "==2.8.3" }, { name = "flashinfer-jit-cache", marker = "sys_platform == 'linux' and extra == 'mcore'", specifier = "==0.5.3", index = "https://flashinfer.ai/whl/cu128" }, - { name = "flashinfer-jit-cache", marker = "sys_platform == 'linux' and extra == 'vllm'", index = "https://flashinfer.ai/whl/cu128" }, + { name = "flashinfer-jit-cache", marker = "sys_platform == 'linux' and extra == 'vllm'", specifier = "==0.5.3", index = "https://flashinfer.ai/whl/cu128" }, { name = "flashinfer-python", marker = "(sys_platform == 'linux' and extra == 'flashrl' and extra == 'mcore') or (sys_platform == 'linux' and extra == 'flashrl' and extra != 'sglang') or (sys_platform == 'linux' and extra == 'flashrl' and extra == 'sglang' and extra == 'vllm')" }, { name = "flashinfer-python", marker = "sys_platform == 'linux' and extra == 'flashrl' and extra != 'mcore' and extra == 'sglang' and extra != 'vllm'", url = "https://download.pytorch.org/whl/cu128/flashinfer/flashinfer_python-0.2.6.post1%2Bcu128torch2.7-cp39-abi3-linux_x86_64.whl" }, { name = "flashinfer-python", marker = "sys_platform == 'linux' and extra == 'mcore'", specifier = "==0.5.3" }, @@ -4728,7 +4728,7 @@ requires-dist = [ { name = "flashinfer-python", marker = "(sys_platform == 'linux' and extra == 'mcore' and extra == 'sglang') or (sys_platform == 'linux' and extra == 'sglang' and extra == 'vllm')" }, { name = "flashinfer-python", marker = "sys_platform == 'linux' and extra == 'vllm'" }, { name = "func-timeout" }, - { name = "harbor", marker = "extra == 'harbor'", git = "https://github.com/laude-institute/harbor?rev=fdfe296145cf13663dc6a0233f8faab7bfcf5fe1" }, + { name = "harbor", marker = "extra == 'harbor'", git = "https://github.com/laude-institute/harbor?rev=5921cc40e8f6b5b0df0a3dc6354e0e679447eb54" }, { name = "hf-transfer" }, { name = "hydra-core", specifier = "==1.3.2" }, { name = "jaxtyping" },