Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5569fd0
moved perf/enroot fixes from internal Gym to hypotest
Mar 10, 2026
3ab76ff
adjusted dataset config to support new enroot fields
arnavkomaragiri Mar 10, 2026
facd076
added use ray field to config
arnavkomaragiri Mar 10, 2026
6881734
updated interpreter env config to support use_ray
arnavkomaragiri Mar 11, 2026
a9e1f83
added code safety, perf fixes on enroot container launch to prevent h…
arnavkomaragiri Mar 12, 2026
51e1d08
added code safety
arnavkomaragiri Mar 12, 2026
80d6660
fixed resources_servers imports
arnavkomaragiri Mar 12, 2026
3bb3077
cleaned up interpreter env by dropping perf logging
arnavkomaragiri Mar 12, 2026
4f0cddc
Add Apache License 2.0
sidnarayanan Mar 13, 2026
1f5906a
Reformat eval schema to match training dataset schema (#12)
sidnarayanan Mar 13, 2026
c1d0711
moved perf/enroot fixes from internal Gym to hypotest
Mar 10, 2026
2436341
added code safety, perf fixes on enroot container launch to prevent h…
arnavkomaragiri Mar 12, 2026
bdf01f5
cleaned up interpreter env by dropping perf logging
arnavkomaragiri Mar 12, 2026
3cde42b
tweaked dataset server and problem instance to support new data format
arnavkomaragiri Mar 14, 2026
75a7d6a
added rw filesystem to enroot container
arnavkomaragiri Mar 14, 2026
c8ecc7d
fixed isolation bug
arnavkomaragiri Mar 14, 2026
d8334d3
cleaned up perf logging
arnavkomaragiri Mar 14, 2026
6f86c6e
dropped stateful_python_code_exec
arnavkomaragiri Mar 14, 2026
25c8793
Merge branch 'main' into akomaragiri/enroot_perf_fixes
arnavkomaragiri Mar 14, 2026
68fa59c
fixed formatting issues
arnavkomaragiri Mar 15, 2026
463afcb
added ray as dep
arnavkomaragiri Mar 15, 2026
dc5740e
added fallback on nb_primary_language for ProblemInstance
arnavkomaragiri Mar 15, 2026
4f63f7e
added toggle to safety checks
arnavkomaragiri Mar 15, 2026
7648d85
added usage examples back to tool schemas
arnavkomaragiri Mar 15, 2026
2d7dcaa
added redundancy check on kernel_container
arnavkomaragiri Mar 15, 2026
f8cae4d
added usage example for error recovery in run_cell
arnavkomaragiri Mar 15, 2026
30bf7df
shortened safety warning
arnavkomaragiri Mar 15, 2026
ba43a6a
replaced suprocess.Popen with asyncio.create_subprocess_exec
arnavkomaragiri Mar 15, 2026
471765d
refactored container logging to be async, addressed comments
arnavkomaragiri Mar 16, 2026
94faeba
readded str->int fallback to list_dir()
arnavkomaragiri Mar 16, 2026
906354c
Merge branch 'main' into akomaragiri/enroot_perf_fixes
arnavkomaragiri Mar 16, 2026
ca8cd47
addressed linter errors, cleaned up impl
arnavkomaragiri Mar 16, 2026
de76f10
set execution config to proper type in dataset config
arnavkomaragiri Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ dependencies = [
"numpy",
"pillow",
"pydantic",
"ray",
"tenacity>=8.0",
]
description = "hypotest package"
Expand Down Expand Up @@ -66,6 +67,9 @@ dev = [
"types-tqdm",
"vcrpy>=8", # Pin for dropping unused requests support
]
ray = [
"ray",
]

[tool.codespell]
check-filenames = true
Expand Down
20 changes: 16 additions & 4 deletions src/hypotest/dataset_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from lmi import LiteLLMModel
from pydantic import BaseModel, ConfigDict, DirectoryPath, Field, FilePath, field_validator, model_validator

from hypotest.env.config import ExecutionConfig
from hypotest.env.interpreter_env import InterpreterEnv, InterpreterEnvConfig, ProblemInstance
from hypotest.env.kernel_server import NBLanguage

Expand All @@ -34,11 +35,16 @@ class DatasetConfig(BaseModel):
)

work_dir: Path | None = None
use_docker: bool = True
use_ray: bool = True
use_docker: bool = False
use_enroot: bool = True
container_sqsh_path: str | None = None
force_python: bool = True
normalize_reward: bool = True
save_dir: Path | None = None

execution_config: ExecutionConfig = Field(default_factory=ExecutionConfig)

@model_validator(mode="after")
def validate_dataset_source(self) -> Self:
if not self.problem_jsonl and not self.hf_dataset:
Expand Down Expand Up @@ -83,16 +89,17 @@ def get_new_env_by_idx(self, idx: int) -> InterpreterEnv:
if not capsule_path.exists():
capsule_path = self.config.capsule_dir / f"CapsuleData-{problem.id}"
problem_dir = Path(self.config.work_dir) / run_id if self.config.work_dir else Path(mkdtemp())
if problem_dir.exists():
shutil.rmtree(problem_dir)
problem_dir.mkdir(parents=True, exist_ok=True)
shutil.copytree(capsule_path, problem_dir, dirs_exist_ok=True)

save_dir = Path(self.config.save_dir) / run_id if self.config.save_dir else None

language = (
NBLanguage.PYTHON
if self.config.force_python
else NBLanguage.from_string(cast(str, problem.metadata.get("nb_primary_language", "python")).upper())
NBLanguage.PYTHON if self.config.force_python else NBLanguage.from_string(problem.nb_primary_language)
)
language = language if language is not None else NBLanguage.PYTHON # default auto language to python

return InterpreterEnv(
problem=problem,
Expand All @@ -106,6 +113,10 @@ def __len__(self) -> int:
return len(self.problems)


HypotestDataset = Dataset
HypotestDatasetConfig = DatasetConfig


DEFAULT_SERVER_PORT = 8405


Expand Down Expand Up @@ -169,6 +180,7 @@ async def launch_server():
],
},
use_docker=args.use_docker,
execution_config={"cell_execution_timeout": 600},
),
port=args.port,
api_key=args.api_key,
Expand Down
Loading
Loading