cmpnd 0.89.0__tar.gz → 0.91.0__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.89.0 → cmpnd-0.91.0}/PKG-INFO +3 -2
- {cmpnd-0.89.0 → cmpnd-0.91.0}/README.md +2 -1
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/callback.py +34 -5
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/deployments.py +8 -3
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/top.py +11 -2
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/configuration.py +2 -2
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/context.py +24 -2
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/deployment_runs.py +43 -5
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/eval_handler.py +121 -5
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/helpers.py +11 -2
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/models.py +7 -1
- {cmpnd-0.89.0 → cmpnd-0.91.0}/docs/cli.md +15 -4
- {cmpnd-0.89.0 → cmpnd-0.91.0}/docs/sdk-instrumentation.md +36 -4
- {cmpnd-0.89.0 → cmpnd-0.91.0}/pyproject.toml +1 -1
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/seed_review_run.py +1 -87
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_deployment_runs.py +68 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_context.py +27 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_deployment_runs.py +25 -0
- cmpnd-0.91.0/tests/test_eval_example_failures.py +170 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_eval_trace_grouping.py +3 -3
- cmpnd-0.91.0/tests/test_forward_access_warning.py +109 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_ingest_conformance.py +3 -0
- cmpnd-0.91.0/tests/test_owned_trace_streaming.py +122 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_seed_review_run.py +0 -32
- {cmpnd-0.89.0 → cmpnd-0.91.0}/uv.lock +1 -1
- {cmpnd-0.89.0 → cmpnd-0.91.0}/.gitignore +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/AGENTS.md +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/CLAUDE.md +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_assessments.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_authored_import.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_deployments.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_exporter_pool.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_gepa_patch.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_guides.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_http.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_program_patch.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_rlm_patch.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_runtime_tools.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_timespec.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_traces.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/_valsets.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/authored.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/api_client.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/admin.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/assessments.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/auth.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/datasets.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/evals.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/login.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/optimizations.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/org.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/programs.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/provider_credentials.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/tool_servers.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/traces.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/commands/valsets.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/credentials.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/deprecation.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/pagination.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/shell.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/trace_render.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/tree_help.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/verbs.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/cli/views.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/client.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/credentials.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/dataset_sync.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/datasets.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/decorators.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/deployment.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/deployment_metadata.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/execution.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/exporter.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/exporter_http.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/identity.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/imaging.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/ir/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/ir/decode.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/ir/encode.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/ir/hash.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/ir/program.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/ir/reflection.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/ir/types.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/ir/xxh64.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/lm_configuration.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/mcp_servers.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/named_programs.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/optimization.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/optimizers/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/optimizers/gepa.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/optimizers/gepa_callback.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/optimizers/resume.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/optimizers/tracker.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/packaging.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/program_naming.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/programs.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/references.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/retry.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/traces.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/cmpnd/versions.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/docs/2026-04-02-code-review.md +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/docs/client.md +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/docs/custom-proposer.md +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/docs/plans/2026-04-05-train-val-dataset-capture-design.md +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/docs/plans/2026-04-05-train-val-dataset-capture.md +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/docs/reading-traces.md +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/docs/versions.md +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/examples/generalizing_proposer.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/examples/local_ollama.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/LINEAGE.md +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/README.md +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/cmpnd_ingest/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/cmpnd_ingest/bodies.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/cmpnd_ingest/client_floor.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/cmpnd_ingest/exporter_http.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/cmpnd_ingest/program_names.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/cmpnd_ingest/protocols.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/cmpnd_ingest/py.typed +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/cmpnd_ingest/request_log.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/cmpnd_ingest/retry.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/cmpnd_ingest/span_context.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/cmpnd_ingest/trace_facts.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/cmpnd_ingest/user_agent.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/ingest/pyproject.toml +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/audit-sdist.sh +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/capture_review_run.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/check-pip-install.sh +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/check_release_artifacts.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/fixtures/review_run.json.gz +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/gepa_resume_bug.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/install-test-env.sh +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/release-gate.sh +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/release-real-models.sh +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/require_version_bump.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/selfhost_compat.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/scripts/test-in-linux.sh +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/stubs/dspy/__init__.pyi +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/stubs/dspy/primitives/__init__.pyi +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/stubs/dspy/primitives/prediction.pyi +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/stubs/dspy/utils/__init__.pyi +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/stubs/dspy/utils/callback.pyi +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/stubs/dspy/utils/dummies.pyi +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/_credential_route.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/_deployment_signature_helpers.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/_exporter_helpers.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/_fake_clock.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/_identity_helpers.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/_resolve_refs.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/_traced_run.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/conftest.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/committee_task.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/conftest.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/continuation_task.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/data/committee_train.ndjson.gz +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/data/committee_val.ndjson.gz +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/fake_lm.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/helpers.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/target_capabilities.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_assessments_cli.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_capture_prompts.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_composite_module.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_dataset_auto_creation.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_deploy_execute.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_deploy_pandas.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_deploy_programs.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_edge_cases.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_example_hash.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_gepa_optimization.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_interpreter_spans.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_lm_accuracy.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_module_tracing.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_optimization_lineage.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_optimization_metric_identity.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_optimize_authored_metric.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_optimize_continuation.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_optimize_custom_proposer.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_optimize_failures.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_optimize_loop.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_optimize_review_committee.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_optimize_server_owned_completion.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_parallel_export.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_program_versions.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_project_attribution.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_react_tool_spans.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_save_load.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_trace_structure.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_traces_read.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_user_attribution.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/e2e/test_valsets_cli.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/01_predict_qa.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/02_predict_renamed_field.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/03_chain_of_thought_qa.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/04_predict_richer_types.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/05_composite_two_predicts.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/06_multichaincomparison.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/07_program_of_thought.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/08_opaque_module.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/09_predict_pydantic_field.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/10_react.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/11_refine.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/12_retrieve.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/13_knn.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/14_parallel.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/identity_vectors/README.md +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/ingest_conformance.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/integration/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/integration/authored_optimize/judge.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/integration/authored_optimize/optimize_hosted.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/integration/conftest.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/integration/hosted_mcp_tool_optimize_probe.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/integration/hosted_optimize_probe.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/integration/optimization_run_probe.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/integration/test_cli_deploy_smoketest.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/integration/test_logs_renders_traces.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/integration/test_optimization_run.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/integration/test_optimizing_progress.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/integration/test_unhappy_path.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/lm15_prompt_fixture.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/lm15_prompts/four_turn_predict.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/lm15_prompts/rlm_six_turns.json +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/load/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/load/__main__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/load/drain.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/load/ingest.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/load/latency_transport.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/load/rlm_shape.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/load/rlm_size_report.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/load/sweep.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/load/test_rlm_shape.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/load/test_rlm_size_report.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/conftest.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/seed_parity.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/test_auth.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/test_datasets.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/test_deployments.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/test_evals.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/test_health.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/test_modules.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/test_optimizations.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/test_programs.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/test_signatures.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/test_trace_streaming.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/parity/test_traces.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/_provider.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/_readiness.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/_reliability.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/_result.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/mint_bedrock_token.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_bedrock_converse.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_deploy_programs.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_multi_client_stress.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_optimize_client_committee.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_optimize_continuation.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_optimize_loop.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_optimize_loop_wasm.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_optimize_stress.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_provider_roles.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_readiness.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_real_provider_twins.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_reliability.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_reliability_classify.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_rlm_wasm.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/real_models/test_trace_search.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/span_reference_fixture.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_adapter_reentrancy.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_assessments_api.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_authored.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_authored_binding_credentials.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_authored_bundle_collisions.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_authored_metric_contract.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_authored_named_models.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_authored_optimize.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_callback.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_candidate_lineage.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/conftest.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_admin.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_api_client.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_assessments.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_auth.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_credentials.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_datasets.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_deployments.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_evals.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_login.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_main.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_optimizations.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_org.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_pagination.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_parity.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_programs.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_provider_credentials.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_schema_sample.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_shell.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_tool_servers.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_top.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_traces.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_traces_program_and_module.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_traces_search_wire.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_tree_help.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cli/test_valsets.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_client.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_client_floor.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_client_program_names.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_clustering/__init__.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_clustering/conftest.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_clustering/test_edge_cases.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_clustering/test_hash_consistency.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_clustering/test_type_conversion.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_cmp551_grouping_identity.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_configuration.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_context_propagation.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_credential_kwargs.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_credential_selection.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_credential_values.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_dataset_polling.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_dataset_sync.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_datasets.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_decision_client_spans.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_decorators.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_deploy.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_deploy_mcp_tool_references.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_deploy_program_id.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_deployment_metadata.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_deployments_read.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_eval.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_eval_example_attribution.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_eval_program_id.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_eval_start.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_exception_paths.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_execute.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_execute_run_identity.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_exporter.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_exporter_program_names.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_exporter_queue.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_exporter_real.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_fake_lm.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_gepa_callback.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_gepa_integration.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_gepa_output_normalization.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_gepa_resume.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_identity.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_imaging.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_import_weight.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_ingest_second_producer.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_integration.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_interpreter_callback.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_ir_encoder_properties.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_ir_golden_vectors.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_ir_roundtrip.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_lm15_native_calls.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_lm15_prompt_fixtures.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_lm15_prompt_references.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_lm_configuration.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_lm_usage_shapes.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_mcp_tools.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_models.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_multi_client_stress_readiness.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_no_signature_hash_on_the_wire.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_optimization_phase_callback.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_optimization_program_names.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_optimization_progress.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_optimization_start.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_optimize.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_optimize_budget.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_optimize_lift.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_optimize_lms.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_optimize_proposer.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_optimize_reflection_lm.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_optimize_terminal_failure.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_packaging.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_packaging_callable_source.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_packaging_mcp_tools.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_packaging_program_source.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_poll_until.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_program_id_deprecation.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_program_identity.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_program_lineage_persist.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_program_names_in_deploy.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_program_naming.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_programs_create.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_project_payload.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_real_provider_twins_readiness.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_reflector_properties.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_reflector_smoke.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_release_gate_script.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_release_real_models_script.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_replaced_names.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_repro_reactv2_bugs.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_require_version_bump.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_retry.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_reversible_failures.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_rlm_patch.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_run_attribution_paths.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_runtime_tools.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_schemas.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_seal_lm_credential.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_signature_inputs.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_span_references.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_span_sent_once.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_span_submission.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_span_submission_wire_contract.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_system_one.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_token_attribution.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_trace_context_concurrency.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_trace_fact_wire_contract.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_trace_facts.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_trace_render.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_traces_read.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_tracked_gepa.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_tracker_enrich.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_truncation.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_upload_auth_headers.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_user_agent.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_valsets_api.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_versions.py +0 -0
- {cmpnd-0.89.0 → cmpnd-0.91.0}/tests/test_xxh64.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cmpnd
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.91.0
|
|
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>
|
|
@@ -784,7 +784,8 @@ errors:
|
|
|
784
784
|
- A connection to the platform that never opened, such as one refused, raises
|
|
785
785
|
`RunNotSubmitted` after a few attempts. It names the endpoint, and nothing was
|
|
786
786
|
sent, so submitting again is safe. It is a `RunSubmissionUncertain`.
|
|
787
|
-
- A spent budget raises `RunWaitTimeout`, which holds the run ID
|
|
787
|
+
- A spent budget raises `RunWaitTimeout`, which holds the run ID and, once a
|
|
788
|
+
worker admitted the run, the `trace_id` of the trace it is streaming.
|
|
788
789
|
- An answer that expired before it was read raises `RunResultExpired`.
|
|
789
790
|
|
|
790
791
|
`sdk.deployment_run_id(result)` returns the run ID of a result, or of an
|
|
@@ -731,7 +731,8 @@ errors:
|
|
|
731
731
|
- A connection to the platform that never opened, such as one refused, raises
|
|
732
732
|
`RunNotSubmitted` after a few attempts. It names the endpoint, and nothing was
|
|
733
733
|
sent, so submitting again is safe. It is a `RunSubmissionUncertain`.
|
|
734
|
-
- A spent budget raises `RunWaitTimeout`, which holds the run ID
|
|
734
|
+
- A spent budget raises `RunWaitTimeout`, which holds the run ID and, once a
|
|
735
|
+
worker admitted the run, the `trace_id` of the trace it is streaming.
|
|
735
736
|
- An answer that expired before it was read raises `RunResultExpired`.
|
|
736
737
|
|
|
737
738
|
`sdk.deployment_run_id(result)` returns the run ID of a result, or of an
|
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import contextvars
|
|
6
6
|
import logging
|
|
7
|
+
import threading
|
|
7
8
|
from collections.abc import Mapping
|
|
8
9
|
from datetime import datetime, timezone
|
|
9
10
|
from typing import Any
|
|
@@ -553,7 +554,25 @@ class _CallbackBase:
|
|
|
553
554
|
own_config: configuration.Config | None = None,
|
|
554
555
|
optimization_phase: str | None = None,
|
|
555
556
|
producer_context: dict[str, Any] | None = None,
|
|
557
|
+
stream_owned_traces: bool = False,
|
|
558
|
+
root_trace_id: UUID | str | None = None,
|
|
556
559
|
) -> None:
|
|
560
|
+
# A runtime that runs a program for someone else (a worker's kernel) streams
|
|
561
|
+
# every trace this callback owns: each span is exported as it ends and the
|
|
562
|
+
# trace ends with a finalize, so a call that stops early keeps what it
|
|
563
|
+
# already did. The default streams only an RLM root, because outside such a
|
|
564
|
+
# runtime each streamed span is its own request.
|
|
565
|
+
self._stream_owned_traces = stream_owned_traces
|
|
566
|
+
# The ID the first root trace takes, so the runtime knows the run's root trace
|
|
567
|
+
# before the program runs. Later root traces mint their own. Refused at
|
|
568
|
+
# construction when malformed, rather than at the first root call.
|
|
569
|
+
if root_trace_id is not None and not isinstance(root_trace_id, UUID):
|
|
570
|
+
try:
|
|
571
|
+
root_trace_id = UUID(str(root_trace_id))
|
|
572
|
+
except ValueError:
|
|
573
|
+
raise ValueError(f"root_trace_id must be a UUID, got {root_trace_id!r}") from None
|
|
574
|
+
self._pending_root_trace_id: UUID | None = root_trace_id
|
|
575
|
+
self._root_trace_id_lock = threading.Lock()
|
|
557
576
|
# A client passes its own config here; the auto_instrument callback leaves
|
|
558
577
|
# it None and reads the process-global config live, so a reconfigure()
|
|
559
578
|
# after this callback is built still changes what the global path emits.
|
|
@@ -602,8 +621,11 @@ class _CallbackBase:
|
|
|
602
621
|
self._capture_inputs = (
|
|
603
622
|
capture_inputs if capture_inputs is not None else (config.capture_inputs if config else True)
|
|
604
623
|
)
|
|
605
|
-
# Emit an in_progress start for every root trace, not just RLM.
|
|
606
|
-
|
|
624
|
+
# Emit an in_progress start for every root trace, not just RLM. Streaming
|
|
625
|
+
# owned traces always sends starts, whatever the program configured: a
|
|
626
|
+
# receiver of streamed spans drops the spans and the finalize of a trace it
|
|
627
|
+
# never saw start, so a streamed trace without its start is lost whole.
|
|
628
|
+
self._stream_trace_starts = stream_owned_traces or (
|
|
607
629
|
stream_trace_starts if stream_trace_starts is not None else (config.stream_trace_starts if config else True)
|
|
608
630
|
)
|
|
609
631
|
self._capture_outputs = (
|
|
@@ -950,8 +972,9 @@ class _ModuleMixin(_CallbackBase):
|
|
|
950
972
|
# from span shape later.
|
|
951
973
|
trace.root_span_type = span_type.value
|
|
952
974
|
# RLM traces use streaming export (per-span); everything else
|
|
953
|
-
# batches its spans and sends the whole trace at finalize
|
|
954
|
-
|
|
975
|
+
# batches its spans and sends the whole trace at finalize, unless the
|
|
976
|
+
# callback streams every trace it owns.
|
|
977
|
+
if span_type == models.SpanType.RLM or self._stream_owned_traces:
|
|
955
978
|
trace.streaming = True
|
|
956
979
|
self._streaming_traces[str(trace.trace_id)] = trace.streaming
|
|
957
980
|
trace.seal_start()
|
|
@@ -1329,12 +1352,18 @@ class _ModuleMixin(_CallbackBase):
|
|
|
1329
1352
|
span.demo_count = len(demos)
|
|
1330
1353
|
span.demos = [models._safe_serialize(d) for d in demos]
|
|
1331
1354
|
|
|
1355
|
+
def _next_root_trace_id(self) -> UUID:
|
|
1356
|
+
"""The supplied root trace ID the first time, then a fresh one per root trace."""
|
|
1357
|
+
with self._root_trace_id_lock:
|
|
1358
|
+
supplied, self._pending_root_trace_id = self._pending_root_trace_id, None
|
|
1359
|
+
return supplied or uuid4()
|
|
1360
|
+
|
|
1332
1361
|
def _create_trace(self, instance: Any, inputs: dict[str, Any]) -> models.TraceBuilder:
|
|
1333
1362
|
"""Create a new trace for a root module call."""
|
|
1334
1363
|
config = self._own_config or configuration.get_config()
|
|
1335
1364
|
|
|
1336
1365
|
trace = models.TraceBuilder(
|
|
1337
|
-
trace_id=
|
|
1366
|
+
trace_id=self._next_root_trace_id(),
|
|
1338
1367
|
start_time=datetime.now(timezone.utc),
|
|
1339
1368
|
module_class=instance.__class__.__name__,
|
|
1340
1369
|
)
|
|
@@ -205,15 +205,15 @@ def submit_cli_run(
|
|
|
205
205
|
print(f"Deployment run: {accepted_id}", file=sys.stderr)
|
|
206
206
|
if asynchronous:
|
|
207
207
|
return accepted, None
|
|
208
|
+
# The trace streams while the run runs, so it is named on the first read
|
|
209
|
+
# that names it rather than at settlement.
|
|
210
|
+
runs.on_trace = _print_trace
|
|
208
211
|
settled = runs.wait(accepted_id, deadline, accepted)
|
|
209
212
|
except KeyboardInterrupt:
|
|
210
213
|
deployment_runs.report_interrupt(deployment_id, run_id)
|
|
211
214
|
raise
|
|
212
215
|
except httpx.HTTPStatusError as exc:
|
|
213
216
|
raise _http_refusal(exc) from exc
|
|
214
|
-
trace_id = settled.get("trace_id")
|
|
215
|
-
if isinstance(trace_id, str) and trace_id:
|
|
216
|
-
print(f"Trace: {trace_id}", file=sys.stderr)
|
|
217
217
|
if settled["status"] == "failed":
|
|
218
218
|
return settled, None
|
|
219
219
|
result = settled.get("result")
|
|
@@ -222,6 +222,11 @@ def submit_cli_run(
|
|
|
222
222
|
return settled, result["output"]
|
|
223
223
|
|
|
224
224
|
|
|
225
|
+
def _print_trace(trace_id: str) -> None:
|
|
226
|
+
"""Name a run's trace on stderr, where `--json` keeps it off the program's output."""
|
|
227
|
+
print(f"Trace: {trace_id}", file=sys.stderr)
|
|
228
|
+
|
|
229
|
+
|
|
225
230
|
def _http_refusal(exc: httpx.HTTPStatusError) -> api_client.CliError:
|
|
226
231
|
return api_client.CliError(
|
|
227
232
|
str(exc),
|
|
@@ -1251,7 +1251,11 @@ def cmd_run(client: api_client.ApiClient, args: Any) -> None:
|
|
|
1251
1251
|
deployment_runs.RunResultExpired,
|
|
1252
1252
|
) as exc:
|
|
1253
1253
|
if args.json:
|
|
1254
|
-
|
|
1254
|
+
answer = {"deployment_run_id": getattr(exc, "_cmpnd_deployment_run_id", None), "error": str(exc)}
|
|
1255
|
+
# A run that is still running has a trace that streams as it goes.
|
|
1256
|
+
if isinstance(exc, deployment_runs.RunWaitTimeout) and exc.trace_id:
|
|
1257
|
+
answer["trace_id"] = exc.trace_id
|
|
1258
|
+
print(json.dumps(answer))
|
|
1255
1259
|
raise
|
|
1256
1260
|
except RuntimeError as exc:
|
|
1257
1261
|
if args.json:
|
|
@@ -1492,7 +1496,12 @@ def register(subparsers: _SubParsersAction[ArgumentParser]) -> None:
|
|
|
1492
1496
|
rn.add_argument("body", nargs="?", help="JSON body, or '-' to read from stdin")
|
|
1493
1497
|
rn.add_argument("--async", dest="asynchronous", action="store_true", help="Return the accepted run handle")
|
|
1494
1498
|
rn.add_argument("--timeout", type=float, default=None, help=deployment_commands.TIMEOUT_HELP)
|
|
1495
|
-
rn.add_argument(
|
|
1499
|
+
rn.add_argument(
|
|
1500
|
+
"--json",
|
|
1501
|
+
action="store_true",
|
|
1502
|
+
help="Print the program's output as JSON on stdout (stable shape). The run ID and "
|
|
1503
|
+
"trace ID go to stderr as `Deployment run:` and `Trace:` lines",
|
|
1504
|
+
)
|
|
1496
1505
|
rn.set_defaults(func=_handler("run"))
|
|
1497
1506
|
|
|
1498
1507
|
dp = subparsers.add_parser(
|
|
@@ -220,8 +220,8 @@ def _configure(
|
|
|
220
220
|
def _resolve_program_id(explicit: str | None) -> str | None:
|
|
221
221
|
"""The explicit argument, else ``CMPND_PROGRAM_ID``, checked for shape.
|
|
222
222
|
|
|
223
|
-
``CMPND_PROGRAM_ID``
|
|
224
|
-
so it is not refused as the deprecated argument is.
|
|
223
|
+
``CMPND_PROGRAM_ID`` lets a process that runs one deployed program name that
|
|
224
|
+
program's id without code, so it is not refused as the deprecated argument is.
|
|
225
225
|
|
|
226
226
|
An empty variable counts as unset, so a shell that exports it blank behaves
|
|
227
227
|
like one that does not export it.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import json
|
|
6
|
-
from collections.abc import Generator
|
|
6
|
+
from collections.abc import Callable, Generator
|
|
7
7
|
from contextlib import contextmanager
|
|
8
8
|
from contextvars import ContextVar, Token
|
|
9
9
|
from datetime import datetime, timezone
|
|
@@ -90,9 +90,31 @@ def get_current_span() -> models.SpanBuilder | None:
|
|
|
90
90
|
return stack[-1] if stack else None
|
|
91
91
|
|
|
92
92
|
|
|
93
|
+
SpanStartListener = Callable[["models.SpanBuilder"], None]
|
|
94
|
+
|
|
95
|
+
# Called with each span as it is pushed, before it ends. A hosted kernel sets it to send
|
|
96
|
+
# each span's start to its worker, so the worker can end a span a run never ended when
|
|
97
|
+
# the run dies with the kernel (a deadline, a sandbox exit, a trap).
|
|
98
|
+
_span_start_listener: SpanStartListener | None = None
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def set_span_start_listener(listener: SpanStartListener | None) -> SpanStartListener | None:
|
|
102
|
+
"""Install the span-start listener, or clear it with None. Returns the one it replaced."""
|
|
103
|
+
global _span_start_listener
|
|
104
|
+
previous = _span_start_listener
|
|
105
|
+
_span_start_listener = listener
|
|
106
|
+
return previous
|
|
107
|
+
|
|
108
|
+
|
|
93
109
|
def push_span(span: models.SpanBuilder) -> None:
|
|
94
|
-
"""Push a span onto this context's stack."""
|
|
110
|
+
"""Push a span onto this context's stack, and tell the span-start listener."""
|
|
95
111
|
_span_stack.set((*_span_stack.get(), span))
|
|
112
|
+
listener = _span_start_listener
|
|
113
|
+
if listener is not None:
|
|
114
|
+
try:
|
|
115
|
+
listener(span)
|
|
116
|
+
except Exception: # noqa: BLE001 — telemetry never fails the program
|
|
117
|
+
pass
|
|
96
118
|
|
|
97
119
|
|
|
98
120
|
def pop_span() -> models.SpanBuilder | None:
|
|
@@ -14,6 +14,7 @@ import random
|
|
|
14
14
|
import sys
|
|
15
15
|
import time
|
|
16
16
|
import warnings
|
|
17
|
+
from collections.abc import Callable
|
|
17
18
|
from typing import Any
|
|
18
19
|
|
|
19
20
|
import httpx
|
|
@@ -139,19 +140,31 @@ class RunWaitTimeout(TimeoutError):
|
|
|
139
140
|
|
|
140
141
|
``status`` and ``status_reason`` are the run's last header read, when one
|
|
141
142
|
arrived: why the run is still open, such as a queued run waiting for a
|
|
142
|
-
credential or a worker.
|
|
143
|
+
credential or a worker. ``trace_id`` is the run's root trace from that read,
|
|
144
|
+
which streams while the run runs, or ``None`` when serve named none yet.
|
|
143
145
|
"""
|
|
144
146
|
|
|
145
|
-
def __init__(
|
|
147
|
+
def __init__(
|
|
148
|
+
self,
|
|
149
|
+
run_id: str,
|
|
150
|
+
*,
|
|
151
|
+
status: str | None = None,
|
|
152
|
+
status_reason: str | None = None,
|
|
153
|
+
trace_id: str | None = None,
|
|
154
|
+
):
|
|
146
155
|
state = ""
|
|
147
156
|
if status:
|
|
148
157
|
state = f" ({status}: {status_reason})" if status_reason else f" ({status})"
|
|
158
|
+
trace = f" Follow its trace with `cmpnd traces show {trace_id}`." if trace_id else ""
|
|
149
159
|
super().__init__(
|
|
150
|
-
f"Deployment run {run_id} has not settled{state}. "
|
|
160
|
+
f"Deployment run {run_id} has not settled{state}.{trace} "
|
|
151
161
|
f"Resume with `{_wait_command(run_id)}`, or stop it with `{_cancel_command(run_id)}`."
|
|
152
162
|
)
|
|
153
163
|
self.status = status
|
|
154
164
|
self.status_reason = status_reason
|
|
165
|
+
self.trace_id = trace_id
|
|
166
|
+
# Where `Client.get_trace_id` reads a run's trace from any run result or error.
|
|
167
|
+
self._cmpnd_deployment_trace_id = trace_id
|
|
155
168
|
_set_run_id(self, run_id)
|
|
156
169
|
|
|
157
170
|
|
|
@@ -309,6 +322,12 @@ def _json(response: httpx.Response, what: str, run_id: str | None) -> object:
|
|
|
309
322
|
raise _protocol_error(f"Deployment run {what} returned invalid JSON.", run_id) from exc
|
|
310
323
|
|
|
311
324
|
|
|
325
|
+
def _trace_id(header: dict[str, Any]) -> str | None:
|
|
326
|
+
"""The run's root trace ID, which serve names once a worker admits the run."""
|
|
327
|
+
trace_id = header.get("trace_id")
|
|
328
|
+
return trace_id if isinstance(trace_id, str) and trace_id else None
|
|
329
|
+
|
|
330
|
+
|
|
312
331
|
def _validate_run(body: object, *, submitted: bool) -> dict[str, Any]:
|
|
313
332
|
run_id = _http._body_deployment_run_id(body)
|
|
314
333
|
if not isinstance(body, dict) or run_id is None:
|
|
@@ -408,6 +427,11 @@ class _RunClient:
|
|
|
408
427
|
# The last run header a wait read, so a wait that runs out can say why
|
|
409
428
|
# the run is still open.
|
|
410
429
|
self.last_header: dict[str, Any] | None = None
|
|
430
|
+
# Called with the run's trace ID on the first header that names it, and
|
|
431
|
+
# again if a later header names another, so a caller can show the trace
|
|
432
|
+
# while the run is still running.
|
|
433
|
+
self.on_trace: Callable[[str], None] | None = None
|
|
434
|
+
self._named_trace: str | None = None
|
|
411
435
|
|
|
412
436
|
def __enter__(self) -> _RunClient:
|
|
413
437
|
self.client = _http.new_client(headers={"X-API-Key": self.api_key})
|
|
@@ -569,12 +593,26 @@ class _RunClient:
|
|
|
569
593
|
raise
|
|
570
594
|
reason = header.get("status_reason")
|
|
571
595
|
raise RunWaitTimeout(
|
|
572
|
-
run_id,
|
|
596
|
+
run_id,
|
|
597
|
+
status=header.get("status"),
|
|
598
|
+
status_reason=reason if isinstance(reason, str) else None,
|
|
599
|
+
trace_id=_trace_id(header),
|
|
573
600
|
) from None
|
|
574
601
|
|
|
602
|
+
def _saw(self, header: dict[str, Any]) -> None:
|
|
603
|
+
"""Record a header the wait read, and name its trace once it appears."""
|
|
604
|
+
self.last_header = header
|
|
605
|
+
trace_id = _trace_id(header)
|
|
606
|
+
if trace_id is not None and trace_id != self._named_trace:
|
|
607
|
+
self._named_trace = trace_id
|
|
608
|
+
if self.on_trace is not None:
|
|
609
|
+
self.on_trace(trace_id)
|
|
610
|
+
|
|
575
611
|
def _follow(self, run_id: str, deadline: float | None, initial: dict[str, Any] | None) -> dict[str, Any]:
|
|
576
612
|
"""The wait loop. It records each header it reads in ``last_header``."""
|
|
577
613
|
header = initial
|
|
614
|
+
if header is not None:
|
|
615
|
+
self._saw(header)
|
|
578
616
|
need_status = header is None
|
|
579
617
|
delay = _FIRST_POLL_DELAY
|
|
580
618
|
status_path = f"/api/v1/deployments/runs/{run_id}"
|
|
@@ -583,7 +621,7 @@ class _RunClient:
|
|
|
583
621
|
response = self._poll(status_path, deadline, run_id)
|
|
584
622
|
if response is not None:
|
|
585
623
|
header = _validate_run(_json(response, "status", run_id), submitted=False)
|
|
586
|
-
self.
|
|
624
|
+
self._saw(header)
|
|
587
625
|
need_status = True
|
|
588
626
|
if header is not None and header["status"] in _TERMINAL:
|
|
589
627
|
# The status is settled, so only the answer remains to be read.
|
|
@@ -6,7 +6,11 @@ per-example result processing and export in on_evaluate_end.
|
|
|
6
6
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
|
+
import functools
|
|
9
10
|
import logging
|
|
11
|
+
import threading
|
|
12
|
+
import types
|
|
13
|
+
from collections.abc import Iterable
|
|
10
14
|
from datetime import datetime, timezone
|
|
11
15
|
from typing import Any
|
|
12
16
|
|
|
@@ -31,6 +35,20 @@ class EvalHandler:
|
|
|
31
35
|
self._eval_call_id_to_run: dict[str, models.EvalRunBuilder] = {}
|
|
32
36
|
self._eval_traces: dict[str, list[models.TraceBuilder]] = {}
|
|
33
37
|
self._eval_signature_input_fields: dict[str, set[str]] = {}
|
|
38
|
+
# Per Evaluate call: the exception a metric raised, and the prediction it
|
|
39
|
+
# was grading, keyed by the identity of the devset example it graded.
|
|
40
|
+
# DSPy's executor swallows the exception, so this is the only record.
|
|
41
|
+
self._metric_failures: dict[str, dict[int, tuple[Exception, Any]]] = {}
|
|
42
|
+
self._metric_failures_lock = threading.Lock()
|
|
43
|
+
# Per Evaluate call: the Evaluate instance and the metric it held before
|
|
44
|
+
# on_evaluate_start wrapped it, restored in on_evaluate_end.
|
|
45
|
+
self._wrapped_metrics: dict[str, tuple[Any, Any]] = {}
|
|
46
|
+
# The Evaluate instance per call, for its failure_score.
|
|
47
|
+
self._evaluate_instances: dict[str, Any] = {}
|
|
48
|
+
# Evaluate calls made outside any open trace. Their span is a stack
|
|
49
|
+
# marker only: it parents no program run, and the eval run record holds
|
|
50
|
+
# everything on it, so it is never exported.
|
|
51
|
+
self._detached_eval_spans: set[str] = set()
|
|
34
52
|
|
|
35
53
|
@property
|
|
36
54
|
def active_eval_run(self) -> models.EvalRunBuilder | None:
|
|
@@ -121,6 +139,9 @@ class EvalHandler:
|
|
|
121
139
|
else:
|
|
122
140
|
eval_run.metric_name = str(metric)
|
|
123
141
|
|
|
142
|
+
self._evaluate_instances[call_id] = instance
|
|
143
|
+
self._wrap_instance_metric(call_id, instance, inputs)
|
|
144
|
+
|
|
124
145
|
# Extract devset info - check multiple locations
|
|
125
146
|
devset = inputs.get("devset")
|
|
126
147
|
devset_len = len(devset) if devset else 0
|
|
@@ -196,7 +217,13 @@ class EvalHandler:
|
|
|
196
217
|
context.set_current_eval_run(eval_run)
|
|
197
218
|
self.active_eval_run = eval_run
|
|
198
219
|
|
|
199
|
-
# Also create a span for the evaluation itself
|
|
220
|
+
# Also create a span for the evaluation itself. Program runs beneath it
|
|
221
|
+
# root their own traces, so outside an open trace the span belongs to no
|
|
222
|
+
# trace. It stays on the stack, where on_module_start reads it, and is
|
|
223
|
+
# never exported: on its own it would be a one-span trace that never
|
|
224
|
+
# finishes.
|
|
225
|
+
if context.get_current_trace() is None:
|
|
226
|
+
self._detached_eval_spans.add(call_id)
|
|
200
227
|
span = context.create_child_span("Evaluate", models.SpanType.EVALUATION)
|
|
201
228
|
|
|
202
229
|
# Capture evaluation config in span attributes
|
|
@@ -208,6 +235,50 @@ class EvalHandler:
|
|
|
208
235
|
self._callback._call_id_to_span[call_id] = span
|
|
209
236
|
context.push_span(span)
|
|
210
237
|
|
|
238
|
+
def _wrap_instance_metric(self, call_id: str, instance: Any, inputs: dict[str, Any]) -> None:
|
|
239
|
+
"""Record what the Evaluate instance's own metric raises, for the eval record.
|
|
240
|
+
|
|
241
|
+
``dspy.Evaluate`` runs each example on an executor that catches the
|
|
242
|
+
metric's exception, logs it and puts ``(dspy.Prediction(), failure_score)``
|
|
243
|
+
in the example's slot. The SDK sees only that placeholder. Wrapping the
|
|
244
|
+
metric for the call keeps the exception and the prediction it graded.
|
|
245
|
+
Only the instance's metric can be wrapped: a metric passed to the call
|
|
246
|
+
reaches DSPy as an argument the callback cannot replace.
|
|
247
|
+
"""
|
|
248
|
+
if inputs.get("metric") is not None:
|
|
249
|
+
return
|
|
250
|
+
metric = getattr(instance, "metric", None)
|
|
251
|
+
if not callable(metric):
|
|
252
|
+
return
|
|
253
|
+
failures: dict[int, tuple[Exception, Any]] = {}
|
|
254
|
+
lock = self._metric_failures_lock
|
|
255
|
+
|
|
256
|
+
@functools.wraps(metric)
|
|
257
|
+
def recording_metric(example: Any, prediction: Any, *args: Any, **kwargs: Any) -> Any:
|
|
258
|
+
try:
|
|
259
|
+
return metric(example, prediction, *args, **kwargs)
|
|
260
|
+
except Exception as exc:
|
|
261
|
+
with lock:
|
|
262
|
+
failures[id(example)] = (exc, prediction)
|
|
263
|
+
raise
|
|
264
|
+
|
|
265
|
+
# DSPy names a metric's results column by __name__ for a function and by
|
|
266
|
+
# class for any other callable, so a callable object keeps its class name.
|
|
267
|
+
if not isinstance(metric, types.FunctionType):
|
|
268
|
+
recording_metric.__name__ = type(metric).__name__
|
|
269
|
+
try:
|
|
270
|
+
instance.metric = recording_metric
|
|
271
|
+
except AttributeError:
|
|
272
|
+
return
|
|
273
|
+
self._metric_failures[call_id] = failures
|
|
274
|
+
self._wrapped_metrics[call_id] = (instance, metric)
|
|
275
|
+
|
|
276
|
+
def _restore_instance_metric(self, call_id: str) -> None:
|
|
277
|
+
wrapped = self._wrapped_metrics.pop(call_id, None)
|
|
278
|
+
if wrapped is not None:
|
|
279
|
+
instance, metric = wrapped
|
|
280
|
+
instance.metric = metric
|
|
281
|
+
|
|
211
282
|
def _program_id(self, exp: Any, program: Any, optimization_run_id: str | None) -> str | None:
|
|
212
283
|
"""The program id the eval run carries, resolved the way a trace's is.
|
|
213
284
|
|
|
@@ -240,6 +311,12 @@ class EvalHandler:
|
|
|
240
311
|
exception: Exception | None = None,
|
|
241
312
|
) -> None:
|
|
242
313
|
"""Handle evaluation completion - finalizes and exports EvalRunBuilder."""
|
|
314
|
+
self._restore_instance_metric(call_id)
|
|
315
|
+
metric_failures = self._metric_failures.pop(call_id, {})
|
|
316
|
+
evaluate_instance = self._evaluate_instances.pop(call_id, None)
|
|
317
|
+
detached = call_id in self._detached_eval_spans
|
|
318
|
+
self._detached_eval_spans.discard(call_id)
|
|
319
|
+
|
|
243
320
|
# Get the eval run
|
|
244
321
|
eval_run = self._eval_call_id_to_run.pop(call_id, None)
|
|
245
322
|
|
|
@@ -252,7 +329,7 @@ class EvalHandler:
|
|
|
252
329
|
else:
|
|
253
330
|
span.status = models.TraceStatus.OK
|
|
254
331
|
context.pop_span()
|
|
255
|
-
if self._callback._should_stream_span(span):
|
|
332
|
+
if not detached and self._callback._should_stream_span(span):
|
|
256
333
|
exp = self._callback._current_exporter()
|
|
257
334
|
if exp:
|
|
258
335
|
exp.export_span(span)
|
|
@@ -320,6 +397,11 @@ class EvalHandler:
|
|
|
320
397
|
# Unpack result - DSPy returns (example, prediction, score)
|
|
321
398
|
if isinstance(result_item, tuple) and len(result_item) >= 3:
|
|
322
399
|
example, prediction, score = result_item[:3]
|
|
400
|
+
# The metric raised on this example: DSPy put a placeholder
|
|
401
|
+
# in its slot, and the wrapper kept the real prediction.
|
|
402
|
+
metric_failure = metric_failures.get(id(example))
|
|
403
|
+
if metric_failure is not None:
|
|
404
|
+
prediction = metric_failure[1]
|
|
323
405
|
|
|
324
406
|
# Extract example as dict
|
|
325
407
|
if hasattr(example, "toDict"):
|
|
@@ -352,11 +434,18 @@ class EvalHandler:
|
|
|
352
434
|
elif isinstance(prediction, dict):
|
|
353
435
|
example_builder.actual_output = prediction
|
|
354
436
|
|
|
355
|
-
# Set score - normalize to 0-100 scale
|
|
437
|
+
# Set score - normalize to 0-100 scale. A failed example keeps
|
|
438
|
+
# the failure_score DSPy counted toward the run's score.
|
|
356
439
|
raw_score = float(score) if score is not None else 0.0
|
|
357
440
|
example_builder.score = raw_score * 100 # Convert to percentage
|
|
358
|
-
|
|
359
|
-
|
|
441
|
+
if metric_failure is not None:
|
|
442
|
+
example_builder.set_error(metric_failure[0])
|
|
443
|
+
elif _is_failure_placeholder(prediction, score, evaluate_instance):
|
|
444
|
+
example_builder.status = models.EvalExampleStatus.ERROR
|
|
445
|
+
example_builder.error_message = _UNRECORDED_FAILURE
|
|
446
|
+
else:
|
|
447
|
+
example_builder.passed = raw_score > 0
|
|
448
|
+
example_builder.status = models.EvalExampleStatus.COMPLETED
|
|
360
449
|
|
|
361
450
|
# Compute example hash for comparability
|
|
362
451
|
example_builder.example_hash = identity.compute_example_hash(example_builder.inputs)
|
|
@@ -414,3 +503,30 @@ class EvalHandler:
|
|
|
414
503
|
self._eval_signature_input_fields.pop(call_id, None)
|
|
415
504
|
context.set_current_eval_run(None)
|
|
416
505
|
self.active_eval_run = None
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
# What an example that failed without a recorded exception says. DSPy logs the
|
|
509
|
+
# exception and keeps nothing the callback can read.
|
|
510
|
+
_UNRECORDED_FAILURE = "The program or the metric raised on this example; dspy.Evaluate logged the exception"
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
def _is_failure_placeholder(prediction: Any, score: Any, evaluate_instance: Any) -> bool:
|
|
514
|
+
"""Whether ``dspy.Evaluate`` put its failure placeholder in an example's slot.
|
|
515
|
+
|
|
516
|
+
When the program or the metric raises, Evaluate records
|
|
517
|
+
``(dspy.Prediction(), failure_score)``. An instrumented program's own
|
|
518
|
+
prediction carries the trace stamp, so an empty, unstamped prediction scored
|
|
519
|
+
at the failure score is the placeholder.
|
|
520
|
+
"""
|
|
521
|
+
from . import callback
|
|
522
|
+
|
|
523
|
+
if prediction is None or callback.trace_id(prediction) is not None:
|
|
524
|
+
return False
|
|
525
|
+
keys = getattr(prediction, "keys", None)
|
|
526
|
+
if not callable(keys):
|
|
527
|
+
return False
|
|
528
|
+
held = keys()
|
|
529
|
+
if not isinstance(held, Iterable) or any(True for _ in held):
|
|
530
|
+
return False
|
|
531
|
+
failure_score = getattr(evaluate_instance, "failure_score", 0.0)
|
|
532
|
+
return score == failure_score
|
|
@@ -82,8 +82,17 @@ def clean_inputs(inputs: dict[str, Any], dspy: Any, max_field_size: int) -> dict
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
def is_gepa_bootstrap_wrapper(instance: Any) -> bool:
|
|
85
|
-
"""Return whether DSPy's bootstrap tracer temporarily patched this module.
|
|
86
|
-
|
|
85
|
+
"""Return whether DSPy's bootstrap tracer temporarily patched this module.
|
|
86
|
+
|
|
87
|
+
Reads ``forward`` with ``object.__getattribute__``, as DSPy's bootstrap
|
|
88
|
+
tracer does. ``dspy.Module.__getattribute__`` logs a "calling forward
|
|
89
|
+
directly is discouraged" warning for any read of ``forward`` outside
|
|
90
|
+
``__call__``, and this check runs on every module call.
|
|
91
|
+
"""
|
|
92
|
+
try:
|
|
93
|
+
forward = object.__getattribute__(instance, "forward")
|
|
94
|
+
except AttributeError:
|
|
95
|
+
return False
|
|
87
96
|
function = getattr(forward, "__func__", forward)
|
|
88
97
|
return (
|
|
89
98
|
getattr(function, "__module__", None) == "dspy.teleprompt.bootstrap_trace"
|
|
@@ -1374,6 +1374,10 @@ class EvalExampleBuilder:
|
|
|
1374
1374
|
# Status
|
|
1375
1375
|
status: EvalExampleStatus = EvalExampleStatus.PENDING
|
|
1376
1376
|
error_message: str | None = None
|
|
1377
|
+
# The class name of the exception that failed the example, such as the
|
|
1378
|
+
# metric's ``ValueError``. None when the example did not fail, or when DSPy
|
|
1379
|
+
# kept no exception to name.
|
|
1380
|
+
error_type: str | None = None
|
|
1377
1381
|
|
|
1378
1382
|
def set_result(
|
|
1379
1383
|
self,
|
|
@@ -1393,10 +1397,11 @@ class EvalExampleBuilder:
|
|
|
1393
1397
|
self.cost = cost
|
|
1394
1398
|
self.status = EvalExampleStatus.COMPLETED
|
|
1395
1399
|
|
|
1396
|
-
def set_error(self, exception:
|
|
1400
|
+
def set_error(self, exception: BaseException) -> None:
|
|
1397
1401
|
"""Mark this example as errored."""
|
|
1398
1402
|
self.status = EvalExampleStatus.ERROR
|
|
1399
1403
|
self.error_message = str(exception)
|
|
1404
|
+
self.error_type = exception.__class__.__name__
|
|
1400
1405
|
|
|
1401
1406
|
def to_api_dict(self) -> dict[str, Any]:
|
|
1402
1407
|
"""Convert to API-compatible dictionary."""
|
|
@@ -1415,6 +1420,7 @@ class EvalExampleBuilder:
|
|
|
1415
1420
|
"cost": self.cost,
|
|
1416
1421
|
"status": self.status.value,
|
|
1417
1422
|
"error_message": _strip_unstorable_opt(self.error_message),
|
|
1423
|
+
"error_type": self.error_type,
|
|
1418
1424
|
}
|
|
1419
1425
|
|
|
1420
1426
|
|
|
@@ -285,10 +285,21 @@ seconds, unless `--timeout` sets the budget. The CLI prints the accepted run ID
|
|
|
285
285
|
on stderr as soon as serve replies, which can take up to serve's five-second
|
|
286
286
|
wait. A failed run exits nonzero. Human mode prints the stored error code,
|
|
287
287
|
message and provider status. `--json` prints the whole settled run on stdout.
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
288
|
+
Serve names a run's root trace once a worker admits the run, and the trace
|
|
289
|
+
streams while the run runs. The CLI prints `Trace: <id>` on stderr on the
|
|
290
|
+
first read that names it, so a running run shows its trace before it settles,
|
|
291
|
+
completed or failed. `cmpnd traces show <id>` opens that trace. The run's
|
|
292
|
+
`trace_id` field holds the same ID, and serve leaves it out on a queued run and
|
|
293
|
+
when the run stored no trace.
|
|
294
|
+
|
|
295
|
+
`--json` keeps stdout the program's output alone, unchanged, so a script that
|
|
296
|
+
parses it keeps working. The run ID and trace ID go to stderr as the
|
|
297
|
+
`Deployment run: <id>` and `Trace: <id>` lines in both modes. The output can be
|
|
298
|
+
any JSON value, so a field beside it would not fit every program, and wrapping
|
|
299
|
+
it would break every script that reads it today. `--async --json` and a failed
|
|
300
|
+
run's `--json` print the whole run header, which carries `trace_id`. A wait
|
|
301
|
+
that runs out under `--json` prints `{"deployment_run_id", "error"}` and adds
|
|
302
|
+
`trace_id` when the run has one.
|
|
292
303
|
The CLI retries status reads that time out or answer `408`, `429` or `5xx`
|
|
293
304
|
within the budget.
|
|
294
305
|
|