Skip to content

PR 03: Add public sample authoring API - #122

Closed
cm2435 wants to merge 7 commits into
codex/episode-sample-pr02-rollout-batch-samplesfrom
codex/episode-sample-pr03-public-authoring-api
Closed

PR 03: Add public sample authoring API#122
cm2435 wants to merge 7 commits into
codex/episode-sample-pr02-rollout-batch-samplesfrom
codex/episode-sample-pr03-public-authoring-api

Conversation

@cm2435

@cm2435 cm2435 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Review Guide

Stack position: PR 03, base codex/episode-sample-pr02-rollout-batch-samples, head codex/episode-sample-pr03-public-authoring-api.

Implements RFC Docs

  • 01-exec-summary.md: introduces Experiment, Environment, Sample, and Sampler as the new authoring vocabulary.
  • 02-core-authoring-api.md: public package surface and submit ergonomics.
  • 03-core-runtime-persistence-fe.md: locked decisions around iter_samples, optional all_samples, and sampler boundaries.
  • 09-implementation-plan/04-pr-03-public-sample-authoring-api.md.

Why This PR Exists

This PR creates the public authoring seam without making it responsible for persistence or runtime execution. Users can describe samples, environments, experiments, and samplers, while later PRs wire those objects into persistence and materialization.

What Actually Changes

  • Adds ergon_core.api.experiment with:
    • Sample
    • Environment
    • Experiment
    • ExperimentRef
    • ExperimentSubmitResult
    • Sampler
    • RandomSampler
    • SamplingContext
    • SamplingHistory
    • persist_experiment
  • Sample validates real public Task values, task slugs, dependencies, root tasks, and lookup by task key.
  • Experiment.submit(...) validates and delegates to an injected submission service.
  • persist_experiment(...) delegates through a thin public port.
  • Root ergon_core.api exports the beginner-facing names.
  • Boundary tests keep persistence/SQLModel out of the public API.

Gotchas / Review Risks

  • RandomSampler.select(...) returns every candidate in randomized order; it does not truncate to k. In this design, upstream candidate request sizing controls k.
  • Environment.iter_candidate_samples() and the stream cursor land here before candidate-pool persistence, so they look ahead to PR 04.
  • This PR intentionally keeps Episode, SourceDescriptor, EnvironmentSource, and ExperimentRunHandle out of the public surface.
  • test_public_experiment_submit_smoke.py imports the future ExperimentSubmissionService and is strict-xfailed until PR 05.
  • Temporary submit/persistence protocols exist under core experiments and are replaced or wired downstack.

Cleaned Later

  • PR 04 removes the temporary persistence-port shape by wiring real experiment persistence.
  • PR 05 replaces the temporary submit service with materialization and launch.
  • PR 06 fills in builtin Environment.iter_samples() implementations.
  • Old persist_benchmark and definition launch remain until the deletion PR.

Validation Notes

The main review target is API shape and boundary tests, not runtime behavior yet. Current CI on this layer had lower-stack issues at the time of review: a stale frontend workflow-started schema and a RunCommunicationMessageDto import failure from inherited code.

@github-actions

Copy link
Copy Markdown

E2E smoke — minif2f

Screenshots pushed to screenshots/pr-122.

minif2f/4e155c6c-eb6a-4b5b-92be-172add7e7211-activity-stack.png
minif2f/4e155c6c-eb6a-4b5b-92be-172add7e7211-sad.png
minif2f/4e155c6c-eb6a-4b5b-92be-172add7e7211-visual-debugger-full.png
minif2f/510eee7b-112b-4359-a91d-80178157960b-activity-stack.png
minif2f/510eee7b-112b-4359-a91d-80178157960b-happy.png
minif2f/510eee7b-112b-4359-a91d-80178157960b-visual-debugger-full.png
minif2f/da346a3c-d058-4f07-bbc3-d37211df47c2-activity-stack.png
minif2f/da346a3c-d058-4f07-bbc3-d37211df47c2-happy.png
minif2f/da346a3c-d058-4f07-bbc3-d37211df47c2-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — swebench-verified

Screenshots pushed to screenshots/pr-122.

swebench-verified/2a6523bd-9502-4976-aff8-91d5e7bebe69-activity-stack.png
swebench-verified/2a6523bd-9502-4976-aff8-91d5e7bebe69-happy.png
swebench-verified/2a6523bd-9502-4976-aff8-91d5e7bebe69-visual-debugger-full.png
swebench-verified/c6314233-e542-477d-a470-ef871b805740-activity-stack.png
swebench-verified/c6314233-e542-477d-a470-ef871b805740-happy.png
swebench-verified/c6314233-e542-477d-a470-ef871b805740-visual-debugger-full.png
swebench-verified/ca0d82f1-ec94-45c0-9ecb-0b4e47188ead-activity-stack.png
swebench-verified/ca0d82f1-ec94-45c0-9ecb-0b4e47188ead-sad.png
swebench-verified/ca0d82f1-ec94-45c0-9ecb-0b4e47188ead-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — researchrubrics

Screenshots pushed to screenshots/pr-122.

researchrubrics/0684160d-24ad-4d04-8fdd-17a2fb175672-activity-stack.png
researchrubrics/0684160d-24ad-4d04-8fdd-17a2fb175672-happy.png
researchrubrics/0684160d-24ad-4d04-8fdd-17a2fb175672-visual-debugger-full.png
researchrubrics/6c4e33b3-da3f-43d0-bbf3-fb880f533caa-activity-stack.png
researchrubrics/6c4e33b3-da3f-43d0-bbf3-fb880f533caa-sad.png
researchrubrics/6c4e33b3-da3f-43d0-bbf3-fb880f533caa-visual-debugger-full.png
researchrubrics/79744770-fe7b-47f3-b8c3-73fb5c4886a1-activity-stack.png
researchrubrics/79744770-fe7b-47f3-b8c3-73fb5c4886a1-happy.png
researchrubrics/79744770-fe7b-47f3-b8c3-73fb5c4886a1-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — swebench-verified

Screenshots pushed to screenshots/pr-122.

swebench-verified/731f802e-606b-41ab-9f95-c37f0b008516-activity-stack.png
swebench-verified/731f802e-606b-41ab-9f95-c37f0b008516-sad.png
swebench-verified/731f802e-606b-41ab-9f95-c37f0b008516-visual-debugger-full.png
swebench-verified/81a84963-5926-420f-9352-e40b66ddc8f0-activity-stack.png
swebench-verified/81a84963-5926-420f-9352-e40b66ddc8f0-happy.png
swebench-verified/81a84963-5926-420f-9352-e40b66ddc8f0-visual-debugger-full.png
swebench-verified/f32eb2b6-4258-4865-b778-1f75a9cd7e30-activity-stack.png
swebench-verified/f32eb2b6-4258-4865-b778-1f75a9cd7e30-happy.png
swebench-verified/f32eb2b6-4258-4865-b778-1f75a9cd7e30-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — researchrubrics

Screenshots pushed to screenshots/pr-122.

researchrubrics/13f774d6-1fc8-415d-a668-3f1f7f058242-activity-stack.png
researchrubrics/13f774d6-1fc8-415d-a668-3f1f7f058242-sad.png
researchrubrics/13f774d6-1fc8-415d-a668-3f1f7f058242-visual-debugger-full.png
researchrubrics/a327e82b-289a-423a-bea7-82f14bf91fcf-activity-stack.png
researchrubrics/a327e82b-289a-423a-bea7-82f14bf91fcf-happy.png
researchrubrics/a327e82b-289a-423a-bea7-82f14bf91fcf-visual-debugger-full.png
researchrubrics/abd96246-44df-41fe-92fb-3074a1007234-activity-stack.png
researchrubrics/abd96246-44df-41fe-92fb-3074a1007234-happy.png
researchrubrics/abd96246-44df-41fe-92fb-3074a1007234-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — minif2f

Screenshots pushed to screenshots/pr-122.

minif2f/0e1e688d-6142-46ff-94ab-43f9d4ba2248-activity-stack.png
minif2f/0e1e688d-6142-46ff-94ab-43f9d4ba2248-happy.png
minif2f/0e1e688d-6142-46ff-94ab-43f9d4ba2248-visual-debugger-full.png
minif2f/9e3d0121-fbcb-400b-9651-c103c2e4321d-activity-stack.png
minif2f/9e3d0121-fbcb-400b-9651-c103c2e4321d-sad.png
minif2f/9e3d0121-fbcb-400b-9651-c103c2e4321d-visual-debugger-full.png
minif2f/c16b4cf9-6a0d-4cb5-adf8-c8a44bb232aa-activity-stack.png
minif2f/c16b4cf9-6a0d-4cb5-adf8-c8a44bb232aa-happy.png
minif2f/c16b4cf9-6a0d-4cb5-adf8-c8a44bb232aa-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — swebench-verified

Screenshots pushed to screenshots/pr-122.

swebench-verified/40afd937-539b-4618-90a4-fbf4b802df6a-activity-stack.png
swebench-verified/40afd937-539b-4618-90a4-fbf4b802df6a-happy.png
swebench-verified/40afd937-539b-4618-90a4-fbf4b802df6a-visual-debugger-full.png
swebench-verified/97ca855b-4272-4182-8288-9a83947564fd-activity-stack.png
swebench-verified/97ca855b-4272-4182-8288-9a83947564fd-happy.png
swebench-verified/97ca855b-4272-4182-8288-9a83947564fd-visual-debugger-full.png
swebench-verified/b4d89cb9-f8c7-4e92-98f0-fd889485417b-activity-stack.png
swebench-verified/b4d89cb9-f8c7-4e92-98f0-fd889485417b-sad.png
swebench-verified/b4d89cb9-f8c7-4e92-98f0-fd889485417b-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — researchrubrics

Screenshots pushed to screenshots/pr-122.

researchrubrics/67f2edd1-2b93-48de-afee-a5c0a872390c-activity-stack.png
researchrubrics/67f2edd1-2b93-48de-afee-a5c0a872390c-sad.png
researchrubrics/67f2edd1-2b93-48de-afee-a5c0a872390c-visual-debugger-full.png
researchrubrics/a518a68d-8ff8-4e44-ade9-5a7f0c3628c4-activity-stack.png
researchrubrics/a518a68d-8ff8-4e44-ade9-5a7f0c3628c4-happy.png
researchrubrics/a518a68d-8ff8-4e44-ade9-5a7f0c3628c4-visual-debugger-full.png
researchrubrics/d0970539-6e48-46e0-b9e9-9d44db1f5b28-activity-stack.png
researchrubrics/d0970539-6e48-46e0-b9e9-9d44db1f5b28-happy.png
researchrubrics/d0970539-6e48-46e0-b9e9-9d44db1f5b28-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — minif2f

Screenshots pushed to screenshots/pr-122.

minif2f/33c819e8-7c6d-45ac-806e-21145b0bc1e0-activity-stack.png
minif2f/33c819e8-7c6d-45ac-806e-21145b0bc1e0-happy.png
minif2f/33c819e8-7c6d-45ac-806e-21145b0bc1e0-visual-debugger-full.png
minif2f/39d488a0-a39d-4bc8-bbf0-7cb49ea05694-activity-stack.png
minif2f/39d488a0-a39d-4bc8-bbf0-7cb49ea05694-sad.png
minif2f/39d488a0-a39d-4bc8-bbf0-7cb49ea05694-visual-debugger-full.png
minif2f/7dfc5641-c08a-4a19-99ee-f925c1889c6c-activity-stack.png
minif2f/7dfc5641-c08a-4a19-99ee-f925c1889c6c-happy.png
minif2f/7dfc5641-c08a-4a19-99ee-f925c1889c6c-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — researchrubrics

Screenshots pushed to screenshots/pr-122.

researchrubrics/182cfcef-6ecf-48c3-a087-5ca1e3e14a57-activity-stack.png
researchrubrics/182cfcef-6ecf-48c3-a087-5ca1e3e14a57-happy.png
researchrubrics/182cfcef-6ecf-48c3-a087-5ca1e3e14a57-visual-debugger-full.png
researchrubrics/191f7863-2f8a-45ff-94f5-3db513a0c182-activity-stack.png
researchrubrics/191f7863-2f8a-45ff-94f5-3db513a0c182-sad.png
researchrubrics/191f7863-2f8a-45ff-94f5-3db513a0c182-visual-debugger-full.png
researchrubrics/bf348bf9-4f70-441e-af6a-9f1d120bc9ab-activity-stack.png
researchrubrics/bf348bf9-4f70-441e-af6a-9f1d120bc9ab-happy.png
researchrubrics/bf348bf9-4f70-441e-af6a-9f1d120bc9ab-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — swebench-verified

Screenshots pushed to screenshots/pr-122.

swebench-verified/19333d97-3d30-49ce-a867-df6c74028a5a-activity-stack.png
swebench-verified/19333d97-3d30-49ce-a867-df6c74028a5a-sad.png
swebench-verified/19333d97-3d30-49ce-a867-df6c74028a5a-visual-debugger-full.png
swebench-verified/5297f83d-3654-4de9-955d-7858dd80fbcf-activity-stack.png
swebench-verified/5297f83d-3654-4de9-955d-7858dd80fbcf-happy.png
swebench-verified/5297f83d-3654-4de9-955d-7858dd80fbcf-visual-debugger-full.png
swebench-verified/533bc85c-50f9-4fd8-a303-a34f57db6631-activity-stack.png
swebench-verified/533bc85c-50f9-4fd8-a303-a34f57db6631-happy.png
swebench-verified/533bc85c-50f9-4fd8-a303-a34f57db6631-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — minif2f

Screenshots pushed to screenshots/pr-122.

minif2f/578e9ae5-4795-451b-8aea-fff8059d1419-activity-stack.png
minif2f/578e9ae5-4795-451b-8aea-fff8059d1419-happy.png
minif2f/578e9ae5-4795-451b-8aea-fff8059d1419-visual-debugger-full.png
minif2f/806dc44f-3262-4dab-be78-631548dfba46-activity-stack.png
minif2f/806dc44f-3262-4dab-be78-631548dfba46-happy.png
minif2f/806dc44f-3262-4dab-be78-631548dfba46-visual-debugger-full.png
minif2f/f7712f9a-499e-4467-aaec-f47b0cbaef2a-activity-stack.png
minif2f/f7712f9a-499e-4467-aaec-f47b0cbaef2a-sad.png
minif2f/f7712f9a-499e-4467-aaec-f47b0cbaef2a-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — minif2f

Screenshots pushed to screenshots/pr-122.

minif2f/a255d3c6-003a-4f2a-8261-1d5eaf7cce08-activity-stack.png
minif2f/a255d3c6-003a-4f2a-8261-1d5eaf7cce08-happy.png
minif2f/a255d3c6-003a-4f2a-8261-1d5eaf7cce08-visual-debugger-full.png
minif2f/c4e9eb41-7861-4f19-9467-88f48768ec4d-activity-stack.png
minif2f/c4e9eb41-7861-4f19-9467-88f48768ec4d-happy.png
minif2f/c4e9eb41-7861-4f19-9467-88f48768ec4d-visual-debugger-full.png
minif2f/e7fad688-fb7a-49f5-9a2c-99e156d69cae-activity-stack.png
minif2f/e7fad688-fb7a-49f5-9a2c-99e156d69cae-sad.png
minif2f/e7fad688-fb7a-49f5-9a2c-99e156d69cae-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — researchrubrics

Screenshots pushed to screenshots/pr-122.

researchrubrics/050bedbc-71ea-4420-915a-cabbdda1467e-activity-stack.png
researchrubrics/050bedbc-71ea-4420-915a-cabbdda1467e-happy.png
researchrubrics/050bedbc-71ea-4420-915a-cabbdda1467e-visual-debugger-full.png
researchrubrics/54139384-7938-4a06-839b-73ad031de523-activity-stack.png
researchrubrics/54139384-7938-4a06-839b-73ad031de523-happy.png
researchrubrics/54139384-7938-4a06-839b-73ad031de523-visual-debugger-full.png
researchrubrics/5b162708-5941-4909-b845-969da9fc43a1-activity-stack.png
researchrubrics/5b162708-5941-4909-b845-969da9fc43a1-sad.png
researchrubrics/5b162708-5941-4909-b845-969da9fc43a1-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — swebench-verified

Screenshots pushed to screenshots/pr-122.

swebench-verified/00803049-248d-4ec8-825d-f588d3d8eaf5-activity-stack.png
swebench-verified/00803049-248d-4ec8-825d-f588d3d8eaf5-happy.png
swebench-verified/00803049-248d-4ec8-825d-f588d3d8eaf5-visual-debugger-full.png
swebench-verified/b2c92e21-5781-4555-9629-498b27bf347d-activity-stack.png
swebench-verified/b2c92e21-5781-4555-9629-498b27bf347d-sad.png
swebench-verified/b2c92e21-5781-4555-9629-498b27bf347d-visual-debugger-full.png
swebench-verified/b58acc9f-b2e3-4046-bbc0-1e5345dd3d24-activity-stack.png
swebench-verified/b58acc9f-b2e3-4046-bbc0-1e5345dd3d24-happy.png
swebench-verified/b58acc9f-b2e3-4046-bbc0-1e5345dd3d24-visual-debugger-full.png

@cm2435
cm2435 force-pushed the codex/episode-sample-pr03-public-authoring-api branch from c323335 to c20f49c Compare May 27, 2026 14:00
@github-actions

Copy link
Copy Markdown

E2E smoke — swebench-verified

Screenshots pushed to screenshots/pr-122.

swebench-verified/256e964e-40a8-47fa-8a6a-56a2f7d04b70-activity-stack.png
swebench-verified/256e964e-40a8-47fa-8a6a-56a2f7d04b70-sad.png
swebench-verified/256e964e-40a8-47fa-8a6a-56a2f7d04b70-visual-debugger-full.png
swebench-verified/506c9277-e546-402f-9f2b-194e82c9f2f5-activity-stack.png
swebench-verified/506c9277-e546-402f-9f2b-194e82c9f2f5-happy.png
swebench-verified/506c9277-e546-402f-9f2b-194e82c9f2f5-visual-debugger-full.png
swebench-verified/e2b1d516-73a9-4ab7-9e0e-9f793d63701b-activity-stack.png
swebench-verified/e2b1d516-73a9-4ab7-9e0e-9f793d63701b-happy.png
swebench-verified/e2b1d516-73a9-4ab7-9e0e-9f793d63701b-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — minif2f

Screenshots pushed to screenshots/pr-122.

minif2f/2254c703-f4ee-406e-8128-61c1f4b49284-activity-stack.png
minif2f/2254c703-f4ee-406e-8128-61c1f4b49284-sad.png
minif2f/2254c703-f4ee-406e-8128-61c1f4b49284-visual-debugger-full.png
minif2f/48e0ed09-f03b-44b9-a3b0-511b673088b8-activity-stack.png
minif2f/48e0ed09-f03b-44b9-a3b0-511b673088b8-happy.png
minif2f/48e0ed09-f03b-44b9-a3b0-511b673088b8-visual-debugger-full.png
minif2f/9f8e3c28-5c40-45b1-b2fb-29579c79ee4a-activity-stack.png
minif2f/9f8e3c28-5c40-45b1-b2fb-29579c79ee4a-happy.png
minif2f/9f8e3c28-5c40-45b1-b2fb-29579c79ee4a-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — researchrubrics

Screenshots pushed to screenshots/pr-122.

researchrubrics/77d2c083-7414-448d-82ab-84010708cef9-activity-stack.png
researchrubrics/77d2c083-7414-448d-82ab-84010708cef9-happy.png
researchrubrics/77d2c083-7414-448d-82ab-84010708cef9-visual-debugger-full.png
researchrubrics/b76d9db0-02bc-44a0-a598-0bf9f606e536-activity-stack.png
researchrubrics/b76d9db0-02bc-44a0-a598-0bf9f606e536-happy.png
researchrubrics/b76d9db0-02bc-44a0-a598-0bf9f606e536-visual-debugger-full.png
researchrubrics/e7d88e4c-96ae-424d-8e6f-21b5cd3bd666-activity-stack.png
researchrubrics/e7d88e4c-96ae-424d-8e6f-21b5cd3bd666-sad.png
researchrubrics/e7d88e4c-96ae-424d-8e6f-21b5cd3bd666-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — researchrubrics

Screenshots pushed to screenshots/pr-122.

researchrubrics/1a2fc233-e746-490c-8b4d-df0889a544ed-activity-stack.png
researchrubrics/1a2fc233-e746-490c-8b4d-df0889a544ed-happy.png
researchrubrics/1a2fc233-e746-490c-8b4d-df0889a544ed-visual-debugger-full.png
researchrubrics/7a6df61b-9458-4112-b238-9bfd3825ab3a-activity-stack.png
researchrubrics/7a6df61b-9458-4112-b238-9bfd3825ab3a-happy.png
researchrubrics/7a6df61b-9458-4112-b238-9bfd3825ab3a-visual-debugger-full.png
researchrubrics/7dd467a8-4d8b-4ef3-b274-6967c7fab530-activity-stack.png
researchrubrics/7dd467a8-4d8b-4ef3-b274-6967c7fab530-sad.png
researchrubrics/7dd467a8-4d8b-4ef3-b274-6967c7fab530-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — minif2f

Screenshots pushed to screenshots/pr-122.

minif2f/09c0756f-534e-4fa1-b095-862e83e3e2fd-activity-stack.png
minif2f/09c0756f-534e-4fa1-b095-862e83e3e2fd-happy.png
minif2f/09c0756f-534e-4fa1-b095-862e83e3e2fd-visual-debugger-full.png
minif2f/39a6690f-1e8c-4fcf-b27e-a4548f654d4e-activity-stack.png
minif2f/39a6690f-1e8c-4fcf-b27e-a4548f654d4e-sad.png
minif2f/39a6690f-1e8c-4fcf-b27e-a4548f654d4e-visual-debugger-full.png
minif2f/4c3f42f0-a627-47d0-b25f-1850b957d6d1-activity-stack.png
minif2f/4c3f42f0-a627-47d0-b25f-1850b957d6d1-happy.png
minif2f/4c3f42f0-a627-47d0-b25f-1850b957d6d1-visual-debugger-full.png

@github-actions

Copy link
Copy Markdown

E2E smoke — swebench-verified

Screenshots pushed to screenshots/pr-122.

swebench-verified/39f6c680-3493-4c9d-9169-9482b71d6cfc-activity-stack.png
swebench-verified/39f6c680-3493-4c9d-9169-9482b71d6cfc-happy.png
swebench-verified/39f6c680-3493-4c9d-9169-9482b71d6cfc-visual-debugger-full.png
swebench-verified/912483ba-2645-4b60-958f-622b4006e9a6-activity-stack.png
swebench-verified/912483ba-2645-4b60-958f-622b4006e9a6-sad.png
swebench-verified/912483ba-2645-4b60-958f-622b4006e9a6-visual-debugger-full.png
swebench-verified/d3110aa7-3594-4c96-b016-f53a1a93384d-activity-stack.png
swebench-verified/d3110aa7-3594-4c96-b016-f53a1a93384d-happy.png
swebench-verified/d3110aa7-3594-4c96-b016-f53a1a93384d-visual-debugger-full.png



@runtime_checkable
class ExperimentSubmissionService(Protocol):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be moved to core marked explicitly with a TODO for the PR in which it is intended to land

raise NotImplementedError("Streaming environments may not materialize all samples")
return list(self.iter_samples())

def iter_samples(self) -> Iterator[Sample]:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be marked with a todo for where we plan on implimenting in what PR



@runtime_checkable
class ExperimentPersistenceService(Protocol):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be moved to core with a todo on when we plan to impliment

from ergon_core.api.benchmark import Task


def _task_key(task: Task) -> str:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline this logic in its call sites

return task.task_slug


def _task_dependencies(task: Task) -> tuple[str, ...]:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline this logic in its call sites



@runtime_checkable
class ExperimentSubmissionPort(Protocol):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see anywhere on PR#2 where this is actually implimented, double check for me why we need this? should it be flattened

) -> "ExperimentSubmitResult": ...


class ExperimentRef(BaseModel):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

come up with a better name for this schema



@runtime_checkable
class SamplingHistory(Protocol):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't really be a protocol (I can't see it constructed anywhere feels like itt could be a method on SamplingContext



@runtime_checkable
class Sampler(Protocol):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similarly: I think this should be a BaseModel with an Abstractmethod that users have to subclass to make it clearer this is a concrete base class (like we do for experiment)

@cm2435

cm2435 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

Closed after landing the cumulative episode/sample stack snapshot through PR132 directly onto dev in merge commit 1c22130. This PR's changes are included in dev.

@cm2435 cm2435 closed this Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant