cmpnd 0.102.3__tar.gz → 0.103.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.102.3 → cmpnd-0.103.0}/PKG-INFO +1 -1
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/__init__.py +13 -4
- cmpnd-0.103.0/cmpnd/_reanchor_patch.py +386 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/top.py +25 -3
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/client.py +80 -11
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/deployment_runs.py +5 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/execution.py +47 -45
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/optimizers/gepa_callback.py +2 -26
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/optimizers/tracker.py +38 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/references/gaps.md +1 -1
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/references/optimize.md +24 -1
- {cmpnd-0.102.3 → cmpnd-0.103.0}/docs/cli.md +2 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/docs/client.md +5 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/docs/sdk-instrumentation.md +7 -5
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/rejections.py +8 -1
- {cmpnd-0.102.3 → cmpnd-0.103.0}/pyproject.toml +1 -1
- cmpnd-0.103.0/tests/e2e/test_reanchor_optimization.py +150 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_bedrock_converse.py +5 -2
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_schema_sample.py +25 -1
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_deployment_runs.py +27 -1
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_execute.py +6 -5
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_execute_run_identity.py +3 -1
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_exporter_rejections.py +30 -0
- cmpnd-0.103.0/tests/test_reanchor_patch.py +447 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_trace_labels.py +15 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/uv.lock +1 -1
- {cmpnd-0.102.3 → cmpnd-0.103.0}/.gitignore +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/AGENTS.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/CLAUDE.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/README.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_account.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_assessments.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_authored_import.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_deployments.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_exporter_pool.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_gepa_patch.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_guides.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_http.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_label_vocabulary.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_program_patch.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_provider_types.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_provider_writes.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_rlm_patch.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_runtime_tools.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_timespec.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_traces.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/_valsets.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/authored.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/callback.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/api_client.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/admin.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/assessments.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/auth.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/datasets.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/deployments.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/evals.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/labels.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/login.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/optimizations.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/org.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/programs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/provider_credentials.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/providers.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/skill.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/tool_servers.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/traces.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/commands/valsets.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/credentials.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/deprecation.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/label_args.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/pagination.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/shell.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/skill/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/skill/_vendor/drskill/LICENSE +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/skill/_vendor/drskill/VENDOR.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/skill/_vendor/drskill/harnesses.toml +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/skill/agents.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/skill/bundle.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/skill/install.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/skill/offer.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/trace_render.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/tree_help.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/verbs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/cli/views.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/configuration.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/context.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/credentials.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/dataset_sync.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/datasets.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/decorators.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/deployment.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/deployment_metadata.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/eval_handler.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/exporter.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/exporter_http.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/helpers.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/identity.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/imaging.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/ir/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/ir/decode.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/ir/encode.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/ir/hash.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/ir/program.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/ir/reflection.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/ir/types.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/ir/xxh64.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/labels.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/lm_configuration.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/mcp_servers.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/models.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/named_programs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/optimization.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/optimizers/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/optimizers/gepa.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/optimizers/resume.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/packaging.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/program_naming.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/programs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/references.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/retry.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/SKILL.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/examples/support_triage/data/train.jsonl +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/examples/support_triage/data/val.jsonl +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/examples/support_triage/optimize.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/examples/support_triage/program.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/examples/support_triage/task.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/examples/support_triage/task_gpt5mini.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/examples/support_triage/task_haiku.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/references/deploy.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/references/dspy.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/references/feedback.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/references/observe.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/references/setup.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/references/tools.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/skill_bundle/scripts/tools_block.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/traces.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/cmpnd/versions.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/docs/2026-04-02-code-review.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/docs/custom-proposer.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/docs/plans/2026-04-05-train-val-dataset-capture-design.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/docs/plans/2026-04-05-train-val-dataset-capture.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/docs/reading-traces.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/docs/versions.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/examples/generalizing_proposer.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/examples/local_ollama.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/LINEAGE.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/README.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/bodies.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/client_floor.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/exporter_http.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/network.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/process_local.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/program_names.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/protocols.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/py.typed +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/queue_budget.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/request_log.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/retry.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/sender.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/span_context.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/storable.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/trace_facts.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/cmpnd_ingest/user_agent.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/ingest/pyproject.toml +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/audit-sdist.sh +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/capture_review_run.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/check-pip-install.sh +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/check_release_artifacts.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/export-bedrock-token.sh +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/fixtures/review_run.json.gz +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/fork-matrix.sh +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/gepa_resume_bug.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/install-test-env.sh +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/release-gate.sh +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/release-real-models.sh +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/require_version_bump.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/seed_review_run.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/selfhost_compat.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/scripts/test-in-linux.sh +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/stubs/dspy/__init__.pyi +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/stubs/dspy/primitives/__init__.pyi +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/stubs/dspy/primitives/prediction.pyi +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/stubs/dspy/utils/__init__.pyi +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/stubs/dspy/utils/callback.pyi +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/stubs/dspy/utils/dummies.pyi +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/_credential_route.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/_deployment_signature_helpers.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/_exporter_helpers.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/_fake_clock.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/_fresh_interpreter.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/_identity_helpers.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/_resolve_refs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/_traced_run.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/conftest.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/committee_task.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/conftest.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/continuation_task.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/data/committee_train.ndjson.gz +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/data/committee_val.ndjson.gz +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/fake_lm.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/helpers.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/target_capabilities.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_assessments_cli.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_capture_prompts.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_composite_module.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_dataset_auto_creation.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_deploy_execute.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_deploy_pandas.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_deploy_programs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_edge_cases.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_example_hash.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_gepa_optimization.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_interpreter_spans.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_lm_accuracy.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_module_tracing.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_optimization_lineage.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_optimization_metric_identity.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_optimize_authored_metric.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_optimize_continuation.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_optimize_custom_proposer.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_optimize_failures.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_optimize_loop.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_optimize_review_committee.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_optimize_server_owned_completion.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_parallel_export.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_program_versions.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_project_attribution.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_react_tool_spans.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_save_load.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_trace_structure.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_traces_read.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_user_attribution.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/e2e/test_valsets_cli.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/01_predict_qa.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/02_predict_renamed_field.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/03_chain_of_thought_qa.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/04_predict_richer_types.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/05_composite_two_predicts.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/06_multichaincomparison.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/07_program_of_thought.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/08_opaque_module.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/09_predict_pydantic_field.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/10_react.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/11_refine.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/12_retrieve.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/13_knn.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/14_parallel.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/identity_vectors/README.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/ingest_conformance.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/integration/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/integration/authored_optimize/judge.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/integration/authored_optimize/optimize_hosted.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/integration/conftest.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/integration/hosted_mcp_tool_optimize_probe.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/integration/hosted_optimize_probe.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/integration/optimization_run_probe.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/integration/test_cli_deploy_smoketest.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/integration/test_logs_renders_traces.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/integration/test_optimization_run.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/integration/test_optimizing_progress.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/integration/test_unhappy_path.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/lm15_prompt_fixture.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/lm15_prompts/four_turn_predict.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/lm15_prompts/rlm_six_turns.json +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/__main__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/drain.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/ingest.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/latency_transport.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/rlm_shape.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/rlm_size_report.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/sender/README.md +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/sender/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/sender/asgi_app.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/sender/baseline.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/sender/drive_server.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/sender/exits.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/sender/outage.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/sender/outage_proxy.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/sender/pools.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/sender/program.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/sender/verify.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/sweep.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/test_rlm_shape.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/load/test_rlm_size_report.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/conftest.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/seed_parity.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/test_auth.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/test_datasets.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/test_deployments.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/test_evals.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/test_health.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/test_modules.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/test_optimizations.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/test_programs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/test_signatures.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/test_trace_streaming.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/parity/test_traces.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/_provider.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/_readiness.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/_reliability.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/_result.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/mint_bedrock_token.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_deploy_programs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_multi_client_stress.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_optimize_client_committee.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_optimize_continuation.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_optimize_loop.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_optimize_loop_wasm.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_optimize_stress.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_provider_roles.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_readiness.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_real_provider_twins.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_reliability.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_reliability_classify.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_rlm_wasm.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_skill_agent.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/real_models/test_trace_search.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/span_reference_fixture.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_adapter_reentrancy.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_assessments_api.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_authored.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_authored_binding_credentials.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_authored_bundle_collisions.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_authored_metric_contract.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_authored_named_models.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_authored_optimize.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_callback.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_candidate_lineage.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_check_release_artifacts.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/conftest.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_admin.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_api_client.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_assessments.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_auth.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_credentials.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_datasets.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_deployment_runs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_deployments.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_evals.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_json_flag.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_login.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_main.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_optimizations.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_org.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_pagination.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_parity.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_programs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_provider_credentials.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_provider_flags.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_providers.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_shell.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_skill.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_skill_offer.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_tool_servers.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_top.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_traces.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_traces_program_and_module.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_traces_search_wire.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_tree_help.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cli/test_valsets.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_client.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_client_floor.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_client_program_names.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_clustering/__init__.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_clustering/conftest.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_clustering/test_edge_cases.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_clustering/test_hash_consistency.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_clustering/test_type_conversion.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_cmp551_grouping_identity.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_configuration.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_context.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_context_propagation.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_credential_kwargs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_credential_selection.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_dataset_polling.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_dataset_sync.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_datasets.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_decision_client_spans.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_decorators.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_deploy.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_deploy_mcp_tool_references.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_deploy_program_id.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_deployment_metadata.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_deployment_targets.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_deployments_read.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_eval.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_eval_example_attribution.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_eval_example_failures.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_eval_program_id.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_eval_start.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_eval_trace_grouping.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_exception_paths.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_exporter.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_exporter_fork_exec.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_exporter_program_names.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_exporter_queue.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_exporter_real.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_fake_lm.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_forward_access_warning.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_gepa_callback.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_gepa_integration.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_gepa_output_normalization.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_gepa_resume.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_identity.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_imaging.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_import_weight.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_ingest_conformance.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_ingest_second_producer.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_integration.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_interpreter_callback.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_ir_encoder_properties.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_ir_golden_vectors.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_ir_roundtrip.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_label_vocabulary.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_lm15_native_calls.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_lm15_prompt_fixtures.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_lm15_prompt_references.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_lm_configuration.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_lm_usage_shapes.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_mcp_tools.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_models.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_multi_client_stress_readiness.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_no_signature_hash_on_the_wire.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimization_phase_callback.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimization_program_names.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimization_progress.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimization_start.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimize.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimize_budget.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimize_labels.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimize_lift.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimize_lms.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimize_proposer.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimize_reflection_lm.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimize_split.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_optimize_terminal_failure.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_owned_trace_streaming.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_packaging.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_packaging_callable_source.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_packaging_mcp_tools.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_packaging_program_source.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_poll_until.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_process_local.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_program_id_deprecation.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_program_identity.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_program_lineage_persist.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_program_names_in_deploy.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_program_naming.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_programs_create.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_project_payload.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_provider_keyword.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_provider_types.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_provider_values.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_provider_writes.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_queue_budget.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_real_provider_twins_readiness.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_reflector_properties.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_reflector_smoke.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_release_gate_script.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_release_real_models_script.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_replaced_names.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_repro_reactv2_bugs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_require_version_bump.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_retry.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_reversible_failures.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_rlm_patch.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_run_attribution_paths.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_runtime_tools.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_schemas.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_seal_lm_credential.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_seed_review_run.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_sender_scenarios.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_sending_settings.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_signature_inputs.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_skill_bundle.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_skill_tools_block.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_span_references.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_span_sent_once.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_span_submission.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_span_submission_wire_contract.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_stored_login.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_system_one.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_token_attribution.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_trace_context_concurrency.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_trace_fact_wire_contract.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_trace_facts.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_trace_render.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_traces_label_search_busy.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_traces_read.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_tracked_gepa.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_tracker_enrich.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_truncation.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_upload_auth_headers.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_user_agent.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_valsets_api.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_versions.py +0 -0
- {cmpnd-0.102.3 → cmpnd-0.103.0}/tests/test_xxh64.py +0 -0
|
@@ -39,7 +39,7 @@ from .deployment_metadata import (
|
|
|
39
39
|
UnsupportedDeploymentMetadataVersion,
|
|
40
40
|
)
|
|
41
41
|
from .deployment_runs import RunNotSubmitted, RunRefused, RunResultExpired, RunSubmissionUncertain, RunWaitTimeout
|
|
42
|
-
from .execution import DeployedProgram, RetryableProviderError
|
|
42
|
+
from .execution import DeployedProgram, RetryableProviderError, RunCancelled, RunFailed
|
|
43
43
|
from .exporter import flush, flush_exporter, sender_health, shutdown_exporter
|
|
44
44
|
from .lm_configuration import HostedLM, SystemOne, configure_lm
|
|
45
45
|
from .mcp_servers import (
|
|
@@ -139,6 +139,8 @@ __all__ = [
|
|
|
139
139
|
"RunRefused",
|
|
140
140
|
"RunWaitTimeout",
|
|
141
141
|
"RunResultExpired",
|
|
142
|
+
"RunFailed",
|
|
143
|
+
"RunCancelled",
|
|
142
144
|
"DeployedProgram",
|
|
143
145
|
"RetryableProviderError",
|
|
144
146
|
"ProgramAddress",
|
|
@@ -166,7 +168,8 @@ def auto_instrument() -> CmpndCallback:
|
|
|
166
168
|
One-liner to enable DSPy tracing.
|
|
167
169
|
|
|
168
170
|
Automatically registers a CmpndCallback with DSPy's global settings
|
|
169
|
-
and patches dspy.GEPA to
|
|
171
|
+
and patches dspy.GEPA and dspy.experimental.ReAnchor to record each
|
|
172
|
+
compile as an optimization run.
|
|
170
173
|
Must call configure() first.
|
|
171
174
|
|
|
172
175
|
Returns:
|
|
@@ -213,6 +216,11 @@ def auto_instrument() -> CmpndCallback:
|
|
|
213
216
|
|
|
214
217
|
_gepa_patch.patch_gepa()
|
|
215
218
|
|
|
219
|
+
# Record each dspy.experimental.ReAnchor compile as an optimization run too.
|
|
220
|
+
from . import _reanchor_patch
|
|
221
|
+
|
|
222
|
+
_reanchor_patch.patch_reanchor()
|
|
223
|
+
|
|
216
224
|
# Persist the compiled-from lineage tag across state-only save/load so a
|
|
217
225
|
# continued optimization still stamps compiled_from_run_id after a disk
|
|
218
226
|
# reload / process restart.
|
|
@@ -234,7 +242,7 @@ def de_instrument() -> None:
|
|
|
234
242
|
|
|
235
243
|
The full teardown counterpart to :func:`auto_instrument`: removes the exact
|
|
236
244
|
``CmpndCallback`` that :func:`auto_instrument` installed and restores
|
|
237
|
-
``dspy.GEPA``, ``dspy.RLM`` and the program-state ``dump_state`` /
|
|
245
|
+
``dspy.GEPA``, ``dspy.experimental.ReAnchor``, ``dspy.RLM`` and the program-state ``dump_state`` /
|
|
238
246
|
``load_state`` to pristine. Idempotent, a no-op when nothing is instrumented,
|
|
239
247
|
and it touches no :class:`Client` — a client's callback is scoped through
|
|
240
248
|
``dspy.context`` and never lives in the global settings this removes. It also
|
|
@@ -254,9 +262,10 @@ def de_instrument() -> None:
|
|
|
254
262
|
dspy.configure(callbacks=remaining)
|
|
255
263
|
_auto_instrument_callback = None
|
|
256
264
|
|
|
257
|
-
from . import _gepa_patch, _program_patch, _rlm_patch
|
|
265
|
+
from . import _gepa_patch, _program_patch, _reanchor_patch, _rlm_patch
|
|
258
266
|
|
|
259
267
|
_gepa_patch.unpatch_gepa()
|
|
268
|
+
_reanchor_patch.unpatch_reanchor()
|
|
260
269
|
_program_patch.unpatch_program_state()
|
|
261
270
|
_rlm_patch.unpatch_rlm_tools()
|
|
262
271
|
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
"""dspy.experimental.ReAnchor patch that records each compile as an optimization run.
|
|
2
|
+
|
|
3
|
+
ReAnchor fits the numeric settings of a program's decision outputs: the threshold
|
|
4
|
+
of a ``Noul``, the cuts of a ``Score`` and the weights of a ``Choice``. It changes
|
|
5
|
+
no instruction, so its run maps onto the optimization record this way:
|
|
6
|
+
|
|
7
|
+
- candidate 0 is the program as given, and candidate 1 is the calibrated program
|
|
8
|
+
- each output ReAnchor fitted is one iteration, whose parent and proposed texts are
|
|
9
|
+
the output's settings before and after, as JSON
|
|
10
|
+
|
|
11
|
+
ReAnchor reruns the whole trainset once for each candidate setting it tries, and
|
|
12
|
+
those reruns are nearly all cache hits. The calibration search therefore runs with
|
|
13
|
+
no CmpndCallback, so only the passes that score the program before and after
|
|
14
|
+
calibration send traces.
|
|
15
|
+
|
|
16
|
+
``patch_reanchor()`` is invoked lazily from ``cmpnd.auto_instrument()``. DSPy
|
|
17
|
+
releases before ReAnchor existed install nothing.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
import contextvars
|
|
23
|
+
import copy
|
|
24
|
+
import functools
|
|
25
|
+
import json
|
|
26
|
+
import threading
|
|
27
|
+
from collections.abc import Callable
|
|
28
|
+
from typing import Any
|
|
29
|
+
|
|
30
|
+
from . import _gepa_patch, context
|
|
31
|
+
|
|
32
|
+
_reanchor_patched = False
|
|
33
|
+
|
|
34
|
+
# True while a tracked compile runs: ReAnchor's calibration search then runs with no
|
|
35
|
+
# CmpndCallback. A contextvar, so a compile in another thread is unaffected. The search
|
|
36
|
+
# itself runs in the compiling thread, which reads it.
|
|
37
|
+
_quiet_calibration_var: contextvars.ContextVar[bool] = contextvars.ContextVar("cmpnd_quiet_calibration", default=False)
|
|
38
|
+
|
|
39
|
+
# Marks the calibration wrapper _quiet_calibration installed on ReAnchor's module.
|
|
40
|
+
_QUIET_CALIBRATION_MARK = "_cmpnd_quiet_calibration"
|
|
41
|
+
|
|
42
|
+
# Marks a metric wrapper _judge_metric_calls installed, as `_gepa_patch` marks its own.
|
|
43
|
+
_JUDGED_METRIC_MARK = "_cmpnd_judges_metric_calls"
|
|
44
|
+
|
|
45
|
+
# Why a fitted output kept its original settings, when the fold check refused a better one.
|
|
46
|
+
_FOLD_CHECK_REFUSED = "A setting scored better on the training set and failed the fold check."
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def reanchor_class() -> Any:
|
|
50
|
+
"""``dspy.experimental.ReAnchor``, or None when this DSPy has none."""
|
|
51
|
+
try:
|
|
52
|
+
import dspy.experimental # pyright: ignore[reportMissingTypeStubs] # dspy ships no stub for it
|
|
53
|
+
except ImportError:
|
|
54
|
+
return None
|
|
55
|
+
return getattr(dspy.experimental, "ReAnchor", None)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def is_reanchor(optimizer: Any) -> bool:
|
|
59
|
+
"""Whether ``optimizer`` is a ReAnchor."""
|
|
60
|
+
cls = reanchor_class()
|
|
61
|
+
return cls is not None and isinstance(optimizer, cls)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _quiet_calibration() -> Callable[[], None]:
|
|
65
|
+
"""Run the calibration search of a tracked compile with no CmpndCallback; return the undo.
|
|
66
|
+
|
|
67
|
+
``ReAnchor.compile`` calls ``calibrate`` by the name its module imported, so the
|
|
68
|
+
wrapper replaces that name. It filters CmpndCallback out of ``dspy.settings`` for
|
|
69
|
+
the search, and DSPy hands those settings to its evaluation threads. The wrapper is
|
|
70
|
+
installed once and acts only while a tracked compile has set
|
|
71
|
+
``_quiet_calibration_var``. The undo resets that flag.
|
|
72
|
+
"""
|
|
73
|
+
from dspy.teleprompt.reanchor import ( # pyright: ignore[reportMissingTypeStubs] # dspy ships no stub for it
|
|
74
|
+
reanchor,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
calibrate = reanchor.calibrate
|
|
78
|
+
if getattr(calibrate, _QUIET_CALIBRATION_MARK, False) is not True:
|
|
79
|
+
|
|
80
|
+
@functools.wraps(calibrate)
|
|
81
|
+
def quiet_calibrate(*args, **kwargs):
|
|
82
|
+
if not _quiet_calibration_var.get():
|
|
83
|
+
return calibrate(*args, **kwargs)
|
|
84
|
+
import dspy
|
|
85
|
+
|
|
86
|
+
from . import callback
|
|
87
|
+
|
|
88
|
+
callbacks = dspy.settings.get("callbacks", []) or []
|
|
89
|
+
kept = [cb for cb in callbacks if not isinstance(cb, callback.CmpndCallback)]
|
|
90
|
+
with dspy.context(callbacks=kept):
|
|
91
|
+
return calibrate(*args, **kwargs)
|
|
92
|
+
|
|
93
|
+
setattr(quiet_calibrate, _QUIET_CALIBRATION_MARK, True)
|
|
94
|
+
reanchor.calibrate = quiet_calibrate
|
|
95
|
+
|
|
96
|
+
token = _quiet_calibration_var.set(True)
|
|
97
|
+
return lambda: _quiet_calibration_var.reset(token)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def _restore_calibration() -> None:
|
|
101
|
+
"""Put ReAnchor's own ``calibrate`` back where the wrapper replaced it."""
|
|
102
|
+
try:
|
|
103
|
+
from dspy.teleprompt.reanchor import ( # pyright: ignore[reportMissingTypeStubs] # dspy ships no stub for it
|
|
104
|
+
reanchor,
|
|
105
|
+
)
|
|
106
|
+
except ImportError:
|
|
107
|
+
return
|
|
108
|
+
calibrate = reanchor.calibrate
|
|
109
|
+
if getattr(calibrate, _QUIET_CALIBRATION_MARK, False) is True:
|
|
110
|
+
reanchor.calibrate = getattr(calibrate, "__wrapped__")
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
class _MetricCalls:
|
|
114
|
+
"""A count of metric calls, shared by ReAnchor's evaluation threads."""
|
|
115
|
+
|
|
116
|
+
def __init__(self) -> None:
|
|
117
|
+
self.calls = 0
|
|
118
|
+
self._lock = threading.Lock()
|
|
119
|
+
|
|
120
|
+
def add(self) -> None:
|
|
121
|
+
with self._lock:
|
|
122
|
+
self.calls += 1
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def _judge_metric_calls(optimizer: Any, counted: _MetricCalls) -> Callable[[], None]:
|
|
126
|
+
"""Run each of ``optimizer``'s metric calls as the metric phase and count it; return the undo.
|
|
127
|
+
|
|
128
|
+
ReAnchor reads its metric from ``metric`` on every pass, so swapping in a wrapper
|
|
129
|
+
for the compile reaches every call, including those of the calibration search.
|
|
130
|
+
"""
|
|
131
|
+
metric = getattr(optimizer, "metric", None)
|
|
132
|
+
if not callable(metric) or getattr(metric, _JUDGED_METRIC_MARK, False) is True:
|
|
133
|
+
return lambda: None
|
|
134
|
+
|
|
135
|
+
@functools.wraps(metric)
|
|
136
|
+
def judged_metric(*args, **kwargs):
|
|
137
|
+
counted.add()
|
|
138
|
+
with context.optimization_phase("metric"):
|
|
139
|
+
return metric(*args, **kwargs)
|
|
140
|
+
|
|
141
|
+
setattr(judged_metric, _JUDGED_METRIC_MARK, True)
|
|
142
|
+
optimizer.metric = judged_metric
|
|
143
|
+
|
|
144
|
+
def restore() -> None:
|
|
145
|
+
if getattr(optimizer, "metric", None) is judged_metric:
|
|
146
|
+
optimizer.metric = metric
|
|
147
|
+
|
|
148
|
+
return restore
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def _decision_settings(program: Any) -> dict[str, dict[str, Any]]:
|
|
152
|
+
"""Each decision output's entry in its predictor's ``fields``, keyed ``predictor.field``.
|
|
153
|
+
|
|
154
|
+
An output with no entry maps to ``{}``. The predictor names are those ReAnchor's
|
|
155
|
+
report uses.
|
|
156
|
+
"""
|
|
157
|
+
from dspy.teleprompt.reanchor import ( # pyright: ignore[reportMissingTypeStubs] # dspy ships no stub for it
|
|
158
|
+
calibrate,
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
settings: dict[str, dict[str, Any]] = {}
|
|
162
|
+
for name, predict in calibrate.predictors(program):
|
|
163
|
+
for field in calibrate.decision_outputs(predict):
|
|
164
|
+
settings[f"{name}.{field}"] = copy.deepcopy(predict.fields.get(field) or {})
|
|
165
|
+
return settings
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def _instructions(program: Any) -> dict[str, str]:
|
|
169
|
+
"""Each predictor's instructions, keyed by its name, as a candidate carries them."""
|
|
170
|
+
return {name: predictor.signature.instructions for name, predictor in program.named_predictors()}
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def _setting_text(setting: dict[str, Any] | None) -> str:
|
|
174
|
+
return json.dumps(setting or {}, sort_keys=True, default=str)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def _rejection_reason(row: dict[str, Any]) -> str:
|
|
178
|
+
"""Why ReAnchor kept an output's original settings."""
|
|
179
|
+
check = row.get("fold_check") or {}
|
|
180
|
+
if check.get("failed") and not check.get("passed"):
|
|
181
|
+
return _FOLD_CHECK_REFUSED
|
|
182
|
+
return str(row.get("skipped") or "The fitted settings did not beat the original.")
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def _batch_sum(mean: float | None, batch_size: int) -> float | None:
|
|
186
|
+
"""A mean score as the sum over its batch, the form GEPA reports subsample scores in.
|
|
187
|
+
|
|
188
|
+
Serve divides an iteration's subsample scores by its batch size, so the
|
|
189
|
+
training scores ReAnchor reports as means travel as sums.
|
|
190
|
+
"""
|
|
191
|
+
return None if mean is None else mean * batch_size
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
def _record_results(
|
|
195
|
+
trk: Any,
|
|
196
|
+
report: dict[str, Any],
|
|
197
|
+
before: dict[str, dict[str, Any]],
|
|
198
|
+
after: dict[str, dict[str, Any]],
|
|
199
|
+
instructions: dict[str, str],
|
|
200
|
+
trainset_size: int,
|
|
201
|
+
) -> None:
|
|
202
|
+
"""Fill ``trk``'s candidates, iterations and best score from ReAnchor's report."""
|
|
203
|
+
from .optimizers import tracker
|
|
204
|
+
|
|
205
|
+
if "val_score_before" in report:
|
|
206
|
+
seed_score, fitted_score = report["val_score_before"], report["val_score"]
|
|
207
|
+
else:
|
|
208
|
+
seed_score, fitted_score = report["train_score_before"], report["train_score"]
|
|
209
|
+
rows = list(report.get("fitted") or [])
|
|
210
|
+
best = 1 if fitted_score > seed_score else 0
|
|
211
|
+
|
|
212
|
+
trk.candidates = [
|
|
213
|
+
tracker.CandidateData(
|
|
214
|
+
candidate_idx=0,
|
|
215
|
+
instructions=dict(instructions),
|
|
216
|
+
val_aggregate_score=seed_score,
|
|
217
|
+
is_pareto_member=best == 0,
|
|
218
|
+
),
|
|
219
|
+
tracker.CandidateData(
|
|
220
|
+
candidate_idx=1,
|
|
221
|
+
instructions=dict(instructions),
|
|
222
|
+
parent_indices=[0],
|
|
223
|
+
discovery_iteration=len(rows),
|
|
224
|
+
val_aggregate_score=fitted_score,
|
|
225
|
+
is_pareto_member=best == 1,
|
|
226
|
+
),
|
|
227
|
+
]
|
|
228
|
+
trk.best_candidate_idx = best
|
|
229
|
+
trk.best_score = fitted_score if best == 1 else seed_score
|
|
230
|
+
trk.pareto_frontier = [best]
|
|
231
|
+
|
|
232
|
+
trk.iterations = []
|
|
233
|
+
for number, row in enumerate(rows, start=1):
|
|
234
|
+
key = f"{row['predictor']}.{row['field']}"
|
|
235
|
+
kept = "value" in row
|
|
236
|
+
iteration = tracker.IterationData(
|
|
237
|
+
iteration=number,
|
|
238
|
+
candidate_idx=0,
|
|
239
|
+
components_updated=[key],
|
|
240
|
+
eval_batch_size=trainset_size,
|
|
241
|
+
parent_instructions={key: _setting_text(before.get(key))},
|
|
242
|
+
proposed_instructions={key: _setting_text(after.get(key))},
|
|
243
|
+
accepted=kept,
|
|
244
|
+
rejection_reason=None if kept else _rejection_reason(row),
|
|
245
|
+
subsample_score_before=_batch_sum(row.get("train_score_original"), trainset_size),
|
|
246
|
+
subsample_score_after=_batch_sum(row.get("train_score"), trainset_size),
|
|
247
|
+
)
|
|
248
|
+
iteration.finalize()
|
|
249
|
+
# After finalize, which derives the mean from per-example scores ReAnchor
|
|
250
|
+
# does not report.
|
|
251
|
+
iteration.eval_mean_score = row.get("train_score_original") or 0.0
|
|
252
|
+
trk.iterations.append(iteration)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
def _run_tracked_compile(
|
|
256
|
+
optimizer,
|
|
257
|
+
student,
|
|
258
|
+
*,
|
|
259
|
+
trainset,
|
|
260
|
+
valset,
|
|
261
|
+
run_original,
|
|
262
|
+
client_config=None,
|
|
263
|
+
exporter_override=None,
|
|
264
|
+
):
|
|
265
|
+
"""Track one ReAnchor compile: mint a tracker, start, calibrate, finalize.
|
|
266
|
+
|
|
267
|
+
Shared by the auto_instrument class patch (global account) and a client's
|
|
268
|
+
optimize_program (the client's config and its own transport), as
|
|
269
|
+
``_gepa_patch._run_tracked_compile`` is for GEPA. ``run_original`` runs the
|
|
270
|
+
actual compile and returns the calibrated program.
|
|
271
|
+
"""
|
|
272
|
+
import dspy
|
|
273
|
+
|
|
274
|
+
from . import callback, program_naming
|
|
275
|
+
from .optimizers import tracker
|
|
276
|
+
|
|
277
|
+
trk = tracker.OptimizationTracker(optimizer_type="reanchor", program_name="")
|
|
278
|
+
if client_config is not None:
|
|
279
|
+
trk.project_tags = client_config.project_tags
|
|
280
|
+
trk.program_id = client_config.program_id
|
|
281
|
+
trk._exporter_override = exporter_override
|
|
282
|
+
|
|
283
|
+
lm = None
|
|
284
|
+
try:
|
|
285
|
+
lm = dspy.settings.lm
|
|
286
|
+
except Exception:
|
|
287
|
+
pass
|
|
288
|
+
|
|
289
|
+
# Never `log_dir`: the tracker reads that key as a GEPA checkpoint to resume.
|
|
290
|
+
config = {
|
|
291
|
+
key: value
|
|
292
|
+
for key, value in (
|
|
293
|
+
("num_threads", getattr(optimizer, "num_threads", None)),
|
|
294
|
+
("require_cache", getattr(optimizer, "require_cache", None)),
|
|
295
|
+
)
|
|
296
|
+
if value is not None
|
|
297
|
+
}
|
|
298
|
+
tracker.enrich_from_program(
|
|
299
|
+
trk,
|
|
300
|
+
student=student,
|
|
301
|
+
trainset=trainset,
|
|
302
|
+
valset=valset,
|
|
303
|
+
lm=lm,
|
|
304
|
+
config=config,
|
|
305
|
+
metric_fn=getattr(optimizer, "metric", None),
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
if client_config is None and trk.program_id is None and callback._declared_program_name() is None:
|
|
309
|
+
trk.generated_program_name = program_naming.generated_program_name(student)
|
|
310
|
+
|
|
311
|
+
before = _decision_settings(student)
|
|
312
|
+
instructions = _instructions(student)
|
|
313
|
+
counted = _MetricCalls()
|
|
314
|
+
|
|
315
|
+
restore_attribution = tracker.start_trace_attribution(trk)
|
|
316
|
+
restore_metric = None
|
|
317
|
+
restore_quiet = None
|
|
318
|
+
|
|
319
|
+
try:
|
|
320
|
+
restore_metric = _judge_metric_calls(optimizer, counted)
|
|
321
|
+
restore_quiet = _quiet_calibration()
|
|
322
|
+
result = run_original()
|
|
323
|
+
|
|
324
|
+
trk.total_metric_calls = trk.current_metric_calls = counted.calls
|
|
325
|
+
_record_results(trk, optimizer.report, before, _decision_settings(result), instructions, len(list(trainset)))
|
|
326
|
+
trk.capture_compiled_program(result)
|
|
327
|
+
trk.finalize()
|
|
328
|
+
|
|
329
|
+
# Tag the calibrated program with the run id, after finalize, as the GEPA path
|
|
330
|
+
# does, so a later optimization of it names this run as its origin.
|
|
331
|
+
if hasattr(result, "__dict__"):
|
|
332
|
+
result._optimization_run_id = str(trk.optimization_run_id)
|
|
333
|
+
|
|
334
|
+
return result
|
|
335
|
+
|
|
336
|
+
# BaseException for the reason `_gepa_patch._run_tracked_compile` gives: a run that
|
|
337
|
+
# ends by any route stops claiming progress.
|
|
338
|
+
except BaseException as e:
|
|
339
|
+
trk.total_metric_calls = trk.current_metric_calls = counted.calls
|
|
340
|
+
trk.finalize_error(e)
|
|
341
|
+
raise
|
|
342
|
+
|
|
343
|
+
finally:
|
|
344
|
+
if restore_quiet is not None:
|
|
345
|
+
restore_quiet()
|
|
346
|
+
if restore_metric is not None:
|
|
347
|
+
restore_metric()
|
|
348
|
+
restore_attribution()
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
def patch_reanchor() -> None:
|
|
352
|
+
"""Patch ``ReAnchor.compile`` to record each compile. Idempotent."""
|
|
353
|
+
global _reanchor_patched
|
|
354
|
+
if _reanchor_patched:
|
|
355
|
+
return
|
|
356
|
+
cls = reanchor_class()
|
|
357
|
+
if cls is None:
|
|
358
|
+
return
|
|
359
|
+
|
|
360
|
+
cls._cmpnd_original_compile = cls.compile
|
|
361
|
+
|
|
362
|
+
def _patched_compile(self, student, *, trainset, valset=None, **kwargs):
|
|
363
|
+
original = type(self)._cmpnd_original_compile
|
|
364
|
+
|
|
365
|
+
def _calibrate():
|
|
366
|
+
return original(self, student, trainset=trainset, valset=valset, **kwargs)
|
|
367
|
+
|
|
368
|
+
# A client already records this run on its own account.
|
|
369
|
+
if _gepa_patch._client_owns_optimization.get():
|
|
370
|
+
return _calibrate()
|
|
371
|
+
return _run_tracked_compile(self, student, trainset=trainset, valset=valset, run_original=_calibrate)
|
|
372
|
+
|
|
373
|
+
cls.compile = _patched_compile
|
|
374
|
+
_reanchor_patched = True
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
def unpatch_reanchor() -> None:
|
|
378
|
+
"""Restore ``ReAnchor.compile`` and ReAnchor's ``calibrate``. Idempotent."""
|
|
379
|
+
global _reanchor_patched
|
|
380
|
+
cls = reanchor_class()
|
|
381
|
+
if cls is not None and "_cmpnd_original_compile" in vars(cls):
|
|
382
|
+
cls.compile = cls._cmpnd_original_compile
|
|
383
|
+
del cls._cmpnd_original_compile
|
|
384
|
+
if cls is not None:
|
|
385
|
+
_restore_calibration()
|
|
386
|
+
_reanchor_patched = False
|
|
@@ -712,6 +712,12 @@ def _schema_data(client: api_client.ApiClient, partial: str) -> dict[str, Any]:
|
|
|
712
712
|
signature_name = None
|
|
713
713
|
outputs_open = False
|
|
714
714
|
known = interface_status == "known"
|
|
715
|
+
detail = None
|
|
716
|
+
if not known:
|
|
717
|
+
record = client.get(f"/api/v1/deployments/{did}")
|
|
718
|
+
report = record.get("interface") if isinstance(record, dict) else None
|
|
719
|
+
if isinstance(report, dict):
|
|
720
|
+
detail = report.get("detail")
|
|
715
721
|
# Open outputs name no fields: a run returns whatever fields the program returns.
|
|
716
722
|
names_outputs = known and not outputs_open
|
|
717
723
|
return {
|
|
@@ -730,6 +736,7 @@ def _schema_data(client: api_client.ApiClient, partial: str) -> dict[str, Any]:
|
|
|
730
736
|
"entrypoint": metadata.artifact.entrypoint if metadata is not None else None,
|
|
731
737
|
"source_format": metadata.artifact.source_format if metadata is not None else None,
|
|
732
738
|
"interface_status": interface_status,
|
|
739
|
+
"detail": detail,
|
|
733
740
|
"signature_name": signature_name,
|
|
734
741
|
"input_fields": [field.name for field in inputs] if known else None,
|
|
735
742
|
"optional_input_fields": [field.name for field in inputs if not field.is_required] if known else None,
|
|
@@ -745,11 +752,17 @@ def _sample_data(client: api_client.ApiClient, partial: str) -> dict[str, Any]:
|
|
|
745
752
|
"""One recorded example input for the program, from its most recent
|
|
746
753
|
example. ``input`` is None when the program has no recorded invocations."""
|
|
747
754
|
did, d, program_id = _deployment_program(client, partial)
|
|
748
|
-
resp = client.get(
|
|
755
|
+
resp = client.get(
|
|
756
|
+
f"/api/v1/signatures/{program_id}/examples", params={"per_page": "1", "page": "1", "status": "ok"}
|
|
757
|
+
)
|
|
749
758
|
examples = resp.get("examples") or []
|
|
750
759
|
input_obj: Any = None
|
|
751
760
|
source_trace: str | None = None
|
|
752
761
|
if examples:
|
|
762
|
+
if examples[0].get("status") != "ok":
|
|
763
|
+
raise api_client.CliError(
|
|
764
|
+
"this server did not honor status=ok for sample inputs. Upgrade the server to sample successful traces."
|
|
765
|
+
)
|
|
753
766
|
raw = examples[0].get("inputs")
|
|
754
767
|
source_trace = examples[0].get("trace_id")
|
|
755
768
|
try:
|
|
@@ -772,10 +785,19 @@ def cmd_schema(client: api_client.ApiClient, args: Any) -> None:
|
|
|
772
785
|
return
|
|
773
786
|
if data["status"] == "unavailable":
|
|
774
787
|
reason = str(data.get("reason") or "unknown reason").replace("_", " ")
|
|
775
|
-
|
|
788
|
+
detail = data.get("detail") or "Deploy the program again to record its public interface."
|
|
789
|
+
raise api_client.CliError(
|
|
790
|
+
f"deployment {_short_id(data['deployment_id'])} metadata is unavailable: {reason}. {detail}"
|
|
791
|
+
)
|
|
776
792
|
if data["interface_status"] != "known":
|
|
777
793
|
reason = str(data.get("reason") or "unknown reason").replace("_", " ")
|
|
778
|
-
|
|
794
|
+
detail = (
|
|
795
|
+
data.get("detail")
|
|
796
|
+
or "Deploy the program again with named forward() parameters to record its public interface."
|
|
797
|
+
)
|
|
798
|
+
raise api_client.CliError(
|
|
799
|
+
f"deployment {_short_id(data['deployment_id'])} interface is unknown: {reason}. {detail}"
|
|
800
|
+
)
|
|
779
801
|
name = data.get("program_name") or _short_id(data["deployment_id"])
|
|
780
802
|
sig_name = data.get("signature_name")
|
|
781
803
|
header = _c(str(name), "bold")
|
|
@@ -22,8 +22,9 @@ release. ``close()`` is an optional alias for end-of-scope flushing.
|
|
|
22
22
|
from __future__ import annotations
|
|
23
23
|
|
|
24
24
|
import dataclasses
|
|
25
|
-
from collections.abc import Mapping
|
|
26
|
-
from
|
|
25
|
+
from collections.abc import Callable, Mapping
|
|
26
|
+
from functools import wraps
|
|
27
|
+
from typing import Any, Literal, ParamSpec, TypeVar
|
|
27
28
|
|
|
28
29
|
from . import (
|
|
29
30
|
_account,
|
|
@@ -41,6 +42,22 @@ from . import (
|
|
|
41
42
|
)
|
|
42
43
|
from .deployment_metadata import DeploymentSignatureResponse
|
|
43
44
|
|
|
45
|
+
_P = ParamSpec("_P")
|
|
46
|
+
_R = TypeVar("_R")
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _label_filter_hint(function: Callable[_P, _R]) -> Callable[_P, _R]:
|
|
50
|
+
@wraps(function)
|
|
51
|
+
def checked(*args: _P.args, **kwargs: _P.kwargs) -> _R:
|
|
52
|
+
if "metadata" in kwargs:
|
|
53
|
+
raise TypeError(
|
|
54
|
+
"Client.list_traces() got an unexpected keyword argument 'metadata'. "
|
|
55
|
+
"Did you mean 'labels'? Use labels= to filter label keys."
|
|
56
|
+
)
|
|
57
|
+
return function(*args, **kwargs)
|
|
58
|
+
|
|
59
|
+
return checked
|
|
60
|
+
|
|
44
61
|
|
|
45
62
|
def _refuse_program_name_selector(inputs: dict[str, Any], method: str) -> None:
|
|
46
63
|
"""Refuse a ``program_name`` among a run's inputs, which the client spells ``entrypoint=``.
|
|
@@ -77,6 +94,14 @@ class Client:
|
|
|
77
94
|
env_max_queue_bytes = configuration.max_queue_bytes_from_environment()
|
|
78
95
|
if env_max_queue_bytes is not None:
|
|
79
96
|
config_kwargs["max_queue_bytes"] = env_max_queue_bytes
|
|
97
|
+
if "default_tags" in config_kwargs:
|
|
98
|
+
from . import labels as trace_labels
|
|
99
|
+
|
|
100
|
+
tags = trace_labels.validate(config_kwargs["default_tags"], argument="default_tags")
|
|
101
|
+
if any(not isinstance(value, str) for value in tags.values()):
|
|
102
|
+
raise ValueError("default_tags values must be strings. Use labels= for lists of strings.")
|
|
103
|
+
trace_labels.validate({**tags, **config_kwargs.get("labels", {})}, argument="default_tags and labels")
|
|
104
|
+
config_kwargs["default_tags"] = dict(tags)
|
|
80
105
|
self._config = configuration.Config(
|
|
81
106
|
api_key=resolved_key,
|
|
82
107
|
endpoint=resolved_endpoint,
|
|
@@ -203,7 +228,8 @@ class Client:
|
|
|
203
228
|
optimizer runs traces on this client's account, including the eval-pool
|
|
204
229
|
threads DSPy spawns.
|
|
205
230
|
|
|
206
|
-
For a real ``dspy.GEPA`` it also owns the
|
|
231
|
+
For a real ``dspy.GEPA`` or ``dspy.experimental.ReAnchor`` it also owns the
|
|
232
|
+
optimization-run record: it
|
|
207
233
|
mints the tracker with the client's tags and publishes it through the
|
|
208
234
|
client's own transport, and — when ``auto_instrument`` is also active —
|
|
209
235
|
suppresses the global class patch so the run is recorded once, on the
|
|
@@ -222,7 +248,7 @@ class Client:
|
|
|
222
248
|
|
|
223
249
|
import dspy
|
|
224
250
|
|
|
225
|
-
from . import named_programs
|
|
251
|
+
from . import _reanchor_patch, named_programs
|
|
226
252
|
|
|
227
253
|
whole = named_programs.runs_itself(named)
|
|
228
254
|
module = program if whole else named.module
|
|
@@ -238,6 +264,16 @@ class Client:
|
|
|
238
264
|
kwargs=kwargs,
|
|
239
265
|
declared_name=named.name,
|
|
240
266
|
)
|
|
267
|
+
elif _reanchor_patch.is_reanchor(optimizer):
|
|
268
|
+
result = self._run_owned_optimization(
|
|
269
|
+
_reanchor_patch._run_tracked_compile,
|
|
270
|
+
optimizer,
|
|
271
|
+
module,
|
|
272
|
+
trainset=trainset,
|
|
273
|
+
valset=valset,
|
|
274
|
+
kwargs=kwargs,
|
|
275
|
+
declared_name=named.name,
|
|
276
|
+
)
|
|
241
277
|
else:
|
|
242
278
|
result = optimizer.compile(module, trainset=trainset, valset=valset, **kwargs)
|
|
243
279
|
finally:
|
|
@@ -386,8 +422,10 @@ class Client:
|
|
|
386
422
|
are also ``httpx.HTTPStatusError``.
|
|
387
423
|
httpx.HTTPStatusError: If serve refuses the submission or a status or
|
|
388
424
|
result read, carrying that response. A deployment of another
|
|
389
|
-
account answers ``404``.
|
|
390
|
-
|
|
425
|
+
account answers ``404``.
|
|
426
|
+
RunFailed: If the accepted run failed, with its ``run_id``, ``trace_id``
|
|
427
|
+
and serve's retained ``error`` and ``result``.
|
|
428
|
+
RunCancelled: If the accepted run was cancelled. It is a ``RunFailed``.
|
|
391
429
|
RetryableProviderError: If the stored failure is a retryable provider
|
|
392
430
|
failure. No run is started again automatically.
|
|
393
431
|
RunSubmissionUncertain: If the POST reply was lost or was a server
|
|
@@ -1096,6 +1134,7 @@ class Client:
|
|
|
1096
1134
|
|
|
1097
1135
|
_provider_writes.remove(self._http_client(), name)
|
|
1098
1136
|
|
|
1137
|
+
@_label_filter_hint
|
|
1099
1138
|
def list_traces(
|
|
1100
1139
|
self,
|
|
1101
1140
|
*,
|
|
@@ -1129,6 +1168,10 @@ class Client:
|
|
|
1129
1168
|
this call can be missing from it; it appears once serve has folded it,
|
|
1130
1169
|
typically within a few seconds.
|
|
1131
1170
|
"""
|
|
1171
|
+
if isinstance(tags, Mapping):
|
|
1172
|
+
raise TypeError(
|
|
1173
|
+
"Client.list_traces() takes labels= to filter label keys. tags= takes a list of project names."
|
|
1174
|
+
)
|
|
1132
1175
|
self._check_active()
|
|
1133
1176
|
_exporter_pool.flush(self._config)
|
|
1134
1177
|
page = _traces.list(
|
|
@@ -1342,11 +1385,37 @@ class Client:
|
|
|
1342
1385
|
kwargs: dict[str, Any],
|
|
1343
1386
|
declared_name: str | None = None,
|
|
1344
1387
|
) -> Any:
|
|
1345
|
-
"""Track a GEPA compile on this client's account and suppress the global patch.
|
|
1388
|
+
"""Track a GEPA compile on this client's account and suppress the global patch."""
|
|
1389
|
+
from . import _gepa_patch
|
|
1390
|
+
|
|
1391
|
+
return self._run_owned_optimization(
|
|
1392
|
+
_gepa_patch._run_tracked_compile,
|
|
1393
|
+
optimizer,
|
|
1394
|
+
student,
|
|
1395
|
+
trainset=trainset,
|
|
1396
|
+
valset=valset,
|
|
1397
|
+
kwargs=kwargs,
|
|
1398
|
+
declared_name=declared_name,
|
|
1399
|
+
)
|
|
1400
|
+
|
|
1401
|
+
def _run_owned_optimization(
|
|
1402
|
+
self,
|
|
1403
|
+
run_tracked_compile: Any,
|
|
1404
|
+
optimizer: Any,
|
|
1405
|
+
student: Any,
|
|
1406
|
+
*,
|
|
1407
|
+
trainset: Any,
|
|
1408
|
+
valset: Any,
|
|
1409
|
+
kwargs: dict[str, Any],
|
|
1410
|
+
declared_name: str | None = None,
|
|
1411
|
+
) -> Any:
|
|
1412
|
+
"""Track one compile on this client's account and suppress the global patches.
|
|
1346
1413
|
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1414
|
+
``run_tracked_compile`` is the optimizer's tracked body, such as
|
|
1415
|
+
``_gepa_patch._run_tracked_compile``. A declared name is resolved here, on the
|
|
1416
|
+
caller's thread, because the run record is sent synchronously when the run
|
|
1417
|
+
starts and must carry its program id then. The record goes without an id when
|
|
1418
|
+
the name does not resolve.
|
|
1350
1419
|
"""
|
|
1351
1420
|
from . import _exporter_pool, _gepa_patch
|
|
1352
1421
|
|
|
@@ -1362,7 +1431,7 @@ class Client:
|
|
|
1362
1431
|
|
|
1363
1432
|
token = _gepa_patch._client_owns_optimization.set(True)
|
|
1364
1433
|
try:
|
|
1365
|
-
return
|
|
1434
|
+
return run_tracked_compile(
|
|
1366
1435
|
optimizer,
|
|
1367
1436
|
student,
|
|
1368
1437
|
trainset=trainset,
|