cmpnd 0.111.0__tar.gz → 0.111.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cmpnd-0.111.0 → cmpnd-0.111.2}/PKG-INFO +6 -3
- {cmpnd-0.111.0 → cmpnd-0.111.2}/README.md +5 -2
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/callback.py +9 -2
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/optimizers/tracker.py +19 -8
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/exporter_http.py +65 -48
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/sender.py +23 -6
- {cmpnd-0.111.0 → cmpnd-0.111.2}/docs/ingest-transport.md +7 -3
- {cmpnd-0.111.0 → cmpnd-0.111.2}/docs/sdk-instrumentation.md +1 -1
- {cmpnd-0.111.0 → cmpnd-0.111.2}/pyproject.toml +1 -1
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_exporter_queue.py +53 -2
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_ingest_second_producer.py +4 -4
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_lm_usage_shapes.py +35 -1
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimize_terminal_failure.py +17 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_queue_budget.py +59 -1
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_reversible_failures.py +1 -1
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_sender_scenarios.py +35 -2
- {cmpnd-0.111.0 → cmpnd-0.111.2}/uv.lock +1 -1
- {cmpnd-0.111.0 → cmpnd-0.111.2}/.gitignore +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/AGENTS.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/CLAUDE.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/LINEAGE.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_account.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_assessments.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_authored_import.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_deployments.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_exporter_pool.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_gepa_patch.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_http.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_label_vocabulary.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_program_patch.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_provider_types.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_provider_writes.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_reanchor_evidence.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_reanchor_patch.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_runtime_tools.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_timespec.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_traces.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/_valsets.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/authored.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/api_client.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/admin.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/assessments.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/auth.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/datasets.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/deployments.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/evals.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/feedback.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/kernel_lines.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/labels.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/login.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/optimizations.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/org.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/programs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/provider_credentials.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/providers.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/skill.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/tool_servers.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/top.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/traces.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/commands/valsets.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/credentials.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/deprecation.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/label_args.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/pagination.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/shell.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/skill/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/skill/_vendor/drskill/LICENSE +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/skill/_vendor/drskill/VENDOR.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/skill/_vendor/drskill/harnesses.toml +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/skill/agents.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/skill/bundle.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/skill/install.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/skill/offer.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/trace_render.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/tree_help.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/verbs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/cli/views.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/client.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/configuration.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/context.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/credentials.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/dataset_sync.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/datasets.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/decorators.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/deployment.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/deployment_metadata.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/deployment_runs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/eval_handler.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/execution.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/exporter.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/exporter_http.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/field_types.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/helpers.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/identity.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/imaging.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/ir/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/ir/decode.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/ir/encode.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/ir/hash.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/ir/program.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/ir/reflection.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/ir/types.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/ir/xxh64.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/kernel_lines.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/labels.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/lm_configuration.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/mcp_servers.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/models.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/named_programs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/optimization.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/optimizers/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/optimizers/gepa.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/optimizers/gepa_callback.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/optimizers/resume.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/packaging.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/program_naming.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/programs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/references.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/retry.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/SKILL.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/examples/support_triage/data/train.jsonl +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/examples/support_triage/data/val.jsonl +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/examples/support_triage/optimize.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/examples/support_triage/program.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/examples/support_triage/task.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/examples/support_triage/task_gpt5mini.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/examples/support_triage/task_haiku.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/references/deploy.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/references/dspy.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/references/feedback.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/references/gaps.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/references/observe.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/references/optimize.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/references/setup.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/references/tools.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/skill_bundle/scripts/tools_block.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/traces.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd/versions.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/LINEAGE.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/bodies.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/client_floor.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/network.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/process_local.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/program_names.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/protocols.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/py.typed +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/queue_budget.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/rejections.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/request_log.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/retry.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/span_context.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/storable.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/trace_facts.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/cmpnd_ingest/user_agent.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/docs/2026-04-02-code-review.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/docs/cli.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/docs/client.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/docs/custom-proposer.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/docs/plans/2026-04-05-train-val-dataset-capture-design.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/docs/plans/2026-04-05-train-val-dataset-capture.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/docs/reading-traces.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/docs/versions.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/examples/generalizing_proposer.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/examples/local_ollama.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/audit-sdist.sh +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/capture_review_run.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/check-pip-install.sh +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/check_release_artifacts.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/export-bedrock-token.sh +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/fixtures/review_run.json.gz +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/fork-matrix.sh +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/gepa_resume_bug.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/install-test-env.sh +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/release-gate.sh +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/release-real-models.sh +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/require_version_bump.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/seed_review_run.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/selfhost_compat.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/scripts/test-in-linux.sh +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/stubs/dspy/__init__.pyi +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/stubs/dspy/primitives/__init__.pyi +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/stubs/dspy/primitives/prediction.pyi +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/stubs/dspy/utils/__init__.pyi +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/stubs/dspy/utils/callback.pyi +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/stubs/dspy/utils/dummies.pyi +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/_credential_route.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/_deployment_signature_helpers.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/_exporter_helpers.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/_fake_clock.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/_fresh_interpreter.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/_identity_helpers.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/_resolve_refs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/_traced_run.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/conftest.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/dspy_features.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/committee_task.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/conftest.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/continuation_task.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/data/committee_train.ndjson.gz +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/data/committee_val.ndjson.gz +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/fake_lm.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/helpers.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/target_capabilities.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_assessments_cli.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_capture_prompts.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_composite_module.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_dataset_auto_creation.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_deploy_execute.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_deploy_pandas.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_deploy_programs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_edge_cases.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_example_hash.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_gepa_optimization.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_interpreter_spans.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_lm_accuracy.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_module_tracing.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_optimization_lineage.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_optimization_metric_identity.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_optimize_authored_metric.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_optimize_continuation.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_optimize_custom_proposer.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_optimize_failures.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_optimize_loop.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_optimize_review_committee.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_optimize_server_owned_completion.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_parallel_export.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_program_versions.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_project_attribution.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_react_tool_spans.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_reanchor_optimization.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_save_load.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_trace_structure.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_traces_read.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_user_attribution.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/e2e/test_valsets_cli.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/01_predict_qa.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/02_predict_renamed_field.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/03_chain_of_thought_qa.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/04_predict_richer_types.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/05_composite_two_predicts.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/06_multichaincomparison.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/07_program_of_thought.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/08_opaque_module.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/09_predict_pydantic_field.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/10_react.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/11_refine.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/12_retrieve.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/13_knn.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/14_parallel.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/identity_vectors/README.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/ingest_conformance.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/authored_optimize/judge.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/authored_optimize/optimize_hosted.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/conftest.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/hosted_mcp_tool_optimize_probe.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/hosted_optimize_probe.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/optimization_run_probe.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/system_one_deployment.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/test_cli_deploy_smoketest.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/test_logs_renders_traces.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/test_optimization_run.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/test_optimizing_progress.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/integration/test_unhappy_path.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/lm15_prompt_fixture.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/lm15_prompts/four_turn_predict.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/lm15_prompts/rlm_six_turns.json +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/__main__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/drain.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/ingest.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/latency_transport.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/rlm_shape.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/rlm_size_report.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/sender/README.md +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/sender/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/sender/asgi_app.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/sender/baseline.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/sender/drive_server.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/sender/exits.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/sender/outage.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/sender/outage_proxy.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/sender/pools.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/sender/program.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/sender/verify.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/sweep.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/test_rlm_shape.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/load/test_rlm_size_report.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/conftest.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/seed_parity.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/test_auth.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/test_datasets.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/test_deployments.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/test_evals.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/test_health.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/test_modules.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/test_optimizations.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/test_programs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/test_signatures.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/test_trace_streaming.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/parity/test_traces.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/_provider.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/_readiness.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/_reliability.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/_result.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/mint_bedrock_token.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_bedrock_converse.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_deploy_programs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_multi_client_stress.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_optimize_client_committee.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_optimize_continuation.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_optimize_loop.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_optimize_loop_wasm.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_optimize_stress.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_provider_roles.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_readiness.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_real_provider_twins.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_reliability.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_reliability_classify.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_rlm_wasm.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_skill_agent.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/real_models/test_trace_search.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/span_reference_fixture.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_adapter_reentrancy.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_assessments_api.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_authored.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_authored_binding_credentials.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_authored_bundle_collisions.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_authored_metric_contract.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_authored_named_models.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_authored_optimize.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_callback.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_candidate_lineage.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_check_release_artifacts.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/conftest.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_admin.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_api_client.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_assessments.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_auth.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_credentials.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_datasets.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_deployment_runs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_deployments.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_evals.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_feedback.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_json_flag.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_login.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_main.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_optimizations.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_org.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_pagination.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_parity.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_programs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_provider_credentials.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_provider_flags.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_providers.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_schema_sample.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_shell.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_skill.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_skill_offer.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_tool_servers.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_top.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_traces.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_traces_program_and_module.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_traces_search_wire.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_tree_help.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cli/test_valsets.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_client.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_client_floor.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_client_program_names.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_clustering/__init__.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_clustering/conftest.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_clustering/test_edge_cases.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_clustering/test_hash_consistency.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_cmp551_grouping_identity.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_configuration.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_context.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_context_propagation.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_credential_kwargs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_credential_selection.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_dataset_polling.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_dataset_sync.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_datasets.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_decision_client_spans.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_decorators.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_deploy.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_deploy_mcp_tool_references.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_deploy_program_id.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_deployment_metadata.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_deployment_runs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_deployment_targets.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_deployments_read.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_dspy_version_label.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_eval.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_eval_example_attribution.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_eval_example_failures.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_eval_program_id.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_eval_start.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_eval_trace_grouping.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_exception_paths.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_execute.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_execute_run_identity.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_exporter.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_exporter_fork_exec.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_exporter_program_names.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_exporter_real.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_exporter_rejections.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_fake_lm.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_field_types.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_forward_access_warning.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_gepa_callback.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_gepa_integration.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_gepa_output_normalization.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_gepa_resume.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_identity.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_imaging.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_import_weight.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_ingest_conformance.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_integration.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_interpreter_callback.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_ir_encoder_properties.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_ir_golden_vectors.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_ir_roundtrip.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_kernel_lines.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_label_vocabulary.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_lm15_native_calls.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_lm15_prompt_fixtures.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_lm15_prompt_references.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_lm_configuration.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_mcp_tools.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_model_list_protocol.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_models.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_multi_client_stress_readiness.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_no_signature_hash_on_the_wire.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimization_phase_callback.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimization_program_names.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimization_progress.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimization_start.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimize.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimize_budget.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimize_gepa_settings.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimize_labels.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimize_lift.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimize_lm_model_type.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimize_lms.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimize_proposer.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimize_reflection_lm.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_optimize_split.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_owned_trace_streaming.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_packaging.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_packaging_callable_source.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_packaging_mcp_tools.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_packaging_program_source.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_poll_until.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_process_local.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_program_id_deprecation.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_program_identity.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_program_lineage_persist.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_program_lm_binding.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_program_names_in_deploy.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_program_naming.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_programs_create.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_project_payload.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_provider_keyword.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_provider_models.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_provider_types.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_provider_values.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_provider_writes.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_real_provider_twins_readiness.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_reanchor_evidence.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_reanchor_patch.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_reflector_properties.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_reflector_smoke.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_release_gate_script.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_release_real_models_script.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_replaced_names.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_repro_reactv2_bugs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_require_version_bump.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_retry.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_rlm_tool_spans.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_run_attribution_paths.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_runtime_tools.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_schemas.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_seal_lm_credential.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_seed_review_run.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_sending_settings.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_signature_inputs.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_skill_bundle.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_skill_tools_block.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_span_references.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_span_sent_once.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_span_submission.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_span_submission_wire_contract.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_stored_login.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_system_one.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_token_attribution.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_trace_context_concurrency.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_trace_fact_wire_contract.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_trace_facts.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_trace_labels.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_trace_render.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_traces_label_search_busy.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_traces_read.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_tracked_gepa.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_tracker_enrich.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_truncation.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_upload_auth_headers.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_usage_dialect.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_user_agent.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_valsets_api.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_versions.py +0 -0
- {cmpnd-0.111.0 → cmpnd-0.111.2}/tests/test_xxh64.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cmpnd
|
|
3
|
-
Version: 0.111.
|
|
3
|
+
Version: 0.111.2
|
|
4
4
|
Summary: DSPy observability and deployment SDK for cmpnd
|
|
5
5
|
Project-URL: Homepage, https://cmpnd.ai
|
|
6
6
|
Author-email: cmpnd <hello@cmpnd.ai>
|
|
@@ -826,8 +826,11 @@ configures before it forks does that work once.
|
|
|
826
826
|
finishes, or as soon as the request before it returns, so an exit that skips
|
|
827
827
|
the SDK's exit flush loses only the traces of about the last round trip.
|
|
828
828
|
- **At exit**, the SDK spends up to five seconds sending what is still queued.
|
|
829
|
-
|
|
830
|
-
|
|
829
|
+
When that time runs out, it logs how many records it never sent and how many
|
|
830
|
+
were still sending. Call `cmpnd.flush(timeout)` before the program ends to
|
|
831
|
+
give a large backlog more time. The SDK flushes at exit in a
|
|
832
|
+
`multiprocessing` child too, which leaves without running `atexit` handlers
|
|
833
|
+
before Python 3.13. Two kinds of exit skip it:
|
|
831
834
|
- `Pool.terminate()` kills the workers, and leaving a `with Pool()` block
|
|
832
835
|
calls it. Call `pool.close()` and `pool.join()` first, or `cmpnd.flush()` at
|
|
833
836
|
the end of the task.
|
|
@@ -772,8 +772,11 @@ configures before it forks does that work once.
|
|
|
772
772
|
finishes, or as soon as the request before it returns, so an exit that skips
|
|
773
773
|
the SDK's exit flush loses only the traces of about the last round trip.
|
|
774
774
|
- **At exit**, the SDK spends up to five seconds sending what is still queued.
|
|
775
|
-
|
|
776
|
-
|
|
775
|
+
When that time runs out, it logs how many records it never sent and how many
|
|
776
|
+
were still sending. Call `cmpnd.flush(timeout)` before the program ends to
|
|
777
|
+
give a large backlog more time. The SDK flushes at exit in a
|
|
778
|
+
`multiprocessing` child too, which leaves without running `atexit` handlers
|
|
779
|
+
before Python 3.13. Two kinds of exit skip it:
|
|
777
780
|
- `Pool.terminate()` kills the workers, and leaving a `with Pool()` block
|
|
778
781
|
calls it. Call `pool.close()` and `pool.join()` first, or `cmpnd.flush()` at
|
|
779
782
|
the end of the task.
|
|
@@ -288,6 +288,7 @@ def _normalize_usage_evidence(usage: Any) -> dict[str, int | None]:
|
|
|
288
288
|
_usage_field(usage, "cache_write_tokens"),
|
|
289
289
|
_usage_field(usage, "cache_creation_input_tokens"),
|
|
290
290
|
_usage_detail(usage, "prompt_tokens_details", "cache_creation_tokens"),
|
|
291
|
+
_usage_detail(usage, "prompt_tokens_details", "cache_write_tokens"),
|
|
291
292
|
)
|
|
292
293
|
cache_write_5m = _reported_count(
|
|
293
294
|
_usage_detail(usage, "cache_creation", "ephemeral_5m_input_tokens"),
|
|
@@ -1731,13 +1732,19 @@ class _LMMixin(_CallbackBase):
|
|
|
1731
1732
|
evidence = _normalize_usage_evidence(usage)
|
|
1732
1733
|
for name, value in evidence.items():
|
|
1733
1734
|
setattr(observation, name, value)
|
|
1735
|
+
# A chat or responses prompt count holds cache writes as well as cache
|
|
1736
|
+
# reads: OpenAI reports both in prompt_tokens_details, and LiteLLM adds
|
|
1737
|
+
# Anthropic's cache_creation_input_tokens to prompt_tokens.
|
|
1738
|
+
cache_writes = observation.cache_write_tokens or 0
|
|
1734
1739
|
if (
|
|
1735
1740
|
observation.prompt_tokens is not None
|
|
1736
1741
|
and observation.cache_read_tokens is not None
|
|
1737
1742
|
and observation.prompt_inclusion == "includes_cache_reads"
|
|
1738
|
-
and observation.cache_read_tokens <= observation.prompt_tokens
|
|
1743
|
+
and observation.cache_read_tokens + cache_writes <= observation.prompt_tokens
|
|
1739
1744
|
):
|
|
1740
|
-
observation.fresh_input_tokens =
|
|
1745
|
+
observation.fresh_input_tokens = (
|
|
1746
|
+
observation.prompt_tokens - observation.cache_read_tokens - cache_writes
|
|
1747
|
+
)
|
|
1741
1748
|
elif observation.prompt_tokens is not None and observation.prompt_inclusion == "excludes_cache_reads":
|
|
1742
1749
|
observation.fresh_input_tokens = observation.prompt_tokens
|
|
1743
1750
|
|
|
@@ -913,9 +913,8 @@ class OptimizationTracker:
|
|
|
913
913
|
# Export via cmpnd exporter: create, update, or skip — see _flush_terminal.
|
|
914
914
|
# Best-effort for the same reason finalize_error's flush is: the caller is
|
|
915
915
|
# holding a compiled program that cost real money to produce, and an
|
|
916
|
-
# unreachable backend must not be what takes it away from them.
|
|
917
|
-
# writes over the network
|
|
918
|
-
# the old fire-and-forget enqueue could not.
|
|
916
|
+
# unreachable backend must not be what takes it away from them. Every arm
|
|
917
|
+
# writes over the network before returning, so any of them can raise.
|
|
919
918
|
try:
|
|
920
919
|
self._flush_terminal()
|
|
921
920
|
except Exception:
|
|
@@ -964,13 +963,25 @@ class OptimizationTracker:
|
|
|
964
963
|
context.set_optimization_program_id(self.optimization_run_id, self.program_id)
|
|
965
964
|
|
|
966
965
|
def _export_update(self) -> None:
|
|
967
|
-
"""
|
|
966
|
+
"""Write the closing record of a run serve already holds. Blocking, never raises.
|
|
967
|
+
|
|
968
|
+
A run whose closing record does not land reads ``running`` on serve, so a
|
|
969
|
+
failure names the run.
|
|
970
|
+
"""
|
|
968
971
|
exp = self._active_exporter()
|
|
969
|
-
if exp:
|
|
970
|
-
exp.export_optimization_complete(self)
|
|
971
|
-
logger.debug(f"Updated optimization run {self.optimization_run_id}")
|
|
972
|
-
else:
|
|
972
|
+
if not exp:
|
|
973
973
|
logger.warning("No exporter available, optimization run not updated")
|
|
974
|
+
return
|
|
975
|
+
try:
|
|
976
|
+
exp.export_optimization_complete(self)
|
|
977
|
+
except Exception as e:
|
|
978
|
+
logger.error(
|
|
979
|
+
"cmpnd: optimization run %s was not closed on cmpnd; it will show running (%s)",
|
|
980
|
+
self.optimization_run_id,
|
|
981
|
+
e,
|
|
982
|
+
)
|
|
983
|
+
return
|
|
984
|
+
logger.debug(f"Updated optimization run {self.optimization_run_id}")
|
|
974
985
|
|
|
975
986
|
def _export(self) -> None:
|
|
976
987
|
"""Write a run that was never start()ed, in one go at the end.
|
|
@@ -449,8 +449,8 @@ def _may_resend_a_minting_post(exc: BaseException) -> bool:
|
|
|
449
449
|
class ExportItem:
|
|
450
450
|
"""Item in the export queue."""
|
|
451
451
|
|
|
452
|
-
# item_type: "trace", "span", "eval_run", "
|
|
453
|
-
# "
|
|
452
|
+
# item_type: "trace", "span", "eval_run", "optimization_progress",
|
|
453
|
+
# "trace_start", or "trace_finalize"
|
|
454
454
|
item_type: str
|
|
455
455
|
# Tag-driven dispatch (item_type → method on data). pyright can't
|
|
456
456
|
# narrow the union across the if/elif chain in _flush_batch, so each
|
|
@@ -563,12 +563,15 @@ def _producer_context(record: TraceRecord) -> ExportContext | None:
|
|
|
563
563
|
_SHEDDABLE_ITEM_TYPES = frozenset({"span"})
|
|
564
564
|
|
|
565
565
|
# The records that settle something a producer recorded: a finished trace, a trace's
|
|
566
|
-
# finalize, a finished eval
|
|
566
|
+
# finalize, a finished eval run. Each wakes an idle lane at once, so a
|
|
567
567
|
# process that exits without running an exit hook, as a SIGTERM, ``os._exit`` or
|
|
568
568
|
# ``Pool.terminate()`` makes it, loses only what it recorded in the last round trip,
|
|
569
569
|
# not in the last flush interval. A start is not one of them: it waits for its trace,
|
|
570
570
|
# so a trace that finishes within the interval still leaves in one request.
|
|
571
|
-
_SETTLING_ITEM_TYPES = frozenset({"trace", "encoded_trace", "trace_finalize", "eval_run"
|
|
571
|
+
_SETTLING_ITEM_TYPES = frozenset({"trace", "encoded_trace", "trace_finalize", "eval_run"})
|
|
572
|
+
|
|
573
|
+
# How many closed optimization runs a lane remembers, to skip progress still queued for them.
|
|
574
|
+
_CLOSED_RUNS_KEPT = 1024
|
|
572
575
|
|
|
573
576
|
# How long a lane holds a trace's start back, waiting for the trace to finish. A
|
|
574
577
|
# start sent on its own costs a request of its own, and a start queued with its
|
|
@@ -870,6 +873,12 @@ class BatchExporter:
|
|
|
870
873
|
self._wake_sent = False
|
|
871
874
|
# Set by an enqueue that queued a settling record, cleared when a batch takes.
|
|
872
875
|
self._settling_queued = False
|
|
876
|
+
# The optimization runs this lane closed most recently, oldest first. Their queued
|
|
877
|
+
# progress is never sent. Progress is queued before its run closes, so a run's
|
|
878
|
+
# progress has long left the queue by the time _CLOSED_RUNS_KEPT more runs close.
|
|
879
|
+
self._closed_runs: collections.OrderedDict[str, None] = collections.OrderedDict()
|
|
880
|
+
# Whether the lane reported at exit what it could not send, so no hook repeats it.
|
|
881
|
+
self._reported_at_exit = False
|
|
873
882
|
# The traces whose start the lane took and whose finished body or finalize it
|
|
874
883
|
# has not. A trace in here always settles: its terminal record is never shed
|
|
875
884
|
# without one that settles it. Bounded by the traces running at once.
|
|
@@ -1553,7 +1562,7 @@ class BatchExporter:
|
|
|
1553
1562
|
try:
|
|
1554
1563
|
self._send_json_retrying(self._sync_http_client(), "PUT", path, payload)
|
|
1555
1564
|
except Exception as e:
|
|
1556
|
-
raise RuntimeError(f"failed to
|
|
1565
|
+
raise RuntimeError(f"failed to write the run via {path}: {e}") from e
|
|
1557
1566
|
|
|
1558
1567
|
def _sync_http_client(self) -> httpx.Client:
|
|
1559
1568
|
self._own_process()
|
|
@@ -1626,11 +1635,24 @@ class BatchExporter:
|
|
|
1626
1635
|
self._enqueue(ExportItem("optimization_progress", optimization_run, time.time()))
|
|
1627
1636
|
|
|
1628
1637
|
def export_optimization_complete(self, optimization_run: OptimizationRunRecord) -> None:
|
|
1629
|
-
"""
|
|
1638
|
+
"""Write a run's closing record to serve before returning. Blocking.
|
|
1630
1639
|
|
|
1631
|
-
|
|
1640
|
+
The closing record never waits in the send queue, where a full byte budget would
|
|
1641
|
+
drop it and leave the run open on serve. Progress still queued for the run is not
|
|
1642
|
+
sent after it, because serve refuses progress on a closed run. Raises when the
|
|
1643
|
+
write fails, so the caller can say the run stays open.
|
|
1632
1644
|
"""
|
|
1633
|
-
|
|
1645
|
+
run_id = str(optimization_run.optimization_run_id or "")
|
|
1646
|
+
if run_id:
|
|
1647
|
+
self._closed_runs[run_id] = None
|
|
1648
|
+
while len(self._closed_runs) > _CLOSED_RUNS_KEPT:
|
|
1649
|
+
self._closed_runs.popitem(last=False)
|
|
1650
|
+
try:
|
|
1651
|
+
self.export_optimization_run(optimization_run)
|
|
1652
|
+
except BaseException:
|
|
1653
|
+
# The run stays open on serve, so a run resumed from its checkpoint sends progress again.
|
|
1654
|
+
self._closed_runs.pop(run_id, None)
|
|
1655
|
+
raise
|
|
1634
1656
|
|
|
1635
1657
|
def _enqueue(self, item: ExportItem, *, settles_a_start: bool = False, hold_start: str | None = None) -> bool:
|
|
1636
1658
|
"""Queue a record in its lane, shedding only what is safe to shed. True if queued.
|
|
@@ -1904,6 +1926,39 @@ class BatchExporter:
|
|
|
1904
1926
|
self._release_bytes(item.size, in_flight=False)
|
|
1905
1927
|
self._record_drop(item.item_type, "shutdown")
|
|
1906
1928
|
|
|
1929
|
+
def report_unsent_at_exit(self, flush_seconds: float) -> None:
|
|
1930
|
+
"""Say what the lane still held when the exit flush ran out of time. Once per process.
|
|
1931
|
+
|
|
1932
|
+
The process exits next. A queued record is never sent, so it counts as an
|
|
1933
|
+
``unsent_at_exit`` drop and its bytes are released. A batch still sending may
|
|
1934
|
+
have delivered some of its records, so batches are reported and not counted.
|
|
1935
|
+
"""
|
|
1936
|
+
if self._reported_at_exit:
|
|
1937
|
+
return
|
|
1938
|
+
self._reported_at_exit = True
|
|
1939
|
+
queued = self._drain_pending()
|
|
1940
|
+
for item in queued:
|
|
1941
|
+
self._release_bytes(item.size, in_flight=False)
|
|
1942
|
+
self._record_drop(item.item_type, "unsent_at_exit", log=False)
|
|
1943
|
+
state = self._loop_state
|
|
1944
|
+
try:
|
|
1945
|
+
batches = list(state.in_flight.values()) if state is not None else []
|
|
1946
|
+
except RuntimeError: # the sender changed the batches while they were read
|
|
1947
|
+
batches = []
|
|
1948
|
+
if not queued and not batches:
|
|
1949
|
+
return
|
|
1950
|
+
logger.warning(
|
|
1951
|
+
"cmpnd: the exit flush ran out of time after %.0fs. %d records (%.1f MB) were still queued and were"
|
|
1952
|
+
" not sent. %d batches of %d records (%.1f MB) were still sending, and some of those records may"
|
|
1953
|
+
" have landed. Call cmpnd.flush(timeout) before the program ends to give them time.",
|
|
1954
|
+
flush_seconds,
|
|
1955
|
+
len(queued),
|
|
1956
|
+
sum(item.size for item in queued) / 1_000_000,
|
|
1957
|
+
len(batches),
|
|
1958
|
+
sum(batch[2] for batch in batches),
|
|
1959
|
+
sum(batch[3] for batch in batches) / 1_000_000,
|
|
1960
|
+
)
|
|
1961
|
+
|
|
1907
1962
|
def _drain_pending(self, limit: int | None = None) -> list[ExportItem]:
|
|
1908
1963
|
"""Take what is queued, in dispatch order: everything, or the first ``limit`` records."""
|
|
1909
1964
|
self._release_starts()
|
|
@@ -2458,15 +2513,6 @@ class BatchExporter:
|
|
|
2458
2513
|
functools.partial(self._send_eval_runs, route, [eval_dict]),
|
|
2459
2514
|
)
|
|
2460
2515
|
)
|
|
2461
|
-
elif item.item_type == "optimization_complete":
|
|
2462
|
-
complete_dict = cast("OptimizationRunRecord", item.data).to_api_dict()
|
|
2463
|
-
run_updates.append(
|
|
2464
|
-
(
|
|
2465
|
-
f"optimization:{complete_dict.get('optimization_run_id')}",
|
|
2466
|
-
False,
|
|
2467
|
-
functools.partial(self._send_optimization_complete, route, [complete_dict]),
|
|
2468
|
-
)
|
|
2469
|
-
)
|
|
2470
2516
|
elif item.item_type == "optimization_progress":
|
|
2471
2517
|
trk = cast("OptimizationRunRecord", item.data)
|
|
2472
2518
|
run_id = str(trk.optimization_run_id)
|
|
@@ -3194,6 +3240,8 @@ class BatchExporter:
|
|
|
3194
3240
|
repeat what that update was still delivering, such as a proposal's texts.
|
|
3195
3241
|
"""
|
|
3196
3242
|
for opt_run_id, trk in optimization_progress_to_send:
|
|
3243
|
+
if opt_run_id in self._closed_runs:
|
|
3244
|
+
continue
|
|
3197
3245
|
try:
|
|
3198
3246
|
progress_dict = trk.to_progress_dict()
|
|
3199
3247
|
response = await self._send_json_retrying_async(
|
|
@@ -3212,34 +3260,3 @@ class BatchExporter:
|
|
|
3212
3260
|
except Exception as e:
|
|
3213
3261
|
self._log_send_failure("Failed to update optimization progress %s: %s", opt_run_id, e)
|
|
3214
3262
|
self._add_errors(1)
|
|
3215
|
-
|
|
3216
|
-
async def _send_optimization_complete(
|
|
3217
|
-
self, route: _Route, optimization_complete_to_send: list[dict[str, Any]]
|
|
3218
|
-
) -> None:
|
|
3219
|
-
for opt_run_dict in optimization_complete_to_send:
|
|
3220
|
-
opt_run_id = str(opt_run_dict.get("optimization_run_id"))
|
|
3221
|
-
num_iterations = len(opt_run_dict.get("iterations", []))
|
|
3222
|
-
num_candidates = len(opt_run_dict.get("candidates", []))
|
|
3223
|
-
try:
|
|
3224
|
-
response = await self._send_json_retrying_async(
|
|
3225
|
-
route, "PUT", f"/api/v1/optimizations/{opt_run_id}", opt_run_dict
|
|
3226
|
-
)
|
|
3227
|
-
response.raise_for_status()
|
|
3228
|
-
self._add_exported(1)
|
|
3229
|
-
logger.debug(
|
|
3230
|
-
f"Completed optimization run {opt_run_id} with "
|
|
3231
|
-
f"{num_iterations} iterations, {num_candidates} candidates"
|
|
3232
|
-
)
|
|
3233
|
-
except httpx.HTTPStatusError as e:
|
|
3234
|
-
error_detail = ""
|
|
3235
|
-
try:
|
|
3236
|
-
error_detail = e.response.text
|
|
3237
|
-
except Exception:
|
|
3238
|
-
pass
|
|
3239
|
-
self._log_send_failure(
|
|
3240
|
-
"Failed to complete optimization run %s: %s\nResponse body: %s", opt_run_id, e, error_detail
|
|
3241
|
-
)
|
|
3242
|
-
self._add_errors(1)
|
|
3243
|
-
except Exception as e:
|
|
3244
|
-
self._log_send_failure("Failed to complete optimization run %s: %s", opt_run_id, e)
|
|
3245
|
-
self._add_errors(1)
|
|
@@ -766,17 +766,17 @@ def _register_exit_flush(pid: int) -> None:
|
|
|
766
766
|
threading hook and the ``atexit`` one finds nothing left to send.
|
|
767
767
|
"""
|
|
768
768
|
try:
|
|
769
|
-
threading._register_atexit(_flush_at_exit, pid) # pyright: ignore[reportAttributeAccessIssue]
|
|
769
|
+
threading._register_atexit(_flush_at_exit, pid, False) # pyright: ignore[reportAttributeAccessIssue]
|
|
770
770
|
except Exception: # noqa: BLE001 — threading is already shutting down, or has no such hook
|
|
771
771
|
pass
|
|
772
|
-
atexit.register(_flush_at_exit, pid)
|
|
772
|
+
atexit.register(_flush_at_exit, pid, True)
|
|
773
773
|
|
|
774
774
|
|
|
775
775
|
# The seconds the exit flushes have spent so far, and the process that spent them.
|
|
776
776
|
_exit_spent: tuple[int, float] | None = None
|
|
777
777
|
|
|
778
778
|
|
|
779
|
-
def _flush_at_exit(pid: int) -> None:
|
|
779
|
+
def _flush_at_exit(pid: int, atexit_hook: bool = True) -> None:
|
|
780
780
|
"""The exit flush. A forked child inherits the parent's registration, which is not its own.
|
|
781
781
|
|
|
782
782
|
Both exit hooks call it, and they share ``EXIT_FLUSH_SECONDS`` of flushing: each
|
|
@@ -786,9 +786,14 @@ def _flush_at_exit(pid: int) -> None:
|
|
|
786
786
|
the first flush still gets the rest of the budget. The second finds every lane
|
|
787
787
|
empty and returns at once otherwise.
|
|
788
788
|
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
789
|
+
Once the deadline is spent, the last hook to run has each lane say what it still
|
|
790
|
+
holds: queued records, which are never sent, and batches still sending. The
|
|
791
|
+
sender keeps sending while the interpreter joins non-daemon threads, so the
|
|
792
|
+
threading hook leaves that report to the ``atexit`` one, unless no ``atexit``
|
|
793
|
+
hook will run (``_atexit_hooks_skipped``). Each lane then logs its drop summary,
|
|
794
|
+
which logs at most once per window while the process runs, so the drops since
|
|
795
|
+
its last line are reported. A lane with nothing new to report logs nothing, so
|
|
796
|
+
the second hook repeats no line.
|
|
792
797
|
"""
|
|
793
798
|
if pid != os.getpid():
|
|
794
799
|
return
|
|
@@ -797,14 +802,26 @@ def _flush_at_exit(pid: int) -> None:
|
|
|
797
802
|
return
|
|
798
803
|
if any(lane._has_pending() for lane in sender.lanes()):
|
|
799
804
|
_spend_exit_flush(pid)
|
|
805
|
+
out_of_time = _exit_spent is not None and _exit_spent[0] == pid and _exit_spent[1] >= EXIT_FLUSH_SECONDS
|
|
806
|
+
last_hook = atexit_hook or _atexit_hooks_skipped()
|
|
800
807
|
for lane in sender.lanes():
|
|
801
808
|
try:
|
|
809
|
+
if out_of_time and last_hook:
|
|
810
|
+
lane.report_unsent_at_exit(EXIT_FLUSH_SECONDS)
|
|
802
811
|
lane.log_drop_summary()
|
|
803
812
|
lane._log_recoveries()
|
|
804
813
|
except Exception: # noqa: BLE001 — best effort at exit
|
|
805
814
|
pass
|
|
806
815
|
|
|
807
816
|
|
|
817
|
+
def _atexit_hooks_skipped() -> bool:
|
|
818
|
+
"""Whether this process exits without running ``atexit`` hooks, as a
|
|
819
|
+
``multiprocessing`` child before Python 3.13 does (``_register_exit_flush``)."""
|
|
820
|
+
multiprocessing = sys.modules.get("multiprocessing")
|
|
821
|
+
in_child = multiprocessing is not None and multiprocessing.parent_process() is not None
|
|
822
|
+
return in_child and sys.version_info < (3, 13)
|
|
823
|
+
|
|
824
|
+
|
|
808
825
|
def _spend_exit_flush(pid: int) -> None:
|
|
809
826
|
"""Flush for what is left of ``EXIT_FLUSH_SECONDS``, and count the time spent."""
|
|
810
827
|
global _exit_spent
|
|
@@ -90,8 +90,8 @@ The caller handles two refusals:
|
|
|
90
90
|
The method blocks and coalesces nothing. The producer decides which state is
|
|
91
91
|
current when the network falls behind.
|
|
92
92
|
|
|
93
|
-
`export_trace`, `export_span
|
|
94
|
-
|
|
93
|
+
`export_trace`, `export_span` and `export_optimization_progress` queue their
|
|
94
|
+
records and return. The exporter
|
|
95
95
|
has two queues, each `max_queue_size` deep. Spans go to one queue, which sheds
|
|
96
96
|
first. Every other record goes to the other queue, which sheds only when it
|
|
97
97
|
fills too. Every lane of the process also shares one byte budget,
|
|
@@ -100,7 +100,11 @@ default of 128 MiB. A record holds its bytes until the server takes it or it is
|
|
|
100
100
|
dropped. Spans shed at seven eighths of the budget, everything else at the whole.
|
|
101
101
|
`export_optimization_start`, `export_optimization_run` and
|
|
102
102
|
`export_optimization_checkpoint` block, because a run must exist before any
|
|
103
|
-
record that refers to it.
|
|
103
|
+
record that refers to it. `export_optimization_complete` blocks too, so a full
|
|
104
|
+
queue can never drop the record that closes a run. It raises when serve does not
|
|
105
|
+
take the record, and the tracker then logs that the run stays open. Progress
|
|
106
|
+
still queued for a closed run is never sent, because serve refuses progress on
|
|
107
|
+
a closed run.
|
|
104
108
|
|
|
105
109
|
## HTTP request timeouts
|
|
106
110
|
|
|
@@ -432,7 +432,7 @@ the variable names and their scope.
|
|
|
432
432
|
One sender per process (`cmpnd_ingest/sender.py`) runs one OS thread with a private asyncio event loop and one `httpx.AsyncClient` per lane. Each `BatchExporter` is a lane, and the sender runs one task per lane. The idea of a lane per key with a process-wide cap on posts comes from the wasm worker's `IngestLanes`.
|
|
433
433
|
|
|
434
434
|
- **The caller's side.** `export_*` checks the pid, puts the record on the lane's bounded queue without blocking, and wakes the lane's task once the queue holds `batch_size` records, or at once for a record that settles a trace or a run: a full trace, a finalize, a finished eval or optimization run. It never raises. A full queue drops the record and counts it as `queue_full`. A record past the process's byte budget is dropped as `queue_bytes_full`; its sealed body was measured when it was copied (`bodies._seal`), and it holds its bytes until its batch finishes or it is dropped. A sender that cannot run counts it as `sender_unavailable`.
|
|
435
|
-
- **Starting.** `start()` only marks the lane ready. The sender's thread starts on the process's first queued record. `cmpnd.configure()` and `cmpnd.Client()` prepare it first: they import every module the sender would import and build the TLS context its clients share (`configuration.prepare_sending`), 13 to 38 ms measured on a laptop, so the first record does not pay for it. A process that records without configuring prepares on its first record instead. It resolves host names on an OS thread of its own rather than asyncio's default thread pool, which the interpreter shuts down before the exit flush runs. Under gevent or eventlet it also starts through the original `_thread.start_new_thread` and selects over the original `select`, so it never waits on the hub. A TLS context whose class `ssl` no longer exports, as when a gevent worker patched `ssl` after its master built the context, is rebuilt (`network.ssl_context`) by the caller each time a lane attaches, before the sender builds the lane's client, so the sender's thread never loads certificates. anyio hands the TLS work of any other class to a worker thread, which under gevent never runs. The caller never waits for the thread. It starts the thread, queues its record and returns, and the thread reports its own start: it publishes its loop and spawns a task per lane, or records the exception that stopped it. The next caller that finds a failure raises a `SenderUnavailableWarning` once, naming that exception and pointing at the caller's own line, and the next start waits out a backoff of one second to a minute, counted from the moment the thread failed. A record queued during the backoff neither starts a thread nor retries the imports that prepare one. A lane whose HTTP client cannot be built, as when no file descriptor is free, logs one error naming the cause, keeps its records queued and tries again every flush interval; the next client that builds resets the report. A sender loop whose constructor fails at its self-pipe for the same reason is collected without asyncio's destructor traceback (`_SenderLoop.__del__`). `sender_health()` holds the cause. The exit flush is registered when the first thread starts, so a process that records once and exits before the loop runs still flushes, and the flush waits for the loop under its own deadline. It is registered with both `threading._register_atexit` and `atexit`. Before Python 3.13 a `multiprocessing` child leaves through `os._exit` right after `threading._shutdown`, which runs only the threading hooks. At a normal exit the threading hook runs first and the `atexit` one finds every lane idle and returns. The two share five seconds of flushing: each waits at most for what the flushes before it did not spend, and the time between them does not count. threading's hook runs before the interpreter joins non-daemon threads, so a thread that outlives the main thread and records after the first flush still gets the rest of the five seconds from the `atexit` one. Each lane then logs its drop summary, which logs at most once a window while the process runs, so drops since its last line are reported once at exit. Two exits run neither hook: `Pool.terminate()`, which leaving a `with Pool()` block calls, kills the workers, and billiard's prefork children, which Celery runs, leave through `os._exit` from `billiard.pool.Worker._do_exit` and from `billiard.popen_fork.Popen._launch` without calling `threading._shutdown`. Their records go out only if the task, or a `worker_process_shutdown` handler, calls `cmpnd.flush()`. uvicorn re-raises the SIGTERM it stopped on after its shutdown, so a worker dies by the signal and runs neither hook; the app flushes in its lifespan shutdown, and the SDK installs no signal handler of its own.
|
|
435
|
+
- **Starting.** `start()` only marks the lane ready. The sender's thread starts on the process's first queued record. `cmpnd.configure()` and `cmpnd.Client()` prepare it first: they import every module the sender would import and build the TLS context its clients share (`configuration.prepare_sending`), 13 to 38 ms measured on a laptop, so the first record does not pay for it. A process that records without configuring prepares on its first record instead. It resolves host names on an OS thread of its own rather than asyncio's default thread pool, which the interpreter shuts down before the exit flush runs. Under gevent or eventlet it also starts through the original `_thread.start_new_thread` and selects over the original `select`, so it never waits on the hub. A TLS context whose class `ssl` no longer exports, as when a gevent worker patched `ssl` after its master built the context, is rebuilt (`network.ssl_context`) by the caller each time a lane attaches, before the sender builds the lane's client, so the sender's thread never loads certificates. anyio hands the TLS work of any other class to a worker thread, which under gevent never runs. The caller never waits for the thread. It starts the thread, queues its record and returns, and the thread reports its own start: it publishes its loop and spawns a task per lane, or records the exception that stopped it. The next caller that finds a failure raises a `SenderUnavailableWarning` once, naming that exception and pointing at the caller's own line, and the next start waits out a backoff of one second to a minute, counted from the moment the thread failed. A record queued during the backoff neither starts a thread nor retries the imports that prepare one. A lane whose HTTP client cannot be built, as when no file descriptor is free, logs one error naming the cause, keeps its records queued and tries again every flush interval; the next client that builds resets the report. A sender loop whose constructor fails at its self-pipe for the same reason is collected without asyncio's destructor traceback (`_SenderLoop.__del__`). `sender_health()` holds the cause. The exit flush is registered when the first thread starts, so a process that records once and exits before the loop runs still flushes, and the flush waits for the loop under its own deadline. It is registered with both `threading._register_atexit` and `atexit`. Before Python 3.13 a `multiprocessing` child leaves through `os._exit` right after `threading._shutdown`, which runs only the threading hooks. At a normal exit the threading hook runs first and the `atexit` one finds every lane idle and returns. The two share five seconds of flushing: each waits at most for what the flushes before it did not spend, and the time between them does not count. threading's hook runs before the interpreter joins non-daemon threads, so a thread that outlives the main thread and records after the first flush still gets the rest of the five seconds from the `atexit` one. When the five seconds run out, the last hook to run has each lane log one line (`BatchExporter.report_unsent_at_exit`). It names the records the lane still queued, which it never sends and counts as `unsent_at_exit` drops, and the batches still sending, which may have delivered some of their records and are not counted. The threading hook leaves the line to the `atexit` one, because the sender keeps sending while the interpreter joins non-daemon threads. In a `multiprocessing` child before Python 3.13, which runs no `atexit` hook, the threading hook logs it. Each lane then logs its drop summary, which logs at most once a window while the process runs, so drops since its last line are reported once at exit. Two exits run neither hook: `Pool.terminate()`, which leaving a `with Pool()` block calls, kills the workers, and billiard's prefork children, which Celery runs, leave through `os._exit` from `billiard.pool.Worker._do_exit` and from `billiard.popen_fork.Popen._launch` without calling `threading._shutdown`. Their records go out only if the task, or a `worker_process_shutdown` handler, calls `cmpnd.flush()`. uvicorn re-raises the SIGTERM it stopped on after its shutdown, so a worker dies by the signal and runs neither hook; the app flushes in its lifespan shutdown, and the SDK installs no signal handler of its own.
|
|
436
436
|
- **A lane's task** waits for a wake or `flush_interval_seconds`, then runs a turn. A start does not wake it, so a trace that finishes within the interval goes out with its start in one request, as soon as it finishes. A turn takes everything queued as one batch, lifecycle records first, and starts sending it without waiting for it. It takes again once `batch_size` records or a flush wait, or once a settling record waits and no batch of the lane is sending, so traces that finish during a request follow it together when it returns. `_flush_batch_async` sorts the batch's items by type (`trace`, `span`, `trace_start`, `trace_finalize`, `eval_run`, `optimization_run`, various optimization progress records), folds loose spans into their trace's body when it is in the same batch, and makes one job per unit of sending: one trace's spans, the full traces, each start, each finalize and each update to an eval or optimization run. Jobs run side by side, except for two lines. A trace's finalize waits until its start has been answered, because serve keeps no completion for a trace it has no row for, and spans need no order. An update to a run waits until that run's previous update has finished, retries included, so a run's progress never lands out of order and moves backward. A waiting update holds no slot and does not count against the lane's jobs, so it never stops the lane taking other records. A newer progress update takes the place of one still waiting for the same run, which then sends nothing: every progress body carries all the iteration points not yet acknowledged, so a run has at most one progress update waiting. A flush that covers the replaced update waits for its replacement to land.
|
|
437
437
|
- **Holding a lane.** The sender holds a lane weakly while it is idle and strongly while it holds records, queued or in flight (`Sender.hold`, `Sender.release_if_idle`). An enqueue holds the lane after its put, and the lane's task lets go after a turn that leaves nothing pending, checked under the sender's lock, so a lane the program drops with records queued still sends them.
|
|
438
438
|
- **Pipelining without small requests.** A job holds one of the lane's `2 × max_export_workers` slots from its encoding to its last answer, so one set of bodies is on the wire while the next is ready behind it. The turn takes its next batch while earlier ones are still sending, but only once a slot is free and either `batch_size` records or a flush are waiting. Until then records stay in the queue, where a backlog gathers into a few large requests: 3,200 spans of eight traces leave as about eight requests, not 256. Records taken and not yet sent stay within `max_queue_size` and count against `max_queue_bytes` until their batch finishes, so memory stays bounded. A request in its backoff holds its job's slot but no permit, and the records behind it keep moving.
|
|
@@ -5,7 +5,7 @@ name = "cmpnd"
|
|
|
5
5
|
# it's new) — no git tags. Bump with `uv version --bump {minor,patch}` or by
|
|
6
6
|
# hand. Runtime `cmpnd.__version__` reads installed metadata, so it tracks
|
|
7
7
|
# this automatically. See docs/plans/2026-07-02-sdk-pypi-tag-free-publish.md.
|
|
8
|
-
version = "0.111.
|
|
8
|
+
version = "0.111.2"
|
|
9
9
|
description = "DSPy observability and deployment SDK for cmpnd"
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
requires-python = ">=3.11"
|
|
@@ -641,7 +641,6 @@ def test_updates_to_one_optimization_run_land_in_the_order_they_were_recorded():
|
|
|
641
641
|
run = request.url.path.split("/")[4]
|
|
642
642
|
if (run, calls) == ("run-a", 1):
|
|
643
643
|
exporter.export_optimization_progress(_OptimizationRun("run-a", 2))
|
|
644
|
-
exporter.export_optimization_complete(_OptimizationRun("run-a", 3))
|
|
645
644
|
exporter.export_optimization_progress(_OptimizationRun("run-b", 1))
|
|
646
645
|
await asyncio.sleep(0.3)
|
|
647
646
|
landed.append((run, request.method, calls))
|
|
@@ -655,11 +654,63 @@ def test_updates_to_one_optimization_run_land_in_the_order_they_were_recorded():
|
|
|
655
654
|
assert [entry for entry in landed if entry[0] == "run-a"] == [
|
|
656
655
|
("run-a", "PATCH", 1),
|
|
657
656
|
("run-a", "PATCH", 2),
|
|
658
|
-
("run-a", "PUT", 3),
|
|
659
657
|
]
|
|
660
658
|
assert landed[0] == ("run-b", "PATCH", 1)
|
|
661
659
|
|
|
662
660
|
|
|
661
|
+
def test_progress_queued_before_a_run_closes_is_not_sent_after_it():
|
|
662
|
+
"""The closing record skips the queue. Serve refuses progress on a settled run, so
|
|
663
|
+
the progress still queued for it stays unsent, and another run's progress still goes."""
|
|
664
|
+
landed: list[tuple[str, str]] = []
|
|
665
|
+
|
|
666
|
+
def handler(request: httpx.Request) -> httpx.Response:
|
|
667
|
+
landed.append((request.method, request.url.path))
|
|
668
|
+
return httpx.Response(200, json={"status": "ok"})
|
|
669
|
+
|
|
670
|
+
exporter = _make_exporter(handler, batch_size=1)
|
|
671
|
+
exporter.export_optimization_progress(_OptimizationRun("run-a", 1))
|
|
672
|
+
exporter.export_optimization_progress(_OptimizationRun("run-b", 1))
|
|
673
|
+
exporter.export_optimization_complete(_OptimizationRun("run-a", 2))
|
|
674
|
+
|
|
675
|
+
asyncio.run(exporter._turn(asyncio.Semaphore(10)))
|
|
676
|
+
|
|
677
|
+
assert sorted(landed) == [
|
|
678
|
+
("PATCH", "/api/v1/optimizations/run-b/progress"),
|
|
679
|
+
("PUT", "/api/v1/optimizations/run-a"),
|
|
680
|
+
]
|
|
681
|
+
assert exporter.health().errored == 0
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
def test_a_close_serve_refused_leaves_the_runs_progress_to_send():
|
|
685
|
+
"""A refused close leaves the run open on serve, where a run resumed from its
|
|
686
|
+
checkpoint still reports progress."""
|
|
687
|
+
landed: list[tuple[str, str]] = []
|
|
688
|
+
|
|
689
|
+
def handler(request: httpx.Request) -> httpx.Response:
|
|
690
|
+
landed.append((request.method, request.url.path))
|
|
691
|
+
if request.method == "PUT":
|
|
692
|
+
return httpx.Response(422, json={"error": "refused"})
|
|
693
|
+
return httpx.Response(200, json={"status": "ok"})
|
|
694
|
+
|
|
695
|
+
exporter = _make_exporter(handler, batch_size=1)
|
|
696
|
+
with pytest.raises(RuntimeError):
|
|
697
|
+
exporter.export_optimization_complete(_OptimizationRun("run-a", 2))
|
|
698
|
+
exporter.export_optimization_progress(_OptimizationRun("run-a", 3))
|
|
699
|
+
|
|
700
|
+
asyncio.run(exporter._turn(asyncio.Semaphore(10)))
|
|
701
|
+
|
|
702
|
+
assert landed == [("PUT", "/api/v1/optimizations/run-a"), ("PATCH", "/api/v1/optimizations/run-a/progress")]
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
def test_a_lane_remembers_only_its_most_recently_closed_runs(monkeypatch):
|
|
706
|
+
monkeypatch.setattr(exporter_http, "_CLOSED_RUNS_KEPT", 2)
|
|
707
|
+
exporter = _make_exporter()
|
|
708
|
+
for run in ("run-a", "run-b", "run-c"):
|
|
709
|
+
exporter.export_optimization_complete(_OptimizationRun(run, 1))
|
|
710
|
+
|
|
711
|
+
assert list(exporter._closed_runs) == ["run-b", "run-c"]
|
|
712
|
+
|
|
713
|
+
|
|
663
714
|
@pytest.mark.parametrize("same_batch", [True, False])
|
|
664
715
|
def test_a_traces_finalize_reaches_serve_after_its_start(same_batch: bool):
|
|
665
716
|
"""serve keeps no completion for a trace it has no row for, so a finalize that
|
|
@@ -272,10 +272,10 @@ def test_the_held_id_is_stamped_over_whatever_the_body_claimed() -> None:
|
|
|
272
272
|
assert body["optimization_run_id"] == HELD_RUN_ID
|
|
273
273
|
|
|
274
274
|
|
|
275
|
-
def
|
|
276
|
-
"""The
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
def test_a_dict_run_body_carries_its_id_on_the_closing_write() -> None:
|
|
276
|
+
"""The closing write reads the run it addresses out of the record it is given, so the
|
|
277
|
+
id has to be *in* the body. A producer whose record never carried one still reaches
|
|
278
|
+
its own run."""
|
|
279
279
|
payload = _run_payload()
|
|
280
280
|
del payload["optimization_run_id"]
|
|
281
281
|
transport = CapturingTransport()
|
|
@@ -243,6 +243,40 @@ def test_anthropic_native_cache_counters():
|
|
|
243
243
|
assert span.cache_write_tokens == 210
|
|
244
244
|
|
|
245
245
|
|
|
246
|
+
# --- OpenAI cache writes ----------------------------------------------------------
|
|
247
|
+
# OpenAI's prompt count holds the cache reads and the cache writes, and it names the
|
|
248
|
+
# write count two ways. The counts are production gpt-6.1-sol and gpt-6-luna calls
|
|
249
|
+
# from 2026-11-19 and 2026-09-23.
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
@pytest.mark.parametrize("spelling", ["cache_creation_tokens", "cache_write_tokens"])
|
|
253
|
+
def test_openai_cache_writes_leave_fresh_input(spelling: str):
|
|
254
|
+
observation = _span_for(
|
|
255
|
+
{
|
|
256
|
+
"prompt_tokens": 21292,
|
|
257
|
+
"completion_tokens": 800,
|
|
258
|
+
"total_tokens": 22092,
|
|
259
|
+
"prompt_tokens_details": {"cached_tokens": 1374, spelling: 19915},
|
|
260
|
+
}
|
|
261
|
+
).to_api_dict()["lm_usage"]
|
|
262
|
+
|
|
263
|
+
assert observation["cache_read_tokens"] == 1374
|
|
264
|
+
assert observation["cache_write_tokens"] == 19915
|
|
265
|
+
assert observation["fresh_input_tokens"] == 3
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
def test_cache_counts_above_the_prompt_leave_fresh_input_absent():
|
|
269
|
+
observation = _span_for(
|
|
270
|
+
{
|
|
271
|
+
"prompt_tokens": 100,
|
|
272
|
+
"completion_tokens": 5,
|
|
273
|
+
"prompt_tokens_details": {"cached_tokens": 60, "cache_write_tokens": 50},
|
|
274
|
+
}
|
|
275
|
+
).to_api_dict()["lm_usage"]
|
|
276
|
+
|
|
277
|
+
assert observation["fresh_input_tokens"] is None
|
|
278
|
+
|
|
279
|
+
|
|
246
280
|
@_needs_typed_lm_types
|
|
247
281
|
def test_typed_usage_cache_write():
|
|
248
282
|
from dspy.core.types import LMUsage
|
|
@@ -378,7 +412,7 @@ def test_observation_captures_cache_duration_splits_reasoning_and_audio():
|
|
|
378
412
|
|
|
379
413
|
assert observation["cache_read_tokens"] == 40
|
|
380
414
|
assert observation["prompt_inclusion"] == "includes_cache_reads"
|
|
381
|
-
assert observation["fresh_input_tokens"] ==
|
|
415
|
+
assert observation["fresh_input_tokens"] == 30
|
|
382
416
|
assert observation["cache_write_tokens"] == 30
|
|
383
417
|
assert observation["cache_write_5m_tokens"] == 10
|
|
384
418
|
assert observation["cache_write_1h_tokens"] == 20
|
|
@@ -5,6 +5,7 @@ lingers forever and the program page shows a perpetual in-progress pip."""
|
|
|
5
5
|
from unittest import mock
|
|
6
6
|
|
|
7
7
|
from cmpnd.optimizers import tracker
|
|
8
|
+
from cmpnd_ingest.exporter_http import BatchExporter
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class _RecordingExporter:
|
|
@@ -230,3 +231,19 @@ def test_a_never_started_run_keeps_its_id_when_the_exporter_returns_none():
|
|
|
230
231
|
with mock.patch("cmpnd.exporter.get_exporter", return_value=_NoIDExporter()):
|
|
231
232
|
trk.finalize()
|
|
232
233
|
assert trk.optimization_run_id == "op_alreadyknown"
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
def test_a_closing_record_that_fails_says_the_run_stays_open(caplog):
|
|
237
|
+
"""The run still reads `running` on serve, so the owner hears which run and why."""
|
|
238
|
+
exp = mock.create_autospec(BatchExporter, instance=True)
|
|
239
|
+
exp.export_optimization_start.return_value = "op_recorded"
|
|
240
|
+
exp.export_optimization_complete.side_effect = RuntimeError("network down")
|
|
241
|
+
trk = _tracker()
|
|
242
|
+
with mock.patch("cmpnd.exporter.get_exporter", autospec=True, return_value=exp):
|
|
243
|
+
trk.start()
|
|
244
|
+
with caplog.at_level("ERROR", logger="cmpnd"):
|
|
245
|
+
trk.finalize()
|
|
246
|
+
|
|
247
|
+
assert trk.status == "completed"
|
|
248
|
+
assert "cmpnd: optimization run op_recorded was not closed on cmpnd; it will show running" in caplog.text
|
|
249
|
+
assert "network down" in caplog.text
|