Replace RL trajectory extraction with episode views - #132
Merged
Conversation
E2E smoke —
|
E2E smoke —
|
E2E smoke —
|
cm2435
marked this pull request as ready for review
May 28, 2026 19:03
cm2435
changed the base branch from
codex/episode-sample-pr12-trainer-adapter
to
dev
June 7, 2026 18:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



























Summary
Stack-shaped review map
PR1: RL view contracts and actor state
ergon_core.core.views.rl.modelsplus actor-state read support.ergon_core/tests/unit/views/rl/test_actor_state.py.PR2: Episode tree reconstruction
RlEpisodeReadServicefor sample-level episode trees, attempts, steps, task parentage, worker binding, actor identity, and experiment/environment lineage.ergon_core/tests/unit/views/rl/test_episode_view.pyandergon_core/tests/integration/rl/test_rl_episode_view_roundtrip.py.PR3: RL training projections
RlProjectionServicethat normalizes sample-level reward and emits per-attempt training records from the episode view.ergon_core/tests/unit/views/rl/test_projections.py.PR4: Rollout API integration
core/rl/extraction.pyand routes rollout polling through the episode/projection services.trainingRecords.ergon_core/tests/unit/rl/test_rollout_training_records.py,ergon_core/tests/unit/rest_api/test_rollouts_di.py, and architecture guard updates.PR5: TRL example adapter
ergon_infra.adapters.trl_httpfor training-record payloads and moves the runnable TRL script intoexamples/training.ergon_infra.training.trl_runneras a deprecation shim only.ergon_infra/tests/unit/test_training_experiment_submission.pyandtests/examples/test_trl_single_agent_stochastic_imports.py.Local verification
uv run pytest ergon_core/tests/unit/views/rl ergon_core/tests/integration/rl ergon_core/tests/unit/rl ergon_core/tests/unit/rest_api/test_rollouts_di.py ergon_core/tests/unit/architecture/test_no_legacy_compatibility.py ergon_infra/tests/unit/test_training_experiment_submission.py tests/examples/test_trl_single_agent_stochastic_imports.py -q-> 40 passeduv run ergon test full unit -- --cov=ergon_core --cov=ergon_builtins --cov-report=xml:coverage.xml-> 933 passed, 1 skippeduv run ruff check ergon_core ergon_builtins ergon_cli ergon_infra ergon_ingestion tests-> passeduv run ruff format --check ergon_core ergon_builtins ergon_cli ergon_infra ergon_ingestion tests-> passeduv run ty check ergon_core/ergon_core ergon_builtins/ergon_builtins ergon_cli/ergon_cli ergon_infra ergon_ingestion/ergon_ingestion-> passeduv run slopcop --warn-only ergon_core/ergon_core ergon_builtins/ergon_builtins ergon_cli/ergon_cli ergon_infra ergon_ingestion/ergon_ingestion-> passed with warnings onlyuv run python -m ergon_core.core.application.testing.suppression_budget-> passeduv run xenon --max-absolute F --max-modules E --max-average C ergon_core ergon_builtins ergon_cli ergon_infra ergon_ingestion-> passedpnpm -C ergon-dashboard run generate:contracts:rest-> passedpnpm -C ergon-dashboard run generate:contracts-> passedpnpm -C ergon-dashboard run lint-> passedpnpm -C ergon-dashboard run typecheck-> passedpnpm -C ergon-dashboard run test:unit-> 135 passedNotes
tests/examples -qstill includes existing failures outside this stack; the new TRL example import test passes in isolation and with the focused stack suite.