Spaces:
Sleeping
Sleeping
Keshavj-13 commited on
Commit ·
2d2f7d7
1
Parent(s): f2edda8
fix(issue-07,08,09,18,20,26): harden release infra and integration gates
Browse files- Dockerfile +3 -6
- README.md +2 -0
- engine.py +0 -10
- tests/test_env_integration_contract.py +36 -0
Dockerfile
CHANGED
|
@@ -15,16 +15,13 @@ RUN apt-get update \
|
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
COPY pyproject.toml README.md openenv.yaml /app/
|
|
|
|
| 18 |
COPY __init__.py client.py engine.py graders.py inference.py models.py planner.py tasks.py /app/
|
| 19 |
COPY server /app/server
|
| 20 |
COPY scripts /app/scripts
|
| 21 |
|
| 22 |
-
RUN pip install --no-cache-dir \
|
| 23 |
-
|
| 24 |
-
"openai>=2.30.0" \
|
| 25 |
-
"openenv-core[core]>=0.2.3" \
|
| 26 |
-
"pydantic>=2.12.0" \
|
| 27 |
-
"uvicorn>=0.41.0"
|
| 28 |
|
| 29 |
EXPOSE 8000
|
| 30 |
|
|
|
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
COPY pyproject.toml README.md openenv.yaml /app/
|
| 18 |
+
COPY uv.lock /app/
|
| 19 |
COPY __init__.py client.py engine.py graders.py inference.py models.py planner.py tasks.py /app/
|
| 20 |
COPY server /app/server
|
| 21 |
COPY scripts /app/scripts
|
| 22 |
|
| 23 |
+
RUN pip install --no-cache-dir uv \
|
| 24 |
+
&& uv sync --system --frozen
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
EXPOSE 8000
|
| 27 |
|
README.md
CHANGED
|
@@ -35,6 +35,8 @@ The environment is spec-compliant for the current OpenEnv validator:
|
|
| 35 |
- package metadata and `server` script are defined in [pyproject.toml](pyproject.toml)
|
| 36 |
- `uv.lock` is generated for reproducible builds
|
| 37 |
|
|
|
|
|
|
|
| 38 |
## Tasks
|
| 39 |
|
| 40 |
Three benchmark tasks are included in [tasks.py](tasks.py):
|
|
|
|
| 35 |
- package metadata and `server` script are defined in [pyproject.toml](pyproject.toml)
|
| 36 |
- `uv.lock` is generated for reproducible builds
|
| 37 |
|
| 38 |
+
`python -m openenv.cli validate .` is expected to report `[OK] : Ready for multi-mode deployment`.
|
| 39 |
+
|
| 40 |
## Tasks
|
| 41 |
|
| 42 |
Three benchmark tasks are included in [tasks.py](tasks.py):
|
engine.py
CHANGED
|
@@ -44,16 +44,6 @@ except ImportError:
|
|
| 44 |
MAX_DIAGNOSTICS,
|
| 45 |
MAX_RECOMMENDATIONS,
|
| 46 |
)
|
| 47 |
-
except ImportError:
|
| 48 |
-
from constants import (
|
| 49 |
-
SEPARATION_BY_WAKE,
|
| 50 |
-
SCORE_WEIGHTS,
|
| 51 |
-
METRIC_PRECISION,
|
| 52 |
-
FUEL_PRECISION,
|
| 53 |
-
AIRLINE_DELAY_PRECISION,
|
| 54 |
-
MAX_DIAGNOSTICS,
|
| 55 |
-
MAX_RECOMMENDATIONS,
|
| 56 |
-
)
|
| 57 |
|
| 58 |
# Build priority delay tolerance dynamically from models
|
| 59 |
PRIORITY_DELAY_TOLERANCE: Dict[PriorityClass, int] = {
|
|
|
|
| 44 |
MAX_DIAGNOSTICS,
|
| 45 |
MAX_RECOMMENDATIONS,
|
| 46 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
# Build priority delay tolerance dynamically from models
|
| 49 |
PRIORITY_DELAY_TOLERANCE: Dict[PriorityClass, int] = {
|
tests/test_env_integration_contract.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Integration tests for environment state transitions and shared constants."""
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import constants
|
| 6 |
+
import engine
|
| 7 |
+
import planner
|
| 8 |
+
from models import ATCOptimizationAction
|
| 9 |
+
from planner import build_heuristic_plan
|
| 10 |
+
from server.atc_environment import ATCOptimizationEnvironment
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
def test_reset_step_state_integration_flow() -> None:
|
| 14 |
+
env = ATCOptimizationEnvironment()
|
| 15 |
+
obs = env.reset(task_id="mumbai_bank_balance_medium")
|
| 16 |
+
assert obs.steps_remaining > 0
|
| 17 |
+
assert env.state.step_count == 0
|
| 18 |
+
|
| 19 |
+
proposal = build_heuristic_plan(obs)
|
| 20 |
+
next_obs = env.step(
|
| 21 |
+
ATCOptimizationAction(
|
| 22 |
+
proposal=proposal,
|
| 23 |
+
rationale="Integration test plan",
|
| 24 |
+
commit=False,
|
| 25 |
+
)
|
| 26 |
+
)
|
| 27 |
+
|
| 28 |
+
assert env.state.step_count == 1
|
| 29 |
+
assert len(env.state.history) == 1
|
| 30 |
+
assert len(env.state.grader_history) >= 1
|
| 31 |
+
assert next_obs.steps_remaining == max(0, env.state.max_steps - env.state.step_count)
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def test_separation_matrix_is_centralized() -> None:
|
| 35 |
+
assert planner.SEPARATION_BY_WAKE is constants.SEPARATION_BY_WAKE
|
| 36 |
+
assert engine.SEPARATION_BY_WAKE is constants.SEPARATION_BY_WAKE
|