cmpnd 0.87.0__tar.gz → 0.89.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.87.0 → cmpnd-0.89.0}/AGENTS.md +8 -5
- {cmpnd-0.87.0 → cmpnd-0.89.0}/PKG-INFO +2 -2
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/__init__.py +7 -2
- cmpnd-0.89.0/cmpnd/_guides.py +3 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/_http.py +92 -3
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/_program_patch.py +28 -4
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/_runtime_tools.py +18 -1
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/callback.py +93 -35
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/__init__.py +29 -1
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/deployments.py +27 -5
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/evals.py +2 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/optimizations.py +3 -3
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/programs.py +187 -10
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/top.py +66 -6
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/traces.py +2 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/verbs.py +5 -1
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/client.py +19 -5
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/deployment_runs.py +78 -7
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/execution.py +2 -2
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/ir/reflection.py +3 -3
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/optimization.py +24 -20
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/packaging.py +2 -2
- cmpnd-0.89.0/cmpnd/versions.py +213 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/docs/cli.md +40 -3
- {cmpnd-0.87.0 → cmpnd-0.89.0}/docs/client.md +15 -2
- {cmpnd-0.87.0 → cmpnd-0.89.0}/docs/sdk-instrumentation.md +4 -4
- cmpnd-0.89.0/docs/versions.md +137 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/pyproject.toml +10 -4
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/_traced_run.py +30 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/fake_lm.py +64 -18
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_optimize_continuation.py +57 -14
- cmpnd-0.89.0/tests/e2e/test_program_versions.py +75 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/load/rlm_size_report.py +20 -8
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/test_programs.py +7 -25
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_adapter_reentrancy.py +10 -5
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_programs.py +131 -10
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_client_program_names.py +2 -1
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_eval_trace_grouping.py +4 -1
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_execute_run_identity.py +4 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_fake_lm.py +28 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_interpreter_callback.py +54 -8
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_no_signature_hash_on_the_wire.py +2 -1
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_optimization_program_names.py +3 -1
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_packaging_mcp_tools.py +9 -3
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_program_lineage_persist.py +36 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_reflector_smoke.py +2 -1
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_run_attribution_paths.py +21 -2
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_runtime_tools.py +22 -1
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_signature_inputs.py +2 -1
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_span_references.py +102 -15
- cmpnd-0.89.0/tests/test_versions.py +376 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/uv.lock +123 -77
- {cmpnd-0.87.0 → cmpnd-0.89.0}/.gitignore +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/CLAUDE.md +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/README.md +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/_assessments.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/_authored_import.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/_deployments.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/_exporter_pool.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/_gepa_patch.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/_rlm_patch.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/_timespec.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/_traces.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/_valsets.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/authored.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/api_client.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/__init__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/admin.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/assessments.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/auth.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/datasets.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/login.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/org.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/provider_credentials.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/tool_servers.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/commands/valsets.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/credentials.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/deprecation.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/pagination.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/shell.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/trace_render.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/tree_help.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/cli/views.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/configuration.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/context.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/credentials.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/dataset_sync.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/datasets.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/decorators.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/deployment.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/deployment_metadata.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/eval_handler.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/exporter.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/exporter_http.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/helpers.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/identity.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/imaging.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/ir/__init__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/ir/decode.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/ir/encode.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/ir/hash.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/ir/program.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/ir/types.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/ir/xxh64.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/lm_configuration.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/mcp_servers.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/models.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/named_programs.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/optimizers/__init__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/optimizers/gepa.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/optimizers/gepa_callback.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/optimizers/resume.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/optimizers/tracker.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/program_naming.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/programs.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/references.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/retry.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/cmpnd/traces.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/docs/2026-04-02-code-review.md +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/docs/custom-proposer.md +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/docs/plans/2026-04-05-train-val-dataset-capture-design.md +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/docs/plans/2026-04-05-train-val-dataset-capture.md +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/docs/reading-traces.md +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/examples/generalizing_proposer.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/examples/local_ollama.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/LINEAGE.md +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/README.md +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/cmpnd_ingest/__init__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/cmpnd_ingest/bodies.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/cmpnd_ingest/client_floor.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/cmpnd_ingest/exporter_http.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/cmpnd_ingest/program_names.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/cmpnd_ingest/protocols.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/cmpnd_ingest/py.typed +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/cmpnd_ingest/request_log.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/cmpnd_ingest/retry.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/cmpnd_ingest/span_context.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/cmpnd_ingest/trace_facts.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/cmpnd_ingest/user_agent.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/ingest/pyproject.toml +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/audit-sdist.sh +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/capture_review_run.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/check-pip-install.sh +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/check_release_artifacts.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/fixtures/review_run.json.gz +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/gepa_resume_bug.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/install-test-env.sh +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/release-gate.sh +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/release-real-models.sh +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/require_version_bump.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/seed_review_run.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/selfhost_compat.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/scripts/test-in-linux.sh +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/stubs/dspy/__init__.pyi +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/stubs/dspy/primitives/__init__.pyi +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/stubs/dspy/primitives/prediction.pyi +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/stubs/dspy/utils/__init__.pyi +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/stubs/dspy/utils/callback.pyi +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/stubs/dspy/utils/dummies.pyi +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/__init__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/_credential_route.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/_deployment_signature_helpers.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/_exporter_helpers.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/_fake_clock.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/_identity_helpers.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/_resolve_refs.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/conftest.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/__init__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/committee_task.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/conftest.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/continuation_task.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/data/committee_train.ndjson.gz +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/data/committee_val.ndjson.gz +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/helpers.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/target_capabilities.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_assessments_cli.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_capture_prompts.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_composite_module.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_dataset_auto_creation.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_deploy_execute.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_deploy_pandas.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_deploy_programs.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_edge_cases.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_example_hash.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_gepa_optimization.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_interpreter_spans.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_lm_accuracy.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_module_tracing.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_optimization_lineage.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_optimization_metric_identity.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_optimize_authored_metric.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_optimize_custom_proposer.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_optimize_failures.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_optimize_loop.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_optimize_review_committee.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_optimize_server_owned_completion.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_parallel_export.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_project_attribution.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_react_tool_spans.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_save_load.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_trace_structure.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_traces_read.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_user_attribution.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/e2e/test_valsets_cli.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/01_predict_qa.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/02_predict_renamed_field.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/03_chain_of_thought_qa.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/04_predict_richer_types.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/05_composite_two_predicts.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/06_multichaincomparison.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/07_program_of_thought.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/08_opaque_module.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/09_predict_pydantic_field.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/10_react.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/11_refine.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/12_retrieve.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/13_knn.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/14_parallel.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/identity_vectors/README.md +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/ingest_conformance.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/integration/__init__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/integration/authored_optimize/judge.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/integration/authored_optimize/optimize_hosted.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/integration/conftest.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/integration/hosted_mcp_tool_optimize_probe.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/integration/hosted_optimize_probe.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/integration/optimization_run_probe.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/integration/test_cli_deploy_smoketest.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/integration/test_logs_renders_traces.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/integration/test_optimization_run.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/integration/test_optimizing_progress.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/integration/test_unhappy_path.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/lm15_prompt_fixture.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/lm15_prompts/four_turn_predict.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/lm15_prompts/rlm_six_turns.json +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/load/__init__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/load/__main__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/load/drain.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/load/ingest.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/load/latency_transport.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/load/rlm_shape.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/load/sweep.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/load/test_rlm_shape.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/load/test_rlm_size_report.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/__init__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/conftest.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/seed_parity.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/test_auth.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/test_datasets.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/test_deployments.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/test_evals.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/test_health.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/test_modules.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/test_optimizations.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/test_signatures.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/test_trace_streaming.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/parity/test_traces.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/__init__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/_provider.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/_readiness.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/_reliability.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/_result.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/mint_bedrock_token.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_bedrock_converse.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_deploy_programs.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_multi_client_stress.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_optimize_client_committee.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_optimize_continuation.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_optimize_loop.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_optimize_loop_wasm.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_optimize_stress.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_provider_roles.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_readiness.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_real_provider_twins.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_reliability.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_reliability_classify.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_rlm_wasm.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/real_models/test_trace_search.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/span_reference_fixture.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_assessments_api.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_authored.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_authored_binding_credentials.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_authored_bundle_collisions.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_authored_metric_contract.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_authored_named_models.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_authored_optimize.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_callback.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_candidate_lineage.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/__init__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/conftest.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_admin.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_api_client.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_assessments.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_auth.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_credentials.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_datasets.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_deployment_runs.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_deployments.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_evals.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_login.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_main.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_optimizations.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_org.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_pagination.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_parity.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_provider_credentials.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_schema_sample.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_shell.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_tool_servers.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_top.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_traces.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_traces_program_and_module.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_traces_search_wire.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_tree_help.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cli/test_valsets.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_client.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_client_floor.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_clustering/__init__.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_clustering/conftest.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_clustering/test_edge_cases.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_clustering/test_hash_consistency.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_clustering/test_type_conversion.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_cmp551_grouping_identity.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_configuration.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_context.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_context_propagation.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_credential_kwargs.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_credential_selection.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_credential_values.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_dataset_polling.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_dataset_sync.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_datasets.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_decision_client_spans.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_decorators.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_deploy.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_deploy_mcp_tool_references.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_deploy_program_id.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_deployment_metadata.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_deployment_runs.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_deployments_read.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_eval.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_eval_example_attribution.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_eval_program_id.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_eval_start.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_exception_paths.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_execute.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_exporter.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_exporter_program_names.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_exporter_queue.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_exporter_real.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_gepa_callback.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_gepa_integration.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_gepa_output_normalization.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_gepa_resume.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_identity.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_imaging.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_import_weight.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_ingest_conformance.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_ingest_second_producer.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_integration.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_ir_encoder_properties.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_ir_golden_vectors.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_ir_roundtrip.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_lm15_native_calls.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_lm15_prompt_fixtures.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_lm15_prompt_references.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_lm_configuration.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_lm_usage_shapes.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_mcp_tools.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_models.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_multi_client_stress_readiness.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_optimization_phase_callback.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_optimization_progress.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_optimization_start.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_optimize.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_optimize_budget.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_optimize_lift.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_optimize_lms.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_optimize_proposer.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_optimize_reflection_lm.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_optimize_terminal_failure.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_packaging.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_packaging_callable_source.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_packaging_program_source.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_poll_until.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_program_id_deprecation.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_program_identity.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_program_names_in_deploy.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_program_naming.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_programs_create.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_project_payload.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_real_provider_twins_readiness.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_reflector_properties.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_release_gate_script.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_release_real_models_script.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_replaced_names.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_repro_reactv2_bugs.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_require_version_bump.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_retry.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_reversible_failures.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_rlm_patch.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_schemas.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_seal_lm_credential.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_seed_review_run.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_span_sent_once.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_span_submission.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_span_submission_wire_contract.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_system_one.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_token_attribution.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_trace_context_concurrency.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_trace_fact_wire_contract.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_trace_facts.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_trace_render.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_traces_read.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_tracked_gepa.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_tracker_enrich.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_truncation.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_upload_auth_headers.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_user_agent.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_valsets_api.py +0 -0
- {cmpnd-0.87.0 → cmpnd-0.89.0}/tests/test_xxh64.py +0 -0
|
@@ -125,15 +125,18 @@ fake, and it runs only locally.
|
|
|
125
125
|
|
|
126
126
|
## DSPy versions under test
|
|
127
127
|
|
|
128
|
-
The SDK supports DSPy 3.3.x
|
|
129
|
-
3.3.0
|
|
128
|
+
The SDK supports DSPy 3.3.x, 3.4.x and 3.5.x. `dependencies` floors DSPy at
|
|
129
|
+
3.3.0 and caps it below 4, a major release no SDK release has been tested
|
|
130
|
+
against. `pyproject.toml` declares one dependency group per DSPy version the
|
|
130
131
|
`sdk-test` matrix tests, such as `dspy-3-4-1 = ["dspy==3.4.1"]`.
|
|
131
132
|
`[tool.uv] conflicts` makes the groups mutually exclusive, so `uv.lock` holds a
|
|
132
133
|
whole tree for each DSPy. Dependency groups never reach the wheel, so users
|
|
133
|
-
still install against the `dspy
|
|
134
|
+
still install against the `dspy>=…,<4` range in `dependencies`.
|
|
134
135
|
|
|
135
|
-
- A plain `uv sync` or `uv run` installs the default group, the
|
|
136
|
-
|
|
136
|
+
- A plain `uv sync` or `uv run` installs the default group, the DSPy the
|
|
137
|
+
worker's kernel runs (`DSPY_BASE_VERSION` in
|
|
138
|
+
`worker-wasm/guest/pins/guest.env`), so a local run matches a hosted one.
|
|
139
|
+
Newer tested DSPy versions have groups and legs of their own.
|
|
137
140
|
- `scripts/install-test-env.sh <python> <dspy>` builds `.venv` from one group's
|
|
138
141
|
locked tree, as each `sdk-test` leg in `ci-sdk.yml` does. From the repo root,
|
|
139
142
|
run `just sdk-test-env 3.13 3.3.0`, then, from `python-sdk/`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cmpnd
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.89.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>
|
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.15
|
|
18
18
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
19
|
Requires-Python: >=3.11
|
|
20
|
-
Requires-Dist: dspy
|
|
20
|
+
Requires-Dist: dspy<4,>=3.3.0
|
|
21
21
|
Requires-Dist: httpx>=0.27.0
|
|
22
22
|
Requires-Dist: pydantic>=2.0
|
|
23
23
|
Requires-Dist: typing-extensions>=4.1.0
|
|
@@ -18,7 +18,7 @@ from typing import TYPE_CHECKING
|
|
|
18
18
|
from cmpnd_ingest.client_floor import UpgradeRequiredWarning
|
|
19
19
|
|
|
20
20
|
from . import authored, credentials, programs, traces
|
|
21
|
-
from ._http import ApiError
|
|
21
|
+
from ._http import ApiError, Remedy, RemedyStep
|
|
22
22
|
from .callback import CmpndCallback, trace_id
|
|
23
23
|
from .client import Client
|
|
24
24
|
from .configuration import configure, get_config, require_config
|
|
@@ -37,7 +37,7 @@ from .deployment_metadata import (
|
|
|
37
37
|
DeploymentSignatureResponse,
|
|
38
38
|
UnsupportedDeploymentMetadataVersion,
|
|
39
39
|
)
|
|
40
|
-
from .deployment_runs import RunNotSubmitted, RunResultExpired, RunSubmissionUncertain, RunWaitTimeout
|
|
40
|
+
from .deployment_runs import RunNotSubmitted, RunRefused, RunResultExpired, RunSubmissionUncertain, RunWaitTimeout
|
|
41
41
|
from .execution import DeployedProgram, RetryableProviderError
|
|
42
42
|
from .exporter import flush_exporter, shutdown_exporter
|
|
43
43
|
from .lm_configuration import HostedLM, SystemOne, configure_lm
|
|
@@ -50,6 +50,7 @@ from .mcp_servers import (
|
|
|
50
50
|
mcp_tools,
|
|
51
51
|
)
|
|
52
52
|
from .models import SpanBuilder, SpanType, TraceBuilder, TraceStatus
|
|
53
|
+
from .versions import ProgramAddress
|
|
53
54
|
|
|
54
55
|
if TYPE_CHECKING:
|
|
55
56
|
# Loaded on first use by __getattr__ below, because their module imports dspy.
|
|
@@ -106,6 +107,8 @@ __all__ = [
|
|
|
106
107
|
"program",
|
|
107
108
|
"authored",
|
|
108
109
|
"ApiError",
|
|
110
|
+
"Remedy",
|
|
111
|
+
"RemedyStep",
|
|
109
112
|
# Raised once when the server no longer supports this release
|
|
110
113
|
"UpgradeRequiredWarning",
|
|
111
114
|
# Types
|
|
@@ -121,10 +124,12 @@ __all__ = [
|
|
|
121
124
|
"UnsupportedDeploymentMetadataVersion",
|
|
122
125
|
"RunSubmissionUncertain",
|
|
123
126
|
"RunNotSubmitted",
|
|
127
|
+
"RunRefused",
|
|
124
128
|
"RunWaitTimeout",
|
|
125
129
|
"RunResultExpired",
|
|
126
130
|
"DeployedProgram",
|
|
127
131
|
"RetryableProviderError",
|
|
132
|
+
"ProgramAddress",
|
|
128
133
|
# Optimize
|
|
129
134
|
"OptimizeError",
|
|
130
135
|
"OptimizeFailed",
|
|
@@ -12,6 +12,7 @@ from __future__ import annotations
|
|
|
12
12
|
|
|
13
13
|
import os
|
|
14
14
|
import re
|
|
15
|
+
from dataclasses import dataclass
|
|
15
16
|
from typing import Any
|
|
16
17
|
from urllib.parse import urlsplit
|
|
17
18
|
|
|
@@ -19,12 +20,73 @@ import httpx
|
|
|
19
20
|
from cmpnd_ingest import client_floor, user_agent
|
|
20
21
|
|
|
21
22
|
|
|
23
|
+
@dataclass(frozen=True)
|
|
24
|
+
class RemedyStep:
|
|
25
|
+
"""One step that clears a refusal: a ``command`` to run, or a ``snippet`` of code to add.
|
|
26
|
+
|
|
27
|
+
``kind`` is ``"command"`` or ``"code"``. A ``<name>`` in either is a value the user
|
|
28
|
+
chooses.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
kind: str
|
|
32
|
+
command: str | None = None
|
|
33
|
+
language: str | None = None
|
|
34
|
+
snippet: str | None = None
|
|
35
|
+
|
|
36
|
+
def __str__(self) -> str:
|
|
37
|
+
return self.command or self.snippet or ""
|
|
38
|
+
|
|
39
|
+
def as_json(self) -> dict[str, str]:
|
|
40
|
+
out = {"kind": self.kind}
|
|
41
|
+
for key in ("command", "language", "snippet"):
|
|
42
|
+
if (value := getattr(self, key)) is not None:
|
|
43
|
+
out[key] = value
|
|
44
|
+
return out
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@dataclass(frozen=True)
|
|
48
|
+
class Remedy:
|
|
49
|
+
"""The steps that clear a versioning refusal, and the guide's section for its code."""
|
|
50
|
+
|
|
51
|
+
steps: tuple[RemedyStep, ...]
|
|
52
|
+
docs_url: str | None = None
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_body(cls, body: object) -> Remedy | None:
|
|
56
|
+
"""The ``remedy`` of a refusal's JSON body, or None when it has none."""
|
|
57
|
+
raw = body.get("remedy") if isinstance(body, dict) else None
|
|
58
|
+
if not isinstance(raw, dict):
|
|
59
|
+
return None
|
|
60
|
+
steps: list[RemedyStep] = []
|
|
61
|
+
for step in raw.get("steps") or []:
|
|
62
|
+
if not isinstance(step, dict) or not isinstance(step.get("kind"), str):
|
|
63
|
+
continue
|
|
64
|
+
fields = {k: step[k] for k in ("command", "language", "snippet") if isinstance(step.get(k), str)}
|
|
65
|
+
steps.append(RemedyStep(kind=step["kind"], **fields))
|
|
66
|
+
url = raw.get("docs_url")
|
|
67
|
+
return cls(steps=tuple(steps), docs_url=url if isinstance(url, str) else None)
|
|
68
|
+
|
|
69
|
+
def as_json(self) -> dict[str, Any]:
|
|
70
|
+
"""The remedy in the shape serve sends it."""
|
|
71
|
+
return {"steps": [s.as_json() for s in self.steps], "docs_url": self.docs_url}
|
|
72
|
+
|
|
73
|
+
def describe(self) -> str:
|
|
74
|
+
"""The steps as lines to copy, then the guide's URL."""
|
|
75
|
+
lines = [f" {s}" for s in self.steps if str(s)]
|
|
76
|
+
if self.docs_url:
|
|
77
|
+
lines.append(f"See {self.docs_url}")
|
|
78
|
+
return "\n".join(lines)
|
|
79
|
+
|
|
80
|
+
|
|
22
81
|
class ApiError(Exception):
|
|
23
82
|
"""An error from a cmpnd backend request.
|
|
24
83
|
|
|
25
84
|
``status_code`` is the HTTP status when the server answered one, or ``None``
|
|
26
|
-
for a transport-level failure (could not connect, timed out). ``
|
|
27
|
-
is the
|
|
85
|
+
for a transport-level failure (could not connect, timed out). ``error_code``
|
|
86
|
+
is the code serve sent with a refusal, such as ``unknown_tag``, for a caller to
|
|
87
|
+
branch on, ``remedy`` holds the steps that clear a versioning refusal, and
|
|
88
|
+
``detail`` is the refusal's JSON body. ``exit_code`` is the
|
|
89
|
+
process exit the CLI maps the error to; the library client ignores it.
|
|
28
90
|
"""
|
|
29
91
|
|
|
30
92
|
def __init__(
|
|
@@ -34,10 +96,19 @@ class ApiError(Exception):
|
|
|
34
96
|
*,
|
|
35
97
|
status_code: int | None = None,
|
|
36
98
|
deployment_run_id: str | None = None,
|
|
99
|
+
error_code: str | None = None,
|
|
100
|
+
detail: dict[str, Any] | None = None,
|
|
101
|
+
remedy: Remedy | None = None,
|
|
37
102
|
):
|
|
38
103
|
super().__init__(message)
|
|
39
104
|
self.exit_code = exit_code
|
|
40
105
|
self.status_code = status_code
|
|
106
|
+
self.error_code = error_code
|
|
107
|
+
self.detail = detail or {}
|
|
108
|
+
self.remedy = remedy if remedy is not None else Remedy.from_body(self.detail)
|
|
109
|
+
# Set once a CLI command printed this error as its JSON answer, so the
|
|
110
|
+
# top-level handler prints no second document.
|
|
111
|
+
self._cmpnd_json_reported = False
|
|
41
112
|
self._cmpnd_deployment_run_id = deployment_run_id
|
|
42
113
|
|
|
43
114
|
|
|
@@ -57,6 +128,15 @@ def _body_deployment_run_id(body: object) -> str | None:
|
|
|
57
128
|
return None
|
|
58
129
|
|
|
59
130
|
|
|
131
|
+
def _json_object(response: httpx.Response) -> dict[str, Any]:
|
|
132
|
+
"""A response's JSON body when it is an object, else an empty dict."""
|
|
133
|
+
try:
|
|
134
|
+
body = response.json()
|
|
135
|
+
except ValueError:
|
|
136
|
+
return {}
|
|
137
|
+
return body if isinstance(body, dict) else {}
|
|
138
|
+
|
|
139
|
+
|
|
60
140
|
def server_detail(response: httpx.Response) -> str:
|
|
61
141
|
"""The server's own message for a failed request, for the error text.
|
|
62
142
|
|
|
@@ -228,7 +308,16 @@ class ApiClient:
|
|
|
228
308
|
def error(message: str, exit_code: int = 1) -> ApiError:
|
|
229
309
|
if run_id:
|
|
230
310
|
message += f"\nDeployment run: {run_id}"
|
|
231
|
-
|
|
311
|
+
detail = _json_object(response)
|
|
312
|
+
code = detail.get("error_code")
|
|
313
|
+
return ApiError(
|
|
314
|
+
message,
|
|
315
|
+
exit_code,
|
|
316
|
+
status_code=response.status_code,
|
|
317
|
+
deployment_run_id=run_id,
|
|
318
|
+
error_code=code if isinstance(code, str) else None,
|
|
319
|
+
detail=detail,
|
|
320
|
+
)
|
|
232
321
|
|
|
233
322
|
if response.status_code == 401:
|
|
234
323
|
raise error("Invalid or missing API key. Check CMPND_API_KEY or --api-key.")
|
|
@@ -23,6 +23,12 @@ composite ``Module`` path and the bare ``Predict`` path — to round-trip the ta
|
|
|
23
23
|
under a namespaced carrier key. Installed lazily from
|
|
24
24
|
``cmpnd.auto_instrument()`` alongside ``patch_gepa()``.
|
|
25
25
|
|
|
26
|
+
The carrier also names the version a program is: the ``d_`` id of the
|
|
27
|
+
deployment an optimization's result became. Serve writes it into the compiled
|
|
28
|
+
program it hands out (``GET /api/v1/optimizations/{id}/compiled-program``), so a
|
|
29
|
+
program loaded from that state carries ``_cmpnd_deployment_id`` and its traces
|
|
30
|
+
name the version they ran.
|
|
31
|
+
|
|
26
32
|
The carrier is a single reserved top-level key (the same shape DSPy itself uses
|
|
27
33
|
for its sibling ``metadata`` key). Stock ``Module.load_state`` ignores it (it
|
|
28
34
|
reads only parameter names); ``Predict.load_state`` ``setattr``s every key, so
|
|
@@ -38,6 +44,7 @@ from typing import Any
|
|
|
38
44
|
# so it can't collide with a DSPy named-parameter path.
|
|
39
45
|
_LINEAGE_KEY = "_cmpnd"
|
|
40
46
|
_RUN_ID_FIELD = "optimization_run_id"
|
|
47
|
+
_VERSION_FIELD = "deployment_id"
|
|
41
48
|
|
|
42
49
|
_patched = False
|
|
43
50
|
# The original dump_state/load_state per patched class, stashed so de_instrument
|
|
@@ -47,19 +54,36 @@ _originals: list[tuple[Any, str, Any]] | None = None
|
|
|
47
54
|
|
|
48
55
|
def _inject(state: Any, module: Any) -> Any:
|
|
49
56
|
"""Add the lineage carrier to a dumped state dict when the module is tagged."""
|
|
57
|
+
carrier: dict[str, str] = {}
|
|
50
58
|
run_id = getattr(module, "_optimization_run_id", None)
|
|
51
|
-
if run_id is not None
|
|
52
|
-
|
|
59
|
+
if run_id is not None:
|
|
60
|
+
carrier[_RUN_ID_FIELD] = str(run_id)
|
|
61
|
+
version = getattr(module, "_cmpnd_deployment_id", None)
|
|
62
|
+
if version is not None:
|
|
63
|
+
carrier[_VERSION_FIELD] = str(version)
|
|
64
|
+
if carrier and isinstance(state, dict):
|
|
65
|
+
state[_LINEAGE_KEY] = carrier
|
|
53
66
|
return state
|
|
54
67
|
|
|
55
68
|
|
|
56
69
|
def _restore(state: Any, module: Any) -> None:
|
|
57
|
-
"""Re-attach
|
|
70
|
+
"""Re-attach the run and the version from a loaded state dict's carrier.
|
|
71
|
+
|
|
72
|
+
The version follows the loaded state: a state that names none clears the one an
|
|
73
|
+
earlier load attached, so the module's traces never claim a version it no
|
|
74
|
+
longer is.
|
|
75
|
+
"""
|
|
58
76
|
if not isinstance(state, dict):
|
|
59
77
|
return
|
|
60
78
|
carrier = state.get(_LINEAGE_KEY)
|
|
61
|
-
if isinstance(carrier, dict)
|
|
79
|
+
if not isinstance(carrier, dict):
|
|
80
|
+
carrier = {}
|
|
81
|
+
if carrier.get(_RUN_ID_FIELD):
|
|
62
82
|
module._optimization_run_id = str(carrier[_RUN_ID_FIELD])
|
|
83
|
+
if carrier.get(_VERSION_FIELD):
|
|
84
|
+
module._cmpnd_deployment_id = str(carrier[_VERSION_FIELD])
|
|
85
|
+
elif "_cmpnd_deployment_id" in vars(module):
|
|
86
|
+
del module._cmpnd_deployment_id
|
|
63
87
|
|
|
64
88
|
|
|
65
89
|
# The wrappers forward *args/**kwargs verbatim rather than naming dump_state's
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
"""Private provenance for tools that
|
|
1
|
+
"""Private provenance for tools that a program's author did not write.
|
|
2
|
+
|
|
3
|
+
CMPND adds marked tools while a program runs, and `dspy.ReAct` adds its own final-output
|
|
4
|
+
tool. Neither belongs in a program's packaged source, its identity or its tool spans.
|
|
5
|
+
"""
|
|
2
6
|
|
|
3
7
|
from __future__ import annotations
|
|
4
8
|
|
|
@@ -31,6 +35,19 @@ def mark_runtime_tool(tool: _T) -> _T:
|
|
|
31
35
|
return tool
|
|
32
36
|
|
|
33
37
|
|
|
38
|
+
def is_react_final_tool(name: str, tool: object) -> bool:
|
|
39
|
+
"""Return whether this is the tool `dspy.ReAct` adds to end a run.
|
|
40
|
+
|
|
41
|
+
DSPy 3.4 and earlier name it `finish`. DSPy 3.5 names it `submit` and refuses a user
|
|
42
|
+
tool of that name in ReAct, but another module may carry a user tool called `submit`,
|
|
43
|
+
so the check reads where the callable came from.
|
|
44
|
+
"""
|
|
45
|
+
if name == "finish":
|
|
46
|
+
return True
|
|
47
|
+
function = getattr(tool, "func", None)
|
|
48
|
+
return name == "submit" and getattr(function, "__qualname__", "").endswith("._make_submit_tool.<locals>.submit")
|
|
49
|
+
|
|
50
|
+
|
|
34
51
|
def is_runtime_tool(tool: object) -> bool:
|
|
35
52
|
"""Return whether this process marked the tool or its wrapped callable."""
|
|
36
53
|
if getattr(tool, _RUNTIME_TOOL_MARKER, None) is _RUNTIME_TOOL_PROVENANCE:
|
|
@@ -9,7 +9,19 @@ from datetime import datetime, timezone
|
|
|
9
9
|
from typing import Any
|
|
10
10
|
from uuid import UUID, uuid4
|
|
11
11
|
|
|
12
|
-
from . import
|
|
12
|
+
from . import (
|
|
13
|
+
_guides,
|
|
14
|
+
_runtime_tools,
|
|
15
|
+
configuration,
|
|
16
|
+
context,
|
|
17
|
+
eval_handler,
|
|
18
|
+
exporter,
|
|
19
|
+
helpers,
|
|
20
|
+
identity,
|
|
21
|
+
models,
|
|
22
|
+
program_naming,
|
|
23
|
+
references,
|
|
24
|
+
)
|
|
13
25
|
|
|
14
26
|
logger = logging.getLogger(__name__)
|
|
15
27
|
|
|
@@ -52,10 +64,12 @@ def _warn_once_about_generated_name(trace: models.TraceBuilder) -> None:
|
|
|
52
64
|
_warned_unnamed = True
|
|
53
65
|
logger.warning(
|
|
54
66
|
"cmpnd: this program has no name, so its traces go to the program named %r, a name cmpnd generated from "
|
|
55
|
-
"its class and its signature
|
|
56
|
-
"cmpnd.Program(name, module=..., lm=...) and run it
|
|
57
|
-
"
|
|
67
|
+
"its class and its signature, and only a named program deploys. Add the line "
|
|
68
|
+
'@cmpnd.program("<name>") above its class, or wrap it as cmpnd.Program(name, module=..., lm=...), and run it '
|
|
69
|
+
"through a cmpnd.Client, and its traces go to the program with that name. %s "
|
|
70
|
+
"This warning appears once per process.",
|
|
58
71
|
trace.generated_name,
|
|
72
|
+
_guides.VERSIONS_GUIDE,
|
|
59
73
|
)
|
|
60
74
|
|
|
61
75
|
|
|
@@ -979,8 +993,8 @@ class _ModuleMixin(_CallbackBase):
|
|
|
979
993
|
if span_type == models.SpanType.RLM and span.trace_id:
|
|
980
994
|
self._rlm_parent_spans[str(span.trace_id)] = span
|
|
981
995
|
|
|
982
|
-
# RLM repl_history: when PREDICT N+1 starts, its
|
|
983
|
-
#
|
|
996
|
+
# RLM repl_history: when PREDICT N+1 starts, its trajectory input (see
|
|
997
|
+
# RLM_TRAJECTORY_INPUTS) contains the output from step N's code execution.
|
|
984
998
|
if (
|
|
985
999
|
span_type == models.SpanType.PREDICT
|
|
986
1000
|
and span.trace_id
|
|
@@ -990,9 +1004,18 @@ class _ModuleMixin(_CallbackBase):
|
|
|
990
1004
|
rlm_parent = self._rlm_parent_spans.get(str(span.trace_id))
|
|
991
1005
|
if rlm_parent and rlm_parent.repl_history:
|
|
992
1006
|
# inputs may be {"kwargs": {"repl_history": ...}} or {"repl_history": ...}
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1007
|
+
kwargs = inputs.get("kwargs") or {}
|
|
1008
|
+
trajectory = next(
|
|
1009
|
+
(
|
|
1010
|
+
value
|
|
1011
|
+
for name in RLM_TRAJECTORY_INPUTS
|
|
1012
|
+
for value in (inputs.get(name), kwargs.get(name))
|
|
1013
|
+
if value is not None
|
|
1014
|
+
),
|
|
1015
|
+
None,
|
|
1016
|
+
)
|
|
1017
|
+
last_output = _last_rlm_turn_output(trajectory)
|
|
1018
|
+
if last_output is not None:
|
|
996
1019
|
rlm_parent.repl_history[-1]["output"] = last_output
|
|
997
1020
|
# Surface the previous turn's code output on THIS (turn N+1)
|
|
998
1021
|
# span so a streaming reader can fill in turn N's notebook
|
|
@@ -1002,12 +1025,11 @@ class _ModuleMixin(_CallbackBase):
|
|
|
1002
1025
|
# here instead; the RLM's final turn (no successor) still
|
|
1003
1026
|
# resolves at finalize. Capped like an output field so a large
|
|
1004
1027
|
# stdout can't bloat the streamed span.
|
|
1005
|
-
if last_output
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
span.attributes["rlm.prev_output"] = prev
|
|
1028
|
+
prev = last_output if isinstance(last_output, str) else str(last_output)
|
|
1029
|
+
cap = self._max_output_field_size
|
|
1030
|
+
if len(prev) > cap:
|
|
1031
|
+
prev = prev[:cap] + f"\n\n… (truncated, {len(prev)} chars total)"
|
|
1032
|
+
span.attributes["rlm.prev_output"] = prev
|
|
1011
1033
|
|
|
1012
1034
|
# Push to context stack
|
|
1013
1035
|
context.push_span(span)
|
|
@@ -1085,18 +1107,19 @@ class _ModuleMixin(_CallbackBase):
|
|
|
1085
1107
|
)
|
|
1086
1108
|
|
|
1087
1109
|
# Thin RLM PREDICT inputs: strip the growing
|
|
1088
|
-
#
|
|
1110
|
+
# trajectory to avoid O(N²) data. The trajectory is
|
|
1089
1111
|
# captured on the parent RLM span's repl_history instead.
|
|
1090
1112
|
# Note: these are regular predict turns, NOT subcalls.
|
|
1091
1113
|
# Subcalls are LM_CALL spans fired by code execution.
|
|
1092
|
-
|
|
1093
|
-
span.inputs.
|
|
1094
|
-
|
|
1095
|
-
if span.inputs and "kwargs" in span.inputs:
|
|
1096
|
-
kw = span.inputs.get("kwargs")
|
|
1097
|
-
if isinstance(kw, dict) and "repl_history" in kw:
|
|
1098
|
-
kw.pop("repl_history", None)
|
|
1114
|
+
for name in RLM_TRAJECTORY_INPUTS:
|
|
1115
|
+
if span.inputs and name in span.inputs:
|
|
1116
|
+
span.inputs.pop(name, None)
|
|
1099
1117
|
span.attributes["thinned"] = "true"
|
|
1118
|
+
if span.inputs and "kwargs" in span.inputs:
|
|
1119
|
+
kw = span.inputs.get("kwargs")
|
|
1120
|
+
if isinstance(kw, dict) and name in kw:
|
|
1121
|
+
kw.pop(name, None)
|
|
1122
|
+
span.attributes["thinned"] = "true"
|
|
1100
1123
|
|
|
1101
1124
|
# When the RLM span ends, extract the last step's output from the
|
|
1102
1125
|
# final trajectory (no subsequent PREDICT to carry it).
|
|
@@ -1441,6 +1464,12 @@ class _ModuleMixin(_CallbackBase):
|
|
|
1441
1464
|
# Detect if this is a compiled program (from optimization)
|
|
1442
1465
|
if hasattr(instance, "_optimization_run_id"):
|
|
1443
1466
|
trace.compiled_from_run_id = str(instance._optimization_run_id)
|
|
1467
|
+
# A program loaded from an optimization's downloaded result names the
|
|
1468
|
+
# version it is, the d_ id serve put in the state's carrier. A deployment
|
|
1469
|
+
# the trace already runs under names it instead.
|
|
1470
|
+
version = getattr(instance, "_cmpnd_deployment_id", None)
|
|
1471
|
+
if version is not None and trace.deployment_id is None:
|
|
1472
|
+
trace.deployment_id = str(version)
|
|
1444
1473
|
|
|
1445
1474
|
# Capture active demo IDs if available
|
|
1446
1475
|
demos = getattr(instance, "demos", None)
|
|
@@ -1914,7 +1943,7 @@ class _AdapterMixin(_CallbackBase):
|
|
|
1914
1943
|
|
|
1915
1944
|
@staticmethod
|
|
1916
1945
|
def _thin_rlm_adapter_inputs(span: models.SpanBuilder, inputs: dict[str, Any]) -> dict[str, Any]:
|
|
1917
|
-
"""Drop the growing
|
|
1946
|
+
"""Drop the growing trajectory from an RLM turn's adapter inputs.
|
|
1918
1947
|
|
|
1919
1948
|
The adapter's ``inputs`` argument is the turn's ``Predict`` inputs, which
|
|
1920
1949
|
``on_module_end`` already thins for the same reason: the RLM span carries
|
|
@@ -1924,10 +1953,10 @@ class _AdapterMixin(_CallbackBase):
|
|
|
1924
1953
|
``Predict`` span.
|
|
1925
1954
|
"""
|
|
1926
1955
|
predict_inputs = inputs.get("inputs")
|
|
1927
|
-
if not isinstance(predict_inputs, dict) or
|
|
1956
|
+
if not isinstance(predict_inputs, dict) or not any(name in predict_inputs for name in RLM_TRAJECTORY_INPUTS):
|
|
1928
1957
|
return inputs
|
|
1929
1958
|
span.attributes["thinned"] = "true"
|
|
1930
|
-
return {**inputs, "inputs": {k: v for k, v in predict_inputs.items() if k
|
|
1959
|
+
return {**inputs, "inputs": {k: v for k, v in predict_inputs.items() if k not in RLM_TRAJECTORY_INPUTS}}
|
|
1931
1960
|
|
|
1932
1961
|
def _end_adapter_span(
|
|
1933
1962
|
self,
|
|
@@ -2077,9 +2106,9 @@ class _ToolMixin(_CallbackBase):
|
|
|
2077
2106
|
"""Handle tool execution start."""
|
|
2078
2107
|
dspy, _ = _get_dspy()
|
|
2079
2108
|
|
|
2080
|
-
# Skip
|
|
2109
|
+
# Skip ReAct's own final-output tool
|
|
2081
2110
|
tool_name = getattr(instance, "name", "unknown")
|
|
2082
|
-
if tool_name
|
|
2111
|
+
if _runtime_tools.is_react_final_tool(tool_name, instance):
|
|
2083
2112
|
return
|
|
2084
2113
|
|
|
2085
2114
|
# A real dspy.Tool span is firing beneath an interpreter tool call, so the
|
|
@@ -2147,12 +2176,39 @@ class _ToolMixin(_CallbackBase):
|
|
|
2147
2176
|
exp.export_span(span)
|
|
2148
2177
|
|
|
2149
2178
|
|
|
2150
|
-
# The
|
|
2151
|
-
#
|
|
2152
|
-
#
|
|
2153
|
-
#
|
|
2154
|
-
|
|
2155
|
-
|
|
2179
|
+
# The input an RLM action turn receives its growing trajectory in: `repl_history` (a
|
|
2180
|
+
# `REPLHistory`) on DSPy 3.4 and earlier, and `history` (a `dspy.History` whose messages
|
|
2181
|
+
# each carry a `repl_entry`) from DSPy 3.5, whose extract turn still takes
|
|
2182
|
+
# `repl_history`. RLM reserves both names, so neither is ever a program's own input.
|
|
2183
|
+
RLM_TRAJECTORY_INPUTS = ("repl_history", "history")
|
|
2184
|
+
|
|
2185
|
+
|
|
2186
|
+
def _last_rlm_turn_output(trajectory: Any) -> Any:
|
|
2187
|
+
"""The previous turn's code output from an RLM turn's trajectory input, or None."""
|
|
2188
|
+
entries = getattr(trajectory, "entries", None)
|
|
2189
|
+
if entries:
|
|
2190
|
+
return getattr(entries[-1], "output", None)
|
|
2191
|
+
messages = getattr(trajectory, "messages", None)
|
|
2192
|
+
if messages and isinstance(messages[-1], dict):
|
|
2193
|
+
return getattr(messages[-1].get("repl_entry"), "output", None)
|
|
2194
|
+
return None
|
|
2195
|
+
|
|
2196
|
+
|
|
2197
|
+
# The variables DSPy hands the interpreter when RLM or Flex installs its sandboxed `dspy`:
|
|
2198
|
+
# `__dspy_host_token` on DSPy 3.4.x (`dspy.primitives.facade.HOST_TOKEN_VAR`), and
|
|
2199
|
+
# `__dspy_spec` from DSPy 3.5 (the argument `dspy.primitives.facade.BOOTSTRAP` reads).
|
|
2200
|
+
# That setup runs as the session's first cell on every forward, and it is DSPy's
|
|
2201
|
+
# machinery rather than a step the program took, so it records no span. Spelled out
|
|
2202
|
+
# rather than imported because older DSPy has no such module.
|
|
2203
|
+
SANDBOX_SETUP_VARIABLES = frozenset({"__dspy_host_token", "__dspy_spec"})
|
|
2204
|
+
|
|
2205
|
+
# The line DSPy 3.5's RLM adds to each cell the model wrote, before the cell runs in a
|
|
2206
|
+
# sandbox (`dspy.predict.rlm._REBIND`). It is DSPy's machinery, so a cell's span records
|
|
2207
|
+
# the code without it. It follows any `from __future__` imports, so it is removed where
|
|
2208
|
+
# it stands.
|
|
2209
|
+
RLM_CELL_PRELUDE = (
|
|
2210
|
+
'if "__dspy_guest_spec" in globals(): __import__("sys").modules["dspy.primitives.sandbox_guest"].bind(globals())\n'
|
|
2211
|
+
)
|
|
2156
2212
|
|
|
2157
2213
|
|
|
2158
2214
|
class _InterpreterMixin(_CallbackBase):
|
|
@@ -2182,13 +2238,15 @@ class _InterpreterMixin(_CallbackBase):
|
|
|
2182
2238
|
if context.get_current_trace() is None and context.get_current_span() is None:
|
|
2183
2239
|
return
|
|
2184
2240
|
variables = inputs.get("variables")
|
|
2185
|
-
if isinstance(variables, dict) and
|
|
2241
|
+
if isinstance(variables, dict) and not SANDBOX_SETUP_VARIABLES.isdisjoint(variables):
|
|
2186
2242
|
return
|
|
2187
2243
|
|
|
2188
2244
|
span = self._new_span(f"{instance.__class__.__name__}.execute", models.SpanType.INTERPRETER_EXECUTE)
|
|
2189
2245
|
|
|
2190
2246
|
if self._capture_inputs:
|
|
2191
2247
|
code = inputs.get("code")
|
|
2248
|
+
if isinstance(code, str):
|
|
2249
|
+
code = code.replace(RLM_CELL_PRELUDE, "", 1)
|
|
2192
2250
|
if code is not None:
|
|
2193
2251
|
span.set_inputs({"code": helpers.truncate_field(code, self._max_input_field_size, depth=1)})
|
|
2194
2252
|
|
|
@@ -11,6 +11,7 @@ import typing
|
|
|
11
11
|
|
|
12
12
|
import httpx
|
|
13
13
|
|
|
14
|
+
from .. import _http
|
|
14
15
|
from . import api_client, deprecation, tree_help
|
|
15
16
|
from .commands import (
|
|
16
17
|
admin,
|
|
@@ -218,7 +219,7 @@ def main() -> None:
|
|
|
218
219
|
if result is not None:
|
|
219
220
|
print(json.dumps(result, indent=2, default=str))
|
|
220
221
|
except api_client.CliError as e:
|
|
221
|
-
|
|
222
|
+
report_refusal(e, as_json=bool(getattr(args, "json", False)))
|
|
222
223
|
sys.exit(e.exit_code)
|
|
223
224
|
except KeyboardInterrupt:
|
|
224
225
|
sys.exit(130)
|
|
@@ -231,6 +232,13 @@ def main() -> None:
|
|
|
231
232
|
# of dumping a Python traceback at users.
|
|
232
233
|
print(f"Error: {e}", file=sys.stderr)
|
|
233
234
|
sys.exit(1)
|
|
235
|
+
except httpx.HTTPStatusError as e:
|
|
236
|
+
# A run refusal (`deployment_runs.RunRefused`) carries serve's remedy.
|
|
237
|
+
if isinstance(getattr(e, "remedy", None), _http.Remedy):
|
|
238
|
+
report_refusal(e, as_json=bool(getattr(args, "json", False)))
|
|
239
|
+
else:
|
|
240
|
+
print(f"Error: HTTP request failed: {e}", file=sys.stderr)
|
|
241
|
+
sys.exit(1)
|
|
234
242
|
except httpx.HTTPError as e:
|
|
235
243
|
# Last-resort guard for any httpx-level error not caught upstream.
|
|
236
244
|
# If this fires, an HTTP call site is missing a `_raise_http_error`
|
|
@@ -238,3 +246,23 @@ def main() -> None:
|
|
|
238
246
|
# then don't traceback at the user.
|
|
239
247
|
print(f"Error: HTTP request failed: {e}", file=sys.stderr)
|
|
240
248
|
sys.exit(1)
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
def report_refusal(error: BaseException, *, as_json: bool) -> None:
|
|
252
|
+
"""Print a refusal and the steps that clear it, as commands to copy.
|
|
253
|
+
|
|
254
|
+
Under ``--json`` the error, its code and its remedy go to stdout as one JSON
|
|
255
|
+
object, the remedy as serve sent it, and the prose still goes to stderr.
|
|
256
|
+
"""
|
|
257
|
+
print(f"Error: {error}", file=sys.stderr)
|
|
258
|
+
remedy = getattr(error, "remedy", None)
|
|
259
|
+
if not isinstance(remedy, _http.Remedy):
|
|
260
|
+
return
|
|
261
|
+
if as_json and getattr(error, "_cmpnd_json_reported", False):
|
|
262
|
+
return
|
|
263
|
+
if as_json:
|
|
264
|
+
out = {"error": str(error), "error_code": getattr(error, "error_code", None), "remedy": remedy.as_json()}
|
|
265
|
+
print(json.dumps(out, indent=2))
|
|
266
|
+
return
|
|
267
|
+
if steps := remedy.describe():
|
|
268
|
+
print("To fix it:\n" + steps, file=sys.stderr)
|