auditkit 1.1.4__tar.gz → 1.1.5__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.
- {auditkit-1.1.4 → auditkit-1.1.5}/CITATION.cff +1 -1
- {auditkit-1.1.4 → auditkit-1.1.5}/PKG-INFO +1 -1
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/community/changelog.md +17 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/pyproject.toml +1 -1
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/__init__.py +1 -1
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/comparison.py +17 -5
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/structured.py +51 -3
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/runner.py +57 -10
- auditkit-1.1.5/tests/test_failed_as_zero.py +297 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_structured_metrics.py +34 -0
- auditkit-1.1.4/tests/test_failed_as_zero.py +0 -136
- {auditkit-1.1.4 → auditkit-1.1.5}/.gitattributes +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/.github/workflows/check-release-version.yml +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/.github/workflows/patch-release.yml +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/.gitignore +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/AGENTS.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/CHANGELOG.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/LICENSE.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/CNAME +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/GUIDE.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/HF_ENDPOINT.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/SGLANG.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/VLLM_KNOWN_ISSUES.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/about/glossary.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/about/platform-integration.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/agent_eval.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/agents_and_rag.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/annotators.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/api.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/architecture/data-model.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/architecture/system-design.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/assets/auditkit-logo-black.png +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/assets/auditkit-logo-dark.png +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/assets/auditkit-logo-light.png +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/assets/auditkit-logo-white.png +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/assets/extra.css +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/assets/extra.js +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/assets/favicon.png +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/assets/icon.png +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/assets/icon.svg +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/assets/logo.svg +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/best_practices/scorers.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/cli.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/community/contributing.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/community/faq.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/community/roadmap.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/configuration.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/cookbook/llm_judge.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/cookbook/rag_evaluation.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/development.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/encoder_judge.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/encoder_judge_prebuilts.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/examples/custom_scorer.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/examples/experiments.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/examples/many_datasets.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/examples/model_comparison.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/examples/quickstart.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/experiments.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/getting_started.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/guard_models.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/index.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/integrations.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/known_issues.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/lexsi_integration.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/llm_judge_rendering.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/metrics.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/model_backends.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/rag_stress.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/reports.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/requirements.txt +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/scenarios.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/docs/scorers_reference.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/01_full_evaluation_pipeline.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/02_generation_across_hf_families.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/03_custom_annotators.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/04_metrics_deep_dive.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/05_data_types.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/06_model_comparison.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/07_annotators_across_models.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/08_compare_result_deep_dive.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/09_guard_judge_implementation_check.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/10_guard_judge_legit_models.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/11_encoder_judge_prebuilts.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/12_performance_metrics_demo.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/13_sglang_compatibility.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/14_agent_and_rag_evals.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/15_agentic_rag_metrics_walkthrough.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/16_agentic_endpoints_live.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/17_multi_route_references.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/agent_eval_offline.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/applications/01_application_pruned_llama_boolq.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/applications/02_application_healthcare_pubmedqa.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/applications/03_application_finance_10k_qa.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/applications/04_application_ecommerce_review_triage.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/applications/05_application_education_arc_tutor.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/applications/06_application_enterprise_search_rag.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/applications/07_application_bert_nli_judge.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/applications/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/auditkit.yaml +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/cohere/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/cohere/compare_models.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/cohere/metrics_generation.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/cohere/run_lmeval.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/cohere/sglang_auditkit.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/cohere/tgi_endpoint.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/colab/01_cohere_and_hf_api_models.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/colab/02_agentic_rag_real_agent.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/colab/03_vllm_integration.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/colab/04_cohere_hf_fixes_live.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/colab/05_real_world_agentic_rag.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/colab/06_cohere_all_backends.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/colab/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/model_comparison_notebook.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/stress_tests/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/stress_tests/test_stress_gated_model.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/examples/stress_tests/test_stress_open_model_load.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/mkdocs.yml +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/scripts/__init__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/scripts/release.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/__main__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/_bootstrap.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/_identity_guard.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/_text.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/adapter.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/agent_eval/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/agent_eval/__init__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/agent_eval/importers.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/agent_eval/lexsi.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/agent_eval/outcome.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/agent_eval/reliability.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/agent_eval/report.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/agent_eval/runner.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/agent_eval/sidecar.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/agent_eval/types.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/annotator.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/api.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/assets/auditkit_logo.png +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/bfcl.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/cache.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/cli.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/compat.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/diff.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/errors.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/evaluator.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/experiment.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/hf_publish.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/lexsi_login.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/lexsi_relay.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/lmeval_engine.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/loaders.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/logs.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metric.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/__init__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/agent.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/code.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/embedding.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/encoder_judge.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/generation.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/guard.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/hallucination.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/judge.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/pairwise.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/perf.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/rag.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/rag_judge.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/rag_stress.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/rag_stress_ops.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/rag_stress_runner.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/retrieval.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/security.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/metrics/toxicity.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model/__init__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model/agent_endpoint.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model/anthropic.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model/api_gen.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model/groq_gen.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model/hf_gen.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model/lexsi.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model/litellm_gen.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model/openai.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model/openrouter_gen.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model/vllm_gen.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/model_compare.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/provenance.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/redteam/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/redteam/__init__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/redteam/detector.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/redteam/detectors/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/redteam/detectors/builtin.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/redteam/probe.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/redteam/probes/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/redteam/probes/builtin.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/redteam/runner.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/registry.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/report.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/report_format.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/router.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/runspec.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/sample.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/scenario.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/scenarios/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/scenarios/__init__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/scenarios/arc.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/scenarios/gsm8k.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/scenarios/hellaswag.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/scenarios/humaneval.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/scenarios/mmlu.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/scenarios/truthfulqa.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/score.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/scorers.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/scoring.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/trace.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/src/auditkit/types.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/__init__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/.gitignore +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/FINDINGS.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/__init__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/catalog.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/colab_model_matrix.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/colab_offline_suite.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/conftest.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/make_metric_reports.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/test_agentic_pipeline_all_metrics.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/test_fingerprint_offline.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/test_formats_offline.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/test_live.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/test_live_rag.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/test_metrics_offline.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/test_pipeline_offline.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/test_rag_offline.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/agentic_suite/test_resolved_issues.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/conftest.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/chat_templates/aya_expanse.jinja +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/chat_templates/command_r7b_tool_use.jinja +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/chat_templates/tiny_aya_default.jinja +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/agenttune/dataset_train_grpo.jsonl +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/agenttune/report_constructed.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/agenttune/trace_finder.jsonl +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/agenttune/trace_hotpotqa.jsonl +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/agenttune/trajectory_store_export.jsonl +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/aligntune/AuditReport.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/aligntune/RegressionReport.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/circuitkit/faithfulness_report.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/circuitkit/faithfulness_report_default.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/circuitkit/faithfulness_report_ib_fastpath.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/circuitkit/faithfulness_report_nonfinite.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/circuitkit/faithfulness_report_unknown_sentinels.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/curatorkit/checkpoint_TextCleaner.jsonl +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/curatorkit/data_sample.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/curatorkit/data_sample_pdf.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/curatorkit/manifest.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/curatorkit/manifest_pdf.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/curatorkit/rejected.jsonl +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/curatorkit/rejected_pdf.jsonl +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/curatorkit/sft_alpaca.jsonl +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/curatorkit/sft_sharegpt.jsonl +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/safetune/placeholder-model__base__placeholder_bench.jsonl +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/safetune/placeholder-model__base__placeholder_bench_scored.jsonl +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/safetune/safety_audit_event__post_allow_long_redacted.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/safetune/safety_audit_event__post_keyword_classifier_block.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/safetune/safety_audit_event__pre_allow.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/lexsi_real/safetune/safety_audit_event__pre_tool_block.json +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/sglang_0520/commandr_excerpt.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/sglang_0520/transformers_backend_excerpt.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/fixtures/sglang_0520/unified_radix_cache_excerpt.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/__init__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/colab_cohere_models.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/colab_integrations.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/colab_sglang.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/colab_sglang_32b_north.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/colab_sglang_cohere_matrix.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/colab_vllm_32b.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/colab_vllm_cohere_matrix.ipynb +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/conftest.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/test_agenttune.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/test_cohere.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/test_hf.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/test_live.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/integrations_suite/test_sglang.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/issues_suite/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/issues_suite/__init__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/issues_suite/conftest.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/issues_suite/serve_model.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/issues_suite/test_issue43_specs.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/issues_suite/test_issue44_user_flows.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/issues_suite/test_issue45_bfcl.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/issues_suite/test_issue45_routes.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/issues_suite/test_live.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/issues_suite/test_vllm_cohere_templates.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/nonmetric_suite/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/nonmetric_suite/__init__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/nonmetric_suite/conftest.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/nonmetric_suite/test_agent_eval_and_loaders.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/nonmetric_suite/test_mrm_evidence.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/nonmetric_suite/test_redteam_machinery.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/pipeline_suite/README.md +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/pipeline_suite/__init__.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/pipeline_suite/conftest.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/pipeline_suite/test_edge_agent_and_rag_judges.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/pipeline_suite/test_edge_mrm.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/pipeline_suite/test_edge_rag_stress.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/pipeline_suite/test_edge_redteam_judges.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/pipeline_suite/test_edge_uncertainty.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/pipeline_suite/test_pr1_additions.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/pipeline_suite/test_pr2_redteam.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/pipeline_suite/test_pr3_mrm.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/pipeline_suite/test_pr4_uncertainty.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_adapter.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_adapter_params.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_endpoint.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_eval_cli.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_eval_disagreement.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_eval_eventlog.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_eval_harness.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_eval_importers.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_eval_outcome.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_eval_reliability.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_eval_runner.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_eval_secrets.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_eval_sidecar.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_eval_types.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_metrics.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agent_reference_free.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agenttune_fix_plan.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_agenttune_integration.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_annotator.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_api.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_api_backend.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_api_images.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_api_tool_calls.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_api_unverified_fields.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_apostrophe_fold.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_benchmark.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_chat_messages.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_chat_template_kwargs_everywhere.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_cli.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_cli_yaml_model.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_code_metrics.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_cohere_aya.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_cohere_hf_fix_plan.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_cohere_tool_calls.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_compare.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_comparison.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_compat.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_core_engine.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_custom_judge_pipeline.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_diff.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_embedding_metrics.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_encoder_judge.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_env_compat_fix_plan.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_errors.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_evaluate_many.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_eventlog_action_shapes.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_execute_concurrency.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_experiment.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_fingerprint_stability.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_generation_kwargs.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_generation_metrics.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_guard.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_hallucination_metrics.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_hf_device_map.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_hf_dtype_fallback.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_hf_gen_import_error.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_hf_gen_logits_sanitizer.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_hf_interop.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_hf_wire_format.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_integration.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_judge.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_judge_flow.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_judge_number_parse.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_judge_option_labels.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_lexsi_compat.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_lexsi_relay.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_llm_judge.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_lmeval_engine.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_lmeval_real_pipeline.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_load_dataset.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_loaders.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_loaders_agent.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_mcq_gen_params.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_metric.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_metric_properties.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_metrics_via_pipeline.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_missing_is_not_zero.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_model.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_model_backends.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_multipath_references.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_paired_bootstrap.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_pairwise_metrics.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_pipeline_live_hf.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_practical.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_provenance.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_rag_judge.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_rag_metrics.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_rag_reference_free.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_rag_stress.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_rag_stress_ops.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_rag_stress_runner.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_redteam.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_reference_fingerprint.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_registry.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_release.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_retrieval_metrics.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_review27_followups.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_route_distribution.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_router.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_runner.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_sample.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_scenario_dataset_ids.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_scenarios.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_score.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_scorer_context_typeerror.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_scorer_order_cache.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_security_perf.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_summary_failed_samples.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_template_kwargs_f1_fix_plan.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_token_usage_and_cost.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_toxicity_metrics.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_trace.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_track3_agenttune.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_types.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_unknown_architecture_message.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_unscored_results.py +0 -0
- {auditkit-1.1.4 → auditkit-1.1.5}/tests/test_vllm_offline_engine.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: auditkit
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.5
|
|
4
4
|
Summary: Evaluate any model on any dataset and any task — standalone, no platform required
|
|
5
5
|
Project-URL: Homepage, https://auditkit.lexsi.ai/
|
|
6
6
|
Project-URL: Documentation, https://auditkit.lexsi.ai/
|
|
@@ -199,6 +199,23 @@
|
|
|
199
199
|
Claude model ids instead of retired Claude 3 ones; "source-available", not "open-source"; no
|
|
200
200
|
internal wording, links to a private repository or private issue numbers in public pages;
|
|
201
201
|
GUIDE's table of contents, catalog heading and version line match its sections and 1.1.2.
|
|
202
|
+
- `RunConfig(failed_as_zero=True)` filled a metric that returns several scores (`retrieval` giving `recall@k`, ...)
|
|
203
|
+
under the metric's own name, which is not a score, and left the real scores short. A sample whose metric crashed,
|
|
204
|
+
or whose model call failed, is now zero-filled under the score names the metric produced in the run, except a
|
|
205
|
+
name it left out on some samples (nothing to measure there) and a lower-is-better name, which a failed sample
|
|
206
|
+
cannot be given the best value for.
|
|
207
|
+
A model call that failed is no longer filled for a metric that does not apply to that sample, and a metric that
|
|
208
|
+
crashed on a sample with a precomputed `actual_output` is now filled too (it was missed on that path).
|
|
209
|
+
A sample that failed because an optional dependency is missing (`ExtraNotInstalled`) is no longer turned into a
|
|
210
|
+
0.0 score, since that is a setup problem. `RunComparison.summary()` no longer says failed samples were left out of
|
|
211
|
+
the means when a run used `failed_as_zero`; it says they were counted as 0.0 and that `per_task_deltas()` and
|
|
212
|
+
`significance()` leave them out.
|
|
213
|
+
- `JsonSchemaValid` with the built-in validator gave wrong verdicts, or crashed in the middle of a run, on schema
|
|
214
|
+
values it cannot check: a draft-04 boolean `exclusiveMinimum`/`exclusiveMaximum` passed a value the real validator
|
|
215
|
+
rejects, and the array form of `items`, an unknown `type` or a non-list `required` raised `AttributeError` or
|
|
216
|
+
`KeyError` on a sample. These now raise a `ValueError` when the metric is built, naming the value and pointing at
|
|
217
|
+
`backend='jsonschema'`.
|
|
218
|
+
- `FieldF1` no longer crashes on a key field whose normalizer returns a list or dict.
|
|
202
219
|
|
|
203
220
|
### Changed
|
|
204
221
|
|
|
@@ -7,7 +7,7 @@ from importlib import metadata as _metadata
|
|
|
7
7
|
try:
|
|
8
8
|
__version__ = _metadata.version("auditkit")
|
|
9
9
|
except _metadata.PackageNotFoundError: # a source checkout that was never installed
|
|
10
|
-
__version__ = "1.1.
|
|
10
|
+
__version__ = "1.1.5"
|
|
11
11
|
|
|
12
12
|
from .api import run_lmeval, compare, evaluate, evaluate_many, generate, scorer
|
|
13
13
|
from .lexsi_login import lexsi_login
|
|
@@ -429,6 +429,10 @@ class RunComparison:
|
|
|
429
429
|
``has_failures``) before trusting a grade; ``regressed()`` is the one
|
|
430
430
|
view that *does* catch a failure correctly (via ``Prediction.correct``,
|
|
431
431
|
which is ``False`` on the fallback), everything else needs this check.
|
|
432
|
+
|
|
433
|
+
With ``RunConfig(failed_as_zero=True)`` a run's headline counts those samples as 0.0, so
|
|
434
|
+
``metric_deltas()`` and ``tradeoff()`` include them; the per-sample views (``per_task_deltas()``,
|
|
435
|
+
``significance()``) still leave them out. ``summary()`` says so when either run did that.
|
|
432
436
|
"""
|
|
433
437
|
return {
|
|
434
438
|
"baseline_failed": self.baseline.failed_count,
|
|
@@ -478,11 +482,19 @@ class RunComparison:
|
|
|
478
482
|
lines = []
|
|
479
483
|
if self.has_failures:
|
|
480
484
|
fs = self.failure_summary()
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
485
|
+
if any(getattr(r.config, "failed_as_zero", False) for r in (self.baseline, self.candidate)):
|
|
486
|
+
lines.append(
|
|
487
|
+
f" WARNING: baseline had {fs['baseline_failed']} failed sample(s), "
|
|
488
|
+
f"candidate had {fs['candidate_failed']}. A run with failed_as_zero counts them as 0.0 in its "
|
|
489
|
+
f"means; per_task_deltas() and significance() leave them out, so those can disagree with the "
|
|
490
|
+
f"means below. See .failure_summary()."
|
|
491
|
+
)
|
|
492
|
+
else:
|
|
493
|
+
lines.append(
|
|
494
|
+
f" WARNING: baseline had {fs['baseline_failed']} failed sample(s), "
|
|
495
|
+
f"candidate had {fs['candidate_failed']} -- EXCLUDED from the means "
|
|
496
|
+
f"below, not counted as wrong. See .failure_summary()."
|
|
497
|
+
)
|
|
486
498
|
cw = self.coverage_warnings()
|
|
487
499
|
if cw:
|
|
488
500
|
lines.append(
|
|
@@ -58,6 +58,48 @@ _SCHEMA_KEYWORDS = ("additionalProperties", "items", "not")
|
|
|
58
58
|
_LIST_KEYWORDS = ("anyOf", "oneOf", "allOf")
|
|
59
59
|
|
|
60
60
|
|
|
61
|
+
def _as_key(value: Any) -> Any:
|
|
62
|
+
"""``value`` as a dictionary key: a normalizer hook may return a list or dict, which is not hashable."""
|
|
63
|
+
try:
|
|
64
|
+
hash(value)
|
|
65
|
+
return value
|
|
66
|
+
except TypeError:
|
|
67
|
+
return json.dumps(value, sort_keys=True, default=str)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _bad_shapes(schema: Any, found: Optional[list] = None) -> list[str]:
|
|
71
|
+
"""Keyword values in ``schema`` (at schema positions only) that the built-in validator is known to misread or crash on.
|
|
72
|
+
|
|
73
|
+
Not every malformed value: an invalid ``pattern``, a ``$ref`` to nothing or ``multipleOf: 0`` still fail when a
|
|
74
|
+
sample is scored. ``backend='jsonschema'`` rejects them when the metric is built.
|
|
75
|
+
"""
|
|
76
|
+
found = [] if found is None else found
|
|
77
|
+
if not isinstance(schema, dict):
|
|
78
|
+
return found
|
|
79
|
+
if "type" in schema:
|
|
80
|
+
names = [schema["type"]] if isinstance(schema["type"], str) else schema["type"]
|
|
81
|
+
if not isinstance(names, list) or not all(isinstance(n, str) and n in _TYPES for n in names):
|
|
82
|
+
found.append(f"type {schema['type']!r} is not a known type name or list of them")
|
|
83
|
+
if "required" in schema and not (isinstance(schema["required"], list)
|
|
84
|
+
and all(isinstance(k, str) for k in schema["required"])):
|
|
85
|
+
found.append("required must be a list of property names")
|
|
86
|
+
if "items" in schema and not isinstance(schema["items"], (dict, bool)):
|
|
87
|
+
found.append("items must be a schema (the array form of items is not supported)")
|
|
88
|
+
for kw in ("exclusiveMinimum", "exclusiveMaximum"):
|
|
89
|
+
if kw in schema and (isinstance(schema[kw], bool) or not isinstance(schema[kw], (int, float))):
|
|
90
|
+
found.append(f"{kw} must be a number (the draft-04 boolean form is not supported)")
|
|
91
|
+
for k in _MAP_KEYWORDS:
|
|
92
|
+
mapped = schema.get(k)
|
|
93
|
+
for sub in (mapped.values() if isinstance(mapped, dict) else ()):
|
|
94
|
+
_bad_shapes(sub, found)
|
|
95
|
+
for k in _SCHEMA_KEYWORDS:
|
|
96
|
+
_bad_shapes(schema.get(k), found)
|
|
97
|
+
for k in _LIST_KEYWORDS:
|
|
98
|
+
for sub in (schema.get(k) if isinstance(schema.get(k), list) else ()):
|
|
99
|
+
_bad_shapes(sub, found)
|
|
100
|
+
return found
|
|
101
|
+
|
|
102
|
+
|
|
61
103
|
def _unsupported(schema: Any, found: Optional[set] = None) -> set[str]:
|
|
62
104
|
"""Keywords in ``schema`` (recursively, at schema positions only) the built-in validator cannot check."""
|
|
63
105
|
found = set() if found is None else found
|
|
@@ -285,6 +327,10 @@ class JsonSchemaValid(Metric):
|
|
|
285
327
|
if missing:
|
|
286
328
|
raise ValueError(f"the minimal JSON Schema validator cannot check {sorted(missing)}; "
|
|
287
329
|
f"pip install auditkit[jsonschema] and use backend='jsonschema'")
|
|
330
|
+
shapes = _bad_shapes(schema)
|
|
331
|
+
if shapes:
|
|
332
|
+
raise ValueError("the schema holds values the minimal JSON Schema validator cannot check: "
|
|
333
|
+
+ "; ".join(shapes) + "; pip install auditkit[jsonschema] and use backend='jsonschema'")
|
|
288
334
|
|
|
289
335
|
def run(inst: Any) -> Optional[str]:
|
|
290
336
|
errs = _errors(inst, schema, schema, "$")
|
|
@@ -341,7 +387,9 @@ class FieldF1(Metric):
|
|
|
341
387
|
``field_f1`` (the headline), ``field_precision`` and ``field_recall``; the f1 score's ``reason`` lists up to
|
|
342
388
|
five wrong or missing paths. Output that is not JSON scores 0 on all three; a target that is not JSON raises.
|
|
343
389
|
|
|
344
|
-
Lists are aligned before comparing, never by position alone: lists of scalars as multisets
|
|
390
|
+
Lists are aligned before comparing, never by position alone: lists of scalars as multisets (each predicted value
|
|
391
|
+
takes the first unused target it equals, within ``number_tol`` for numbers, so a tolerance can pair values
|
|
392
|
+
first-come rather than best-match); lists of objects
|
|
345
393
|
by a key field when ``list_keys`` names one (``"id"``, or ``{"items": "sku"}`` mapping a path pattern such as
|
|
346
394
|
``"orders[].lines"`` to its key field), otherwise greedily, pairing the item pairs with the most matching leaves
|
|
347
395
|
first. A predicted object whose key is absent from the target stays unmatched.
|
|
@@ -441,10 +489,10 @@ class FieldF1(Metric):
|
|
|
441
489
|
queues: dict[Any, list[int]] = defaultdict(list)
|
|
442
490
|
for j, t in enumerate(truth):
|
|
443
491
|
if isinstance(t, dict) and key in t and _leaf(t[key]):
|
|
444
|
-
queues[self._norm(f"{item_path}.{key}", t[key])].append(j)
|
|
492
|
+
queues[_as_key(self._norm(f"{item_path}.{key}", t[key]))].append(j)
|
|
445
493
|
for i, p in enumerate(pred):
|
|
446
494
|
if isinstance(p, dict) and key in p and _leaf(p[key]):
|
|
447
|
-
q = queues.get(self._norm(f"{item_path}.{key}", p[key]))
|
|
495
|
+
q = queues.get(_as_key(self._norm(f"{item_path}.{key}", p[key])))
|
|
448
496
|
if q:
|
|
449
497
|
j = q.pop(0)
|
|
450
498
|
pairs.append((i, j))
|
|
@@ -131,6 +131,24 @@ def unscored_status(score: Score) -> Optional[str]:
|
|
|
131
131
|
status = meta.get("status") or getattr(score, "label", None) or "unknown"
|
|
132
132
|
return "not_tested" if status == "not_tested" else "unknown"
|
|
133
133
|
|
|
134
|
+
class _Produced:
|
|
135
|
+
"""What one metric produced over a run: how many samples it scored, how often each score name appeared,
|
|
136
|
+
and which names are lower-is-better (declared on the Score, or by the metric). Feeds ``failed_as_zero``."""
|
|
137
|
+
|
|
138
|
+
def __init__(self) -> None:
|
|
139
|
+
self.samples = 0
|
|
140
|
+
self.names: dict[str, int] = {}
|
|
141
|
+
self.lower: set[str] = set()
|
|
142
|
+
|
|
143
|
+
def add(self, metric: Metric, produced: list[Score]) -> None:
|
|
144
|
+
self.samples += 1
|
|
145
|
+
for name in {s.name for s in produced}:
|
|
146
|
+
self.names[name] = self.names.get(name, 0) + 1
|
|
147
|
+
for s in produced:
|
|
148
|
+
if s.direction == Direction.MINIMIZE or metric.direction == Direction.MINIMIZE:
|
|
149
|
+
self.lower.add(s.name)
|
|
150
|
+
|
|
151
|
+
|
|
134
152
|
class Runner:
|
|
135
153
|
"""Drives a :class:`RunSpec` to a :class:`RunResult` in five stages."""
|
|
136
154
|
|
|
@@ -382,6 +400,7 @@ class Runner:
|
|
|
382
400
|
errors: list | None = None,
|
|
383
401
|
prompt: Optional[str] = None,
|
|
384
402
|
extracted_by: str | None = None,
|
|
403
|
+
names_by_metric: dict[str, _Produced] | None = None,
|
|
385
404
|
) -> tuple[list[Score], Prediction]:
|
|
386
405
|
# extracted_by names an annotator whose context["extracted"] value
|
|
387
406
|
# should be scored instead of the raw output (e.g. RegexAnnotator
|
|
@@ -428,6 +447,8 @@ class Runner:
|
|
|
428
447
|
failed_metrics.append(metric.name)
|
|
429
448
|
continue
|
|
430
449
|
produced_list = produced if isinstance(produced, list) else [produced]
|
|
450
|
+
if names_by_metric is not None: # what each metric produced, for failed_as_zero (before the direction override)
|
|
451
|
+
names_by_metric.setdefault(metric.name, _Produced()).add(metric, produced_list)
|
|
431
452
|
for s in produced_list:
|
|
432
453
|
# A Score flagged metadata["unknown"] is not a measurement (its value
|
|
433
454
|
# is a placeholder). "unknown" -- the metric could not decide, e.g. an
|
|
@@ -504,20 +525,38 @@ class Runner:
|
|
|
504
525
|
|
|
505
526
|
@staticmethod
|
|
506
527
|
def failed_zeros(
|
|
507
|
-
metrics: list[Metric], failures: list[tuple[list[Score], Optional[list[str]]]], scores: list[Score]
|
|
528
|
+
metrics: list[Metric], failures: list[tuple[list[Score], Optional[list[str]]]], scores: list[Score],
|
|
529
|
+
names_by_metric: Optional[dict[str, "_Produced"]] = None,
|
|
508
530
|
) -> list[Score]:
|
|
509
531
|
"""The 0.0 Scores ``RunConfig.failed_as_zero`` adds for what failed samples never produced.
|
|
510
532
|
|
|
511
533
|
Only higher-is-better names get one: a lower-is-better metric has no worst value to
|
|
512
534
|
invent. A name the failed sample did score (e.g. an opted-in ``unknown_score``) is kept.
|
|
535
|
+
|
|
536
|
+
``names_by_metric`` records what each metric produced in this run. A metric whose scores carry other
|
|
537
|
+
names (``retrieval`` giving ``recall@k``, ...) is filled by those names, but only by the ones it gave on
|
|
538
|
+
every sample it scored and that are higher-is-better: a name it leaves out when there is nothing to
|
|
539
|
+
measure, or one that is lower-is-better, is not invented. A metric that produced nothing is filled by its
|
|
540
|
+
own name. When two metrics share a score name, the other metric's score on the failed sample counts as
|
|
541
|
+
the name being scored.
|
|
513
542
|
"""
|
|
514
|
-
|
|
515
|
-
|
|
543
|
+
names_by_metric = names_by_metric or {}
|
|
544
|
+
by_name = {m.name: m for m in metrics}
|
|
545
|
+
|
|
546
|
+
def fill_names(metric_name: str) -> list[str]:
|
|
547
|
+
made = names_by_metric.get(metric_name)
|
|
548
|
+
if made is None or not made.samples:
|
|
549
|
+
metric = by_name.get(metric_name)
|
|
550
|
+
return [metric_name] if metric is None or metric.direction == Direction.MAXIMIZE else []
|
|
551
|
+
return sorted(n for n, c in made.names.items() if c == made.samples and n not in made.lower)
|
|
552
|
+
|
|
516
553
|
zeros = []
|
|
517
554
|
for got, names in failures:
|
|
518
555
|
counted = {s.name for s in got if unscored_status(s) is None}
|
|
519
|
-
|
|
520
|
-
|
|
556
|
+
wanted = [m.name for m in metrics] if names is None else names # None: every metric
|
|
557
|
+
targets = list(dict.fromkeys(n for metric_name in wanted for n in fill_names(metric_name)))
|
|
558
|
+
for name in targets:
|
|
559
|
+
if name not in counted:
|
|
521
560
|
zeros.append(Score(name=name, value=0.0, direction=Direction.MAXIMIZE,
|
|
522
561
|
metadata={"failed": True}))
|
|
523
562
|
return zeros
|
|
@@ -576,6 +615,7 @@ class Runner:
|
|
|
576
615
|
failed_count: int = 0
|
|
577
616
|
# per failure: (scores the sample did get, metric names it failed on, None for all)
|
|
578
617
|
failures: list[tuple[list[Score], Optional[list[str]]]] = []
|
|
618
|
+
names_by_metric: dict[str, _Produced] = {}
|
|
579
619
|
latency = LatencyStats()
|
|
580
620
|
throughput = Throughput()
|
|
581
621
|
# Real, provider-reported token counts -- only ever non-zero when a
|
|
@@ -605,10 +645,12 @@ class Runner:
|
|
|
605
645
|
context["trace"] = sample.actual_trace
|
|
606
646
|
scores, prediction = self.score_one(
|
|
607
647
|
spec.metrics, sample, output, context, run_id, errors,
|
|
608
|
-
extracted_by=spec.extracted_by,
|
|
648
|
+
extracted_by=spec.extracted_by, names_by_metric=names_by_metric,
|
|
609
649
|
)
|
|
610
650
|
all_scores.extend(scores)
|
|
611
651
|
predictions.append(prediction)
|
|
652
|
+
if prediction.metadata.get("metric_errors"):
|
|
653
|
+
failures.append((scores, prediction.metadata["metric_errors"]))
|
|
612
654
|
elif has_loglikelihood:
|
|
613
655
|
if not spec.model.supports(Capability.LOGLIKELIHOOD):
|
|
614
656
|
raise CapabilityError(
|
|
@@ -675,6 +717,7 @@ class Runner:
|
|
|
675
717
|
# scoring is structurally disabled here.
|
|
676
718
|
scores, prediction = self.score_one(
|
|
677
719
|
spec.metrics, sample, output, context, run_id, errors, prompt=prompt,
|
|
720
|
+
names_by_metric=names_by_metric,
|
|
678
721
|
)
|
|
679
722
|
all_scores.extend(scores)
|
|
680
723
|
predictions.append(prediction)
|
|
@@ -683,7 +726,9 @@ class Runner:
|
|
|
683
726
|
except Exception as e:
|
|
684
727
|
logger.error("Sample %s failed: %s", sample.id, e)
|
|
685
728
|
failed_count += 1
|
|
686
|
-
|
|
729
|
+
# a missing extra is a setup problem, not the model's answer: not filled with 0.0
|
|
730
|
+
failures.append(([], [] if isinstance(e, ExtraNotInstalled)
|
|
731
|
+
else [m.name for m in spec.metrics if m.applicable(sample)]))
|
|
687
732
|
predictions.append(Prediction(
|
|
688
733
|
run_id=run_id,
|
|
689
734
|
task=getattr(sample, 'task', '') or '',
|
|
@@ -752,7 +797,7 @@ class Runner:
|
|
|
752
797
|
prompt = _prompt_text(reqs[0].prompt) if reqs else None
|
|
753
798
|
scores, prediction = self.score_one(
|
|
754
799
|
spec.metrics, sample, output, context, run_id, errors, prompt=prompt,
|
|
755
|
-
extracted_by=spec.extracted_by,
|
|
800
|
+
extracted_by=spec.extracted_by, names_by_metric=names_by_metric,
|
|
756
801
|
)
|
|
757
802
|
all_scores.extend(scores)
|
|
758
803
|
predictions.append(prediction)
|
|
@@ -761,7 +806,9 @@ class Runner:
|
|
|
761
806
|
except Exception as e:
|
|
762
807
|
logger.error("Sample %s failed: %s", sample.id, e)
|
|
763
808
|
failed_count += 1
|
|
764
|
-
|
|
809
|
+
# a missing extra is a setup problem, not the model's answer: not filled with 0.0
|
|
810
|
+
failures.append(([], [] if isinstance(e, ExtraNotInstalled)
|
|
811
|
+
else [m.name for m in spec.metrics if m.applicable(sample)]))
|
|
765
812
|
predictions.append(Prediction(
|
|
766
813
|
run_id=run_id,
|
|
767
814
|
task=getattr(sample, 'task', '') or '',
|
|
@@ -791,7 +838,7 @@ class Runner:
|
|
|
791
838
|
if str(doc.get("name", "")).startswith(_PARALLEL_SCORES):
|
|
792
839
|
doc["metadata"] = {**doc.get("metadata", {}), "cap_unverified": True}
|
|
793
840
|
if config.failed_as_zero:
|
|
794
|
-
all_scores.extend(self.failed_zeros(spec.metrics, failures, all_scores))
|
|
841
|
+
all_scores.extend(self.failed_zeros(spec.metrics, failures, all_scores, names_by_metric))
|
|
795
842
|
stats = self.aggregate(all_scores)
|
|
796
843
|
unscored = self.unscored_counts(all_scores)
|
|
797
844
|
for name, n in Counter(e["metric"] for e in errors if "metric" in e).items():
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
"""RunConfig.failed_as_zero: failed samples count as 0.0 instead of silently shrinking n."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
|
|
7
|
+
import auditkit as ak
|
|
8
|
+
from auditkit.metric import Metric
|
|
9
|
+
from auditkit.model import Generated, Model, Result_
|
|
10
|
+
from auditkit.score import Direction, Score
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Flaky(Model):
|
|
14
|
+
"""Answers "ok" every time, except the requests whose prompt number is in *fail* (an HTTP 500)."""
|
|
15
|
+
|
|
16
|
+
name = "flaky"
|
|
17
|
+
per_request = True
|
|
18
|
+
|
|
19
|
+
def __init__(self, fail: set[int]) -> None:
|
|
20
|
+
self.fail = fail
|
|
21
|
+
|
|
22
|
+
def generate(self, requests):
|
|
23
|
+
return [
|
|
24
|
+
Result_([Generated(text="", finish_reason="error", error="HTTP 500")])
|
|
25
|
+
if int(r.prompt.removeprefix("q")) in self.fail
|
|
26
|
+
else Result_([Generated(text="ok")])
|
|
27
|
+
for r in requests
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class CrashOn(Metric):
|
|
32
|
+
"""1.0 for every sample, but raises on the sample ids in *bad*."""
|
|
33
|
+
|
|
34
|
+
name = "crashy"
|
|
35
|
+
direction = Direction.MAXIMIZE
|
|
36
|
+
|
|
37
|
+
def __init__(self, bad: set[str]) -> None:
|
|
38
|
+
self.bad = bad
|
|
39
|
+
|
|
40
|
+
def identity(self) -> dict:
|
|
41
|
+
return {"name": self.name, "bad": sorted(self.bad)}
|
|
42
|
+
|
|
43
|
+
def score(self, sample, output, context=None):
|
|
44
|
+
if sample.id in self.bad:
|
|
45
|
+
raise ValueError("boom")
|
|
46
|
+
return Score(name=self.name, value=1.0, direction=self.direction)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class Judge(Metric):
|
|
50
|
+
"""1.0, except an "unknown" verdict on samples 0 and 1 (kept at 0.5 when *keep* opts in)."""
|
|
51
|
+
|
|
52
|
+
name = "judge"
|
|
53
|
+
direction = Direction.MAXIMIZE
|
|
54
|
+
|
|
55
|
+
def __init__(self, keep: bool) -> None:
|
|
56
|
+
self.keep = keep
|
|
57
|
+
|
|
58
|
+
def identity(self) -> dict:
|
|
59
|
+
return {"name": self.name, "keep": self.keep}
|
|
60
|
+
|
|
61
|
+
def score(self, sample, output, context=None):
|
|
62
|
+
if sample.id not in ("0", "1"):
|
|
63
|
+
return Score(name=self.name, value=1.0, direction=self.direction)
|
|
64
|
+
meta = {"unknown": True, **({"count_in_aggregate": True} if self.keep else {})}
|
|
65
|
+
return Score(name=self.name, value=0.5 if self.keep else 0.0, direction=self.direction, metadata=meta)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class Multi(Metric):
|
|
69
|
+
"""Two scores, ``multi_a`` and ``multi_b``, both 1.0; raises on the sample ids in *bad*. Its own name is not a score name."""
|
|
70
|
+
|
|
71
|
+
name = "multi"
|
|
72
|
+
direction = Direction.MAXIMIZE
|
|
73
|
+
|
|
74
|
+
def __init__(self, bad: set[str]) -> None:
|
|
75
|
+
self.bad = bad
|
|
76
|
+
|
|
77
|
+
def identity(self) -> dict:
|
|
78
|
+
return {"name": self.name, "bad": sorted(self.bad)}
|
|
79
|
+
|
|
80
|
+
def score(self, sample, output, context=None):
|
|
81
|
+
if sample.id in self.bad:
|
|
82
|
+
raise ValueError("boom")
|
|
83
|
+
return [Score(name="multi_a", value=1.0, direction=self.direction),
|
|
84
|
+
Score(name="multi_b", value=1.0, direction=self.direction)]
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class Rate(Metric):
|
|
88
|
+
"""A lower-is-better metric: always 0.2."""
|
|
89
|
+
|
|
90
|
+
name = "rate"
|
|
91
|
+
direction = Direction.MINIMIZE
|
|
92
|
+
|
|
93
|
+
def score(self, sample, output, context=None):
|
|
94
|
+
return Score(name=self.name, value=0.2, direction=self.direction)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
@pytest.fixture(autouse=True)
|
|
98
|
+
def _isolated_cache(tmp_path, monkeypatch):
|
|
99
|
+
monkeypatch.setenv("XDG_CACHE_HOME", str(tmp_path))
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def samples(n: int = 10) -> list[ak.Sample]:
|
|
103
|
+
return [ak.Sample(id=str(i), input=f"q{i}", target="ok") for i in range(n)]
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def run(model, metrics, **cfg):
|
|
107
|
+
return ak.evaluate(samples(), model=model, scorers=metrics, config=ak.RunConfig(**cfg))
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def test_default_leaves_failed_samples_out_of_the_mean():
|
|
111
|
+
r = run(Flaky({0, 1, 5, 6}), [ak.Contains("ok")])
|
|
112
|
+
assert r.headline["contains(ok)"] == 1.0 and r.stats["contains(ok)"].count == 6
|
|
113
|
+
assert r.failed_count == 4
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def test_failed_as_zero_counts_model_failures_as_wrong():
|
|
117
|
+
r = run(Flaky({0, 1, 5, 6}), [ak.Contains("ok")], failed_as_zero=True)
|
|
118
|
+
assert r.stats["contains(ok)"].count == 10
|
|
119
|
+
assert r.headline["contains(ok)"] == pytest.approx(0.6)
|
|
120
|
+
assert r.failed_count == 4
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def test_failed_as_zero_counts_a_crashing_metric_as_zero():
|
|
124
|
+
r = ak.evaluate(samples(), model=lambda ps: ["ok"] * len(ps), scorers=[CrashOn({"2", "3"})],
|
|
125
|
+
config=ak.RunConfig(failed_as_zero=True))
|
|
126
|
+
assert r.stats["crashy"].count == 10 and r.headline["crashy"] == pytest.approx(0.8)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
@pytest.mark.parametrize("keep, mean", [(False, 0.8), (True, 0.9)])
|
|
130
|
+
def test_failed_as_zero_zeroes_unknown_results_but_keeps_opted_in_scores(keep, mean):
|
|
131
|
+
r = ak.evaluate(samples(), model=lambda ps: ["ok"] * len(ps), scorers=[Judge(keep)],
|
|
132
|
+
config=ak.RunConfig(failed_as_zero=True))
|
|
133
|
+
assert r.stats["judge"].count == 10 and r.headline["judge"] == pytest.approx(mean)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def test_failed_as_zero_leaves_lower_is_better_metrics_alone():
|
|
137
|
+
r = run(Flaky({0, 1}), [ak.Contains("ok"), Rate()], failed_as_zero=True)
|
|
138
|
+
assert r.stats["contains(ok)"].count == 10
|
|
139
|
+
assert r.stats["rate"].count == 8 and r.headline["rate"] == pytest.approx(0.2)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def test_failed_as_zero_changes_nothing_when_no_sample_fails():
|
|
143
|
+
r = run(Flaky(set()), [ak.Contains("ok")], failed_as_zero=True)
|
|
144
|
+
assert r.headline["contains(ok)"] == 1.0 and r.stats["contains(ok)"].count == 10
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def test_summary_reports_failed_samples_either_way():
|
|
148
|
+
left_out = run(Flaky({0, 1}), [ak.Contains("ok")]).summary()
|
|
149
|
+
assert "2 failed sample(s)" in left_out and "left out of the means" in left_out
|
|
150
|
+
as_zero = run(Flaky({0, 1}), [ak.Contains("ok")], failed_as_zero=True).summary()
|
|
151
|
+
assert "2 failed sample(s)" in as_zero and "counted as 0.0" in as_zero
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def test_summary_is_unchanged_when_nothing_failed():
|
|
155
|
+
assert "failed" not in run(Flaky(set()), [ak.Contains("ok")]).summary()
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def test_a_crashing_multi_score_metric_is_zero_filled_by_its_score_names():
|
|
159
|
+
r = ak.evaluate(samples(), model=lambda ps: ["ok"] * len(ps), scorers=[Multi({"2", "3"})],
|
|
160
|
+
config=ak.RunConfig(failed_as_zero=True))
|
|
161
|
+
assert r.headline["multi_a"] == pytest.approx(0.8) and r.stats["multi_a"].count == 10
|
|
162
|
+
assert r.headline["multi_b"] == pytest.approx(0.8) and r.stats["multi_b"].count == 10
|
|
163
|
+
assert "multi" not in r.headline # its own name is not a score
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def test_a_failed_model_call_does_not_add_a_row_named_after_a_multi_score_metric():
|
|
167
|
+
r = run(Flaky({0, 1}), [Multi(set())], failed_as_zero=True)
|
|
168
|
+
assert "multi" not in r.headline and "multi:" not in r.summary()
|
|
169
|
+
assert r.stats["multi_a"].count == 10 and r.headline["multi_a"] == pytest.approx(0.8)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def test_a_metric_that_never_produced_a_score_is_still_zero_filled_by_its_own_name():
|
|
173
|
+
r = ak.evaluate(samples(2), model=lambda ps: ["ok"] * len(ps), scorers=[CrashOn({"0", "1"})],
|
|
174
|
+
config=ak.RunConfig(failed_as_zero=True))
|
|
175
|
+
assert r.headline["crashy"] == 0.0 and r.stats["crashy"].count == 2
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
class Mixed(Metric):
|
|
179
|
+
"""``mixed_main`` (higher is better) and ``mixed_rate`` (lower is better) on every sample; raises on the ids in *bad*."""
|
|
180
|
+
|
|
181
|
+
name = "mixed"
|
|
182
|
+
direction = Direction.MAXIMIZE
|
|
183
|
+
|
|
184
|
+
def __init__(self, bad: set[str]) -> None:
|
|
185
|
+
self.bad = bad
|
|
186
|
+
|
|
187
|
+
def identity(self) -> dict:
|
|
188
|
+
return {"name": self.name, "bad": sorted(self.bad)}
|
|
189
|
+
|
|
190
|
+
def score(self, sample, output, context=None):
|
|
191
|
+
if sample.id in self.bad:
|
|
192
|
+
raise ValueError("boom")
|
|
193
|
+
return [Score(name="mixed_main", value=1.0, direction=Direction.MAXIMIZE),
|
|
194
|
+
Score(name="mixed_rate", value=1.0, direction=Direction.MINIMIZE)]
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class Sometimes(Metric):
|
|
198
|
+
"""``sometimes_all`` on every sample, ``sometimes_even`` only on even ids; raises on the ids in *bad*."""
|
|
199
|
+
|
|
200
|
+
name = "sometimes"
|
|
201
|
+
direction = Direction.MAXIMIZE
|
|
202
|
+
|
|
203
|
+
def __init__(self, bad: set[str]) -> None:
|
|
204
|
+
self.bad = bad
|
|
205
|
+
|
|
206
|
+
def identity(self) -> dict:
|
|
207
|
+
return {"name": self.name, "bad": sorted(self.bad)}
|
|
208
|
+
|
|
209
|
+
def score(self, sample, output, context=None):
|
|
210
|
+
if sample.id in self.bad:
|
|
211
|
+
raise ValueError("boom")
|
|
212
|
+
out = [Score(name="sometimes_all", value=1.0)]
|
|
213
|
+
if int(sample.id) % 2 == 0:
|
|
214
|
+
out.append(Score(name="sometimes_even", value=1.0))
|
|
215
|
+
return out
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
def test_a_lower_is_better_score_of_a_crashing_metric_is_not_filled_with_the_best_value():
|
|
219
|
+
r = ak.evaluate(samples(), model=lambda ps: ["ok"] * len(ps), scorers=[Mixed({"2", "3"})],
|
|
220
|
+
config=ak.RunConfig(failed_as_zero=True))
|
|
221
|
+
assert r.stats["mixed_main"].count == 10 and r.headline["mixed_main"] == pytest.approx(0.8)
|
|
222
|
+
assert r.stats["mixed_rate"].count == 8 and r.headline["mixed_rate"] == 1.0 # a 0.0 here would read as "no stale hits"
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
def test_a_score_a_metric_leaves_out_on_some_samples_is_not_filled_for_a_failed_one():
|
|
226
|
+
r = ak.evaluate(samples(), model=lambda ps: ["ok"] * len(ps), scorers=[Sometimes({"3"})],
|
|
227
|
+
config=ak.RunConfig(failed_as_zero=True))
|
|
228
|
+
assert r.stats["sometimes_all"].count == 10 and r.headline["sometimes_all"] == pytest.approx(0.9)
|
|
229
|
+
assert r.stats["sometimes_even"].count == 5 and r.headline["sometimes_even"] == 1.0 # sample 3 never had one
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
class OnlyBig(Metric):
|
|
233
|
+
"""``only_big`` applies to the samples whose id is 5 or more; 1.0 there."""
|
|
234
|
+
|
|
235
|
+
name = "only_big"
|
|
236
|
+
direction = Direction.MAXIMIZE
|
|
237
|
+
|
|
238
|
+
def identity(self) -> dict:
|
|
239
|
+
return {"name": self.name}
|
|
240
|
+
|
|
241
|
+
def applicable(self, sample) -> bool:
|
|
242
|
+
return int(sample.id) >= 5
|
|
243
|
+
|
|
244
|
+
def score(self, sample, output, context=None):
|
|
245
|
+
return Score(name="only_big", value=1.0, direction=self.direction)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def test_a_failed_model_call_is_not_zero_filled_for_a_metric_that_does_not_apply_to_it():
|
|
249
|
+
r = run(Flaky({0, 1}), [OnlyBig()], failed_as_zero=True)
|
|
250
|
+
assert r.stats["only_big"].count == 5 and r.headline["only_big"] == 1.0 # samples 0 and 1 were never going to count
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def test_a_crashing_metric_is_zero_filled_on_precomputed_outputs_too():
|
|
254
|
+
samples_ = [ak.Sample(id=str(i), input=f"q{i}", target="ok", actual_output="ok") for i in range(10)]
|
|
255
|
+
r = ak.evaluate(samples_, model="precomputed", scorers=[CrashOn({"0", "1"})],
|
|
256
|
+
config=ak.RunConfig(failed_as_zero=True))
|
|
257
|
+
assert r.stats["crashy"].count == 10 and r.headline["crashy"] == pytest.approx(0.8)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
def _named(model, name):
|
|
261
|
+
model.name = name # a distinct model identity, so the two runs do not share a cache entry
|
|
262
|
+
return model
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
def test_comparison_warning_says_failed_samples_were_counted_as_zero_when_they_were():
|
|
266
|
+
base = run(_named(Flaky(set()), "flaky-a"), [ak.Contains("ok")], failed_as_zero=True)
|
|
267
|
+
cand = run(_named(Flaky({0, 1, 5, 6}), "flaky-b"), [ak.Contains("ok")], failed_as_zero=True)
|
|
268
|
+
comp = ak.RunComparison(base, cand)
|
|
269
|
+
assert comp.failure_summary()["candidate_failed"] == 4
|
|
270
|
+
text = comp.summary()
|
|
271
|
+
assert "counts them as 0.0" in text and "EXCLUDED" not in text
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def test_comparison_warning_still_says_excluded_without_failed_as_zero():
|
|
275
|
+
base = run(_named(Flaky(set()), "flaky-c"), [ak.Contains("ok")])
|
|
276
|
+
cand = run(_named(Flaky({0, 1, 5, 6}), "flaky-d"), [ak.Contains("ok")])
|
|
277
|
+
assert "EXCLUDED from the means" in ak.RunComparison(base, cand).summary()
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
class NeedsExtra(Metric):
|
|
281
|
+
"""Raises the error for a missing optional dependency on every sample."""
|
|
282
|
+
|
|
283
|
+
name = "needs_extra"
|
|
284
|
+
direction = Direction.MAXIMIZE
|
|
285
|
+
|
|
286
|
+
def identity(self) -> dict:
|
|
287
|
+
return {"name": self.name}
|
|
288
|
+
|
|
289
|
+
def score(self, sample, output, context=None):
|
|
290
|
+
from auditkit.errors import ExtraNotInstalled
|
|
291
|
+
raise ExtraNotInstalled("nothing", "pip install auditkit[nothing]")
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
def test_a_missing_extra_is_not_turned_into_a_zero_score():
|
|
295
|
+
r = ak.evaluate(samples(), model=lambda ps: ["ok"] * len(ps), scorers=[NeedsExtra()],
|
|
296
|
+
config=ak.RunConfig(failed_as_zero=True))
|
|
297
|
+
assert r.headline == {} # as without failed_as_zero: a setup problem, not a measured 0.0
|