evalkit-py 0.2.0.dev12__py3-none-any.whl
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.
- evalkit/__init__.py +0 -0
- evalkit/api/__init__.py +0 -0
- evalkit/api/access.py +74 -0
- evalkit/api/agents.py +159 -0
- evalkit/api/app.py +360 -0
- evalkit/api/auth.py +225 -0
- evalkit/api/cli_dist.py +10 -0
- evalkit/api/datasets.py +169 -0
- evalkit/api/deps.py +79 -0
- evalkit/api/download.py +15 -0
- evalkit/api/evaluators.py +121 -0
- evalkit/api/experiments.py +616 -0
- evalkit/api/fixtures.py +95 -0
- evalkit/api/harness_check.py +48 -0
- evalkit/api/imports.py +180 -0
- evalkit/api/limits.py +84 -0
- evalkit/api/llm_providers.py +120 -0
- evalkit/api/mcp/__init__.py +0 -0
- evalkit/api/mcp/auth.py +100 -0
- evalkit/api/mcp/descriptions.py +336 -0
- evalkit/api/mcp/models.py +259 -0
- evalkit/api/mcp/server.py +101 -0
- evalkit/api/mcp/tools.py +844 -0
- evalkit/api/meta.py +19 -0
- evalkit/api/otel.py +350 -0
- evalkit/api/pull.py +197 -0
- evalkit/api/review.py +271 -0
- evalkit/api/runs.py +555 -0
- evalkit/api/server_keys.py +44 -0
- evalkit/api/tokens.py +51 -0
- evalkit/api/trace_imports.py +173 -0
- evalkit/api/trace_sources.py +49 -0
- evalkit/api/traces.py +196 -0
- evalkit/api/users.py +72 -0
- evalkit/api/workspaces.py +131 -0
- evalkit/bundled/contracts/atif-accepted.json +5 -0
- evalkit/bundled/contracts/custom-evaluator-api-v1.json +243 -0
- evalkit/bundled/contracts/harness-api-v1.json +938 -0
- evalkit/bundled/contracts/span-mapping-v1.json +314 -0
- evalkit/bundled/docs/concepts.md +26 -0
- evalkit/bundled/docs/config.md +38 -0
- evalkit/bundled/docs/harness-api.md +44 -0
- evalkit/bundled/docs/install.md +60 -0
- evalkit/bundled/docs/login.md +36 -0
- evalkit/bundled/docs/mappings.md +136 -0
- evalkit/bundled/docs/mcp.md +44 -0
- evalkit/bundled/docs/quickstart.md +142 -0
- evalkit/bundled/docs/sdk-runs.md +171 -0
- evalkit/bundled/docs/tracing.md +171 -0
- evalkit/bundled/docs/try-locally.md +288 -0
- evalkit/bundled/docs/workspaces.md +45 -0
- evalkit/bundled/skills/authoring-eval-cases/SKILL.md +387 -0
- evalkit/bundled/skills/authoring-eval-cases/references/overlays.md +83 -0
- evalkit/bundled/skills/authoring-eval-cases/references/tool-checks.md +71 -0
- evalkit/bundled/skills/connect-traces/SKILL.md +296 -0
- evalkit/bundled/skills/connect-traces/references/gen_ai.json +42 -0
- evalkit/bundled/skills/connect-traces/references/openinference.json +35 -0
- evalkit/bundled/skills/connect-traces/references/span-mapping-schema.md +88 -0
- evalkit/bundled/skills/eval-driven-development/SKILL.md +458 -0
- evalkit/bundled/skills/eval-driven-development/references/analyze-run.md +97 -0
- evalkit/bundled/skills/eval-driven-development/references/diagnose.md +130 -0
- evalkit/bundled/skills/eval-driven-development/references/synthesize-cases.md +87 -0
- evalkit/bundled/skills/eval-driven-development/references/synthesize.md +165 -0
- evalkit/bundled/skills/evalkit-deployment/SKILL.md +332 -0
- evalkit/bundled/skills/evalkit-deployment/config.example.yaml +49 -0
- evalkit/bundled/skills/evalkit-deployment/docker-compose.yml +51 -0
- evalkit/bundled/skills/evalkit-deployment/references/config-and-deploy.md +333 -0
- evalkit/bundled/skills/evalkit-deployment/references/harness-api.md +139 -0
- evalkit/bundled/skills/evalkit-deployment/try/.env.example +11 -0
- evalkit/bundled/skills/evalkit-deployment/try/agent.py +131 -0
- evalkit/bundled/skills/evalkit-deployment/try/cases/acme/balance-sheet/cases.yaml +25 -0
- evalkit/bundled/skills/evalkit-deployment/try/cases/acme/income-statement/cases.yaml +43 -0
- evalkit/bundled/skills/evalkit-deployment/try/config.yaml +17 -0
- evalkit/bundled/skills/evalkit-deployment/try/docker-compose.yml +82 -0
- evalkit/bundled/skills/evalkit-deployment/try/evalkit.yaml +4 -0
- evalkit/bundled/skills/evalkit-deployment/try/mapping.json +42 -0
- evalkit/bundled/skills/evalkit-deployment/try/run.py +33 -0
- evalkit/bundled/skills/evalkit-usage/SKILL.md +509 -0
- evalkit/bundled/skills/evalkit-usage/references/suite-fixtures.md +42 -0
- evalkit/bundled/ui/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- evalkit/bundled/ui/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- evalkit/bundled/ui/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- evalkit/bundled/ui/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- evalkit/bundled/ui/assets/abap-08VXUWAP.js +1 -0
- evalkit/bundled/ui/assets/apex-BWPQTe0t.js +1 -0
- evalkit/bundled/ui/assets/azcli-Bc_sGQ0U.js +1 -0
- evalkit/bundled/ui/assets/bat-i0X4ZdIN.js +1 -0
- evalkit/bundled/ui/assets/bicep-B5-_aFwp.js +2 -0
- evalkit/bundled/ui/assets/cameligo-DMUM7wLl.js +1 -0
- evalkit/bundled/ui/assets/clojure-Cm7r79vr.js +1 -0
- evalkit/bundled/ui/assets/codicon-DF1abBS2.ttf +0 -0
- evalkit/bundled/ui/assets/coffee-Ba7i2nA0.js +1 -0
- evalkit/bundled/ui/assets/cpp-C7h46wYY.js +1 -0
- evalkit/bundled/ui/assets/csharp-BKxtCVv1.js +1 -0
- evalkit/bundled/ui/assets/csp-bTuwJoIa.js +1 -0
- evalkit/bundled/ui/assets/css-DIMkf-bt.js +3 -0
- evalkit/bundled/ui/assets/css.worker-DwfUZ3fB.js +96 -0
- evalkit/bundled/ui/assets/cssMode-C97l1pbB.js +1 -0
- evalkit/bundled/ui/assets/cypher-CVaqCwHa.js +1 -0
- evalkit/bundled/ui/assets/dart-onAF5SnQ.js +1 -0
- evalkit/bundled/ui/assets/dockerfile-DZFCIeNp.js +1 -0
- evalkit/bundled/ui/assets/ecl-94qehhXe.js +1 -0
- evalkit/bundled/ui/assets/editor-DjpsE8to.css +1 -0
- evalkit/bundled/ui/assets/editor.api-NTesIxw5.js +908 -0
- evalkit/bundled/ui/assets/editor.worker-CRz__AKW.js +33 -0
- evalkit/bundled/ui/assets/elixir-6RTg0lbw.js +1 -0
- evalkit/bundled/ui/assets/flow9-C5_-GSwl.js +1 -0
- evalkit/bundled/ui/assets/freemarker2-BWqEFagp.js +3 -0
- evalkit/bundled/ui/assets/fsharp-C8Ef5oNN.js +1 -0
- evalkit/bundled/ui/assets/go-C-y9NEjX.js +1 -0
- evalkit/bundled/ui/assets/graphql-fmXr3nnJ.js +1 -0
- evalkit/bundled/ui/assets/handlebars-DkIF-whN.js +1 -0
- evalkit/bundled/ui/assets/hcl-CpzslTdj.js +1 -0
- evalkit/bundled/ui/assets/html-C_rpeQXJ.js +1 -0
- evalkit/bundled/ui/assets/html.worker-D9ugpX4y.js +509 -0
- evalkit/bundled/ui/assets/htmlMode-B0YIq3DF.js +1 -0
- evalkit/bundled/ui/assets/index-Cw-jBH6M.js +736 -0
- evalkit/bundled/ui/assets/index-DKtoQZtm.css +1 -0
- evalkit/bundled/ui/assets/ini-sBoK_t0W.js +1 -0
- evalkit/bundled/ui/assets/java-BEtHBSE6.js +1 -0
- evalkit/bundled/ui/assets/javascript-D4EGhYA6.js +1 -0
- evalkit/bundled/ui/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- evalkit/bundled/ui/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- evalkit/bundled/ui/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- evalkit/bundled/ui/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- evalkit/bundled/ui/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- evalkit/bundled/ui/assets/json.worker-CV9fqkUp.js +65 -0
- evalkit/bundled/ui/assets/jsonMode-pQjSfIH6.js +7 -0
- evalkit/bundled/ui/assets/julia-Bri6UV-V.js +1 -0
- evalkit/bundled/ui/assets/kotlin-BOotOW0E.js +1 -0
- evalkit/bundled/ui/assets/less-B9JPFI3C.js +2 -0
- evalkit/bundled/ui/assets/lexon-CfSJPG6W.js +1 -0
- evalkit/bundled/ui/assets/liquid-DbrvoYjD.js +1 -0
- evalkit/bundled/ui/assets/lspLanguageFeatures-D0B7cH6y.js +4 -0
- evalkit/bundled/ui/assets/lua-CsQS60Ue.js +1 -0
- evalkit/bundled/ui/assets/m3-D-oSqn_W.js +1 -0
- evalkit/bundled/ui/assets/markdown-Cimd5fb3.js +1 -0
- evalkit/bundled/ui/assets/mdx-B0HrujLR.js +1 -0
- evalkit/bundled/ui/assets/mips-CIPQ_RoX.js +1 -0
- evalkit/bundled/ui/assets/monacoEditor-DsoPncxW.js +68 -0
- evalkit/bundled/ui/assets/monacoEditor-n7clI0si.css +1 -0
- evalkit/bundled/ui/assets/msdax-DauUninz.js +1 -0
- evalkit/bundled/ui/assets/mysql-SOo6toE5.js +1 -0
- evalkit/bundled/ui/assets/objective-c-FvmIjYaQ.js +1 -0
- evalkit/bundled/ui/assets/pascal-DrH0SRf2.js +1 -0
- evalkit/bundled/ui/assets/pascaligo-D-ptJ9y-.js +1 -0
- evalkit/bundled/ui/assets/perl-oz_6vUea.js +1 -0
- evalkit/bundled/ui/assets/pgsql-DTj74zXo.js +1 -0
- evalkit/bundled/ui/assets/php-nr791fC2.js +1 -0
- evalkit/bundled/ui/assets/pla-CopQ2nXW.js +1 -0
- evalkit/bundled/ui/assets/postiats-43DmfD33.js +1 -0
- evalkit/bundled/ui/assets/powerquery-D3hlyOfw.js +1 -0
- evalkit/bundled/ui/assets/powershell-DmHpPYUd.js +1 -0
- evalkit/bundled/ui/assets/protobuf-C531GsRP.js +2 -0
- evalkit/bundled/ui/assets/pug-Z5eAx3Zn.js +1 -0
- evalkit/bundled/ui/assets/python-CieHVM9n.js +1 -0
- evalkit/bundled/ui/assets/qsharp-DkqhCAOL.js +1 -0
- evalkit/bundled/ui/assets/r-BwWrilGY.js +1 -0
- evalkit/bundled/ui/assets/razor-sLewSMyp.js +1 -0
- evalkit/bundled/ui/assets/redis-ClamHrr6.js +1 -0
- evalkit/bundled/ui/assets/redshift-DT7zqm-g.js +1 -0
- evalkit/bundled/ui/assets/restructuredtext-BYgofb2h.js +1 -0
- evalkit/bundled/ui/assets/ruby-DezsRK8O.js +1 -0
- evalkit/bundled/ui/assets/rust-DdL9SqIa.js +1 -0
- evalkit/bundled/ui/assets/sb-CcwsVR0C.js +1 -0
- evalkit/bundled/ui/assets/scala-DHpiXF5c.js +1 -0
- evalkit/bundled/ui/assets/scheme-BeGwcela.js +1 -0
- evalkit/bundled/ui/assets/scss-gp-XZpBa.js +3 -0
- evalkit/bundled/ui/assets/shell-CC2rA5mh.js +1 -0
- evalkit/bundled/ui/assets/solidity-BEEn4gHE.js +1 -0
- evalkit/bundled/ui/assets/sophia-CRfGWb83.js +1 -0
- evalkit/bundled/ui/assets/sparql-D_Lu-MrJ.js +1 -0
- evalkit/bundled/ui/assets/sql-NEE52Syq.js +1 -0
- evalkit/bundled/ui/assets/st-DbInun42.js +1 -0
- evalkit/bundled/ui/assets/swift-Bxkupp3x.js +1 -0
- evalkit/bundled/ui/assets/systemverilog-Bz4Y3fRF.js +1 -0
- evalkit/bundled/ui/assets/tcl-DISqw1ZD.js +1 -0
- evalkit/bundled/ui/assets/ts.worker-DIAQkoB3.js +67741 -0
- evalkit/bundled/ui/assets/tsMode-BcVQ1nu0.js +11 -0
- evalkit/bundled/ui/assets/twig-De2hgUGE.js +1 -0
- evalkit/bundled/ui/assets/typescript-CUvNWd9p.js +1 -0
- evalkit/bundled/ui/assets/typespec-B8J7ngcE.js +1 -0
- evalkit/bundled/ui/assets/vb-DV3o63ZY.js +1 -0
- evalkit/bundled/ui/assets/wgsl-DpFanUEy.js +298 -0
- evalkit/bundled/ui/assets/workers-CwpYQtzp.js +1 -0
- evalkit/bundled/ui/assets/xml-C1HnXMdF.js +1 -0
- evalkit/bundled/ui/assets/yaml-D7Ey3HQu.js +1 -0
- evalkit/bundled/ui/favicon.svg +6 -0
- evalkit/bundled/ui/index.html +14 -0
- evalkit/cli/__init__.py +0 -0
- evalkit/cli/admin_commands.py +590 -0
- evalkit/cli/client.py +67 -0
- evalkit/cli/init_server.py +165 -0
- evalkit/cli/local_run.py +195 -0
- evalkit/cli/main.py +1365 -0
- evalkit/cli/runs_commands.py +539 -0
- evalkit/cli/server_commands.py +130 -0
- evalkit/cli/skill_targets.py +43 -0
- evalkit/cli/tokens_commands.py +52 -0
- evalkit/cli/traces_commands.py +332 -0
- evalkit/cli/update.py +85 -0
- evalkit/client/__init__.py +0 -0
- evalkit/client/agents.py +25 -0
- evalkit/client/api.py +193 -0
- evalkit/client/blob.py +104 -0
- evalkit/client/connection.py +88 -0
- evalkit/client/evaluators.py +11 -0
- evalkit/client/sessions.py +17 -0
- evalkit/client/store.py +139 -0
- evalkit/client/summary.py +46 -0
- evalkit/client/sync.py +198 -0
- evalkit/config.py +227 -0
- evalkit/contracts/__init__.py +0 -0
- evalkit/contracts/atif.py +115 -0
- evalkit/contracts/cases.py +456 -0
- evalkit/contracts/custom_evaluator.py +58 -0
- evalkit/contracts/enums.py +86 -0
- evalkit/contracts/esf.py +120 -0
- evalkit/contracts/harness.py +281 -0
- evalkit/contracts/notes.json +4 -0
- evalkit/contracts/notes.py +7 -0
- evalkit/contracts/settings.py +41 -0
- evalkit/core/__init__.py +0 -0
- evalkit/core/access.py +75 -0
- evalkit/core/agents.py +65 -0
- evalkit/core/blob.py +46 -0
- evalkit/core/capabilities.py +36 -0
- evalkit/core/costmap.py +90 -0
- evalkit/core/custom_eval.py +50 -0
- evalkit/core/data/cost_map.json +81546 -0
- evalkit/core/endpoints.py +31 -0
- evalkit/core/evaluators/__init__.py +29 -0
- evalkit/core/evaluators/base.py +121 -0
- evalkit/core/evaluators/gauges.py +84 -0
- evalkit/core/evaluators/presentation.py +166 -0
- evalkit/core/evaluators/response_time.py +21 -0
- evalkit/core/evaluators/rubrics.py +494 -0
- evalkit/core/evaluators/tool_trajectory.py +187 -0
- evalkit/core/evaluators/trajectory_rubrics.py +198 -0
- evalkit/core/fixtures.py +57 -0
- evalkit/core/harness.py +227 -0
- evalkit/core/harness_check.py +191 -0
- evalkit/core/importer.py +257 -0
- evalkit/core/judge.py +78 -0
- evalkit/core/lint.py +265 -0
- evalkit/core/overlays.py +76 -0
- evalkit/core/paths.py +25 -0
- evalkit/core/promotion.py +94 -0
- evalkit/core/pull.py +198 -0
- evalkit/core/python_eval.py +59 -0
- evalkit/core/remote_evaluators.py +32 -0
- evalkit/core/review.py +220 -0
- evalkit/core/run_digest.py +421 -0
- evalkit/core/runner.py +995 -0
- evalkit/core/scorecard.py +255 -0
- evalkit/core/traces/__init__.py +0 -0
- evalkit/core/traces/convert.py +336 -0
- evalkit/core/traces/importer.py +113 -0
- evalkit/core/traces/mapping.py +385 -0
- evalkit/core/traces/poll.py +38 -0
- evalkit/core/traces/raw.py +21 -0
- evalkit/core/traces/sessions.py +172 -0
- evalkit/core/traces/settle.py +14 -0
- evalkit/core/traces/sources/__init__.py +19 -0
- evalkit/core/traces/sources/base.py +25 -0
- evalkit/core/traces/sources/phoenix.py +121 -0
- evalkit/core/trajectory.py +248 -0
- evalkit/core/workspace.py +30 -0
- evalkit/credentials.py +119 -0
- evalkit/db/__init__.py +0 -0
- evalkit/db/agents.py +289 -0
- evalkit/db/alembic/env.py +90 -0
- evalkit/db/alembic/script.py.mako +28 -0
- evalkit/db/alembic/versions/0011_baseline.py +1002 -0
- evalkit/db/alembic/versions/0012_ticket_token_kind.py +27 -0
- evalkit/db/alembic/versions/0013_keys_and_llm_providers.py +67 -0
- evalkit/db/cases.py +608 -0
- evalkit/db/crypto.py +12 -0
- evalkit/db/evaluators.py +156 -0
- evalkit/db/experiments.py +363 -0
- evalkit/db/fixture_blobs.py +91 -0
- evalkit/db/keys.py +78 -0
- evalkit/db/llm_providers.py +176 -0
- evalkit/db/locks.py +6 -0
- evalkit/db/mappings.py +168 -0
- evalkit/db/models.py +567 -0
- evalkit/db/promotion.py +271 -0
- evalkit/db/rekey.py +46 -0
- evalkit/db/review.py +250 -0
- evalkit/db/review_state.py +50 -0
- evalkit/db/runs.py +533 -0
- evalkit/db/scorecard.py +300 -0
- evalkit/db/session.py +71 -0
- evalkit/db/sessions.py +90 -0
- evalkit/db/spans.py +360 -0
- evalkit/db/store.py +209 -0
- evalkit/db/tokens.py +100 -0
- evalkit/db/trace_imports.py +308 -0
- evalkit/db/trace_sources.py +131 -0
- evalkit/db/users.py +186 -0
- evalkit/db/workspaces.py +232 -0
- evalkit/paths.py +33 -0
- evalkit/sdk/__init__.py +29 -0
- evalkit/sdk/binding.py +69 -0
- evalkit/sdk/evaluators.py +56 -0
- evalkit/sdk/runner.py +957 -0
- evalkit/sdk/tracing.py +166 -0
- evalkit/store/__init__.py +0 -0
- evalkit/store/base.py +354 -0
- evalkit/store/blob.py +69 -0
- evalkit/version.py +44 -0
- evalkit_py-0.2.0.dev12.dist-info/METADATA +205 -0
- evalkit_py-0.2.0.dev12.dist-info/RECORD +371 -0
- evalkit_py-0.2.0.dev12.dist-info/WHEEL +4 -0
- evalkit_py-0.2.0.dev12.dist-info/entry_points.txt +2 -0
- evalkit_py-0.2.0.dev12.dist-info/licenses/LICENSE +661 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import importlib.metadata
|
|
2
|
+
import json
|
|
3
|
+
import shutil
|
|
4
|
+
import sys
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
import typer
|
|
9
|
+
import yaml
|
|
10
|
+
from dotenv import dotenv_values
|
|
11
|
+
|
|
12
|
+
from evalkit import version
|
|
13
|
+
from evalkit.cli.client import ApiError
|
|
14
|
+
from evalkit.paths import skills_root
|
|
15
|
+
|
|
16
|
+
DEFAULT_DIR = Path("evalkit-try")
|
|
17
|
+
ENCRYPTION_KEY_ENV = "EVALKIT_ENCRYPTION_KEY"
|
|
18
|
+
DEFAULT_DATABASE_URL = "postgresql+psycopg://localhost/evalkit"
|
|
19
|
+
DEFAULT_ADMIN_PASSWORD = "evalkit-admin"
|
|
20
|
+
KIT_REQUIREMENT = '"evalkit-py[otel]"'
|
|
21
|
+
KIT_LEAVES_OUT = ("*.whl", "__pycache__", "*.pyc", ".env")
|
|
22
|
+
DOCKER_ONLY = ("docker-compose.yml", ".env.example")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dataclass(frozen=True)
|
|
26
|
+
class Question:
|
|
27
|
+
key: str
|
|
28
|
+
env: str
|
|
29
|
+
prompt: str
|
|
30
|
+
default: str | None = None
|
|
31
|
+
secret: bool = False
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def flag(self) -> str:
|
|
35
|
+
return f"--{self.key.replace('_', '-')}"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
QUESTIONS = (
|
|
39
|
+
Question(
|
|
40
|
+
"database_url",
|
|
41
|
+
"EVALKIT_DATABASE_URL",
|
|
42
|
+
"Postgres URL: where evalkit stores users, cases, experiments and scores "
|
|
43
|
+
"(the database is created if missing)",
|
|
44
|
+
DEFAULT_DATABASE_URL,
|
|
45
|
+
),
|
|
46
|
+
Question(
|
|
47
|
+
"llm_base_url",
|
|
48
|
+
"LLM_BASE_URL",
|
|
49
|
+
"LLM base URL: an OpenAI-compatible endpoint the judge and the sample agent call "
|
|
50
|
+
"(e.g. https://api.openai.com/v1)",
|
|
51
|
+
),
|
|
52
|
+
Question(
|
|
53
|
+
"llm_model",
|
|
54
|
+
"LLM_MODEL",
|
|
55
|
+
"LLM model: the model name at that endpoint (e.g. gpt-4o-mini)",
|
|
56
|
+
),
|
|
57
|
+
Question(
|
|
58
|
+
"llm_api_key",
|
|
59
|
+
"LLM_API_KEY",
|
|
60
|
+
"LLM API key: kept in .env, never in config.yaml",
|
|
61
|
+
secret=True,
|
|
62
|
+
),
|
|
63
|
+
Question(
|
|
64
|
+
"admin_password",
|
|
65
|
+
"EVALKIT_ADMIN_PASSWORD",
|
|
66
|
+
(
|
|
67
|
+
"Admin password: you log in to the web UI and the CLI as `admin` with it; "
|
|
68
|
+
"admin can add users and workspaces and change any setting"
|
|
69
|
+
),
|
|
70
|
+
DEFAULT_ADMIN_PASSWORD,
|
|
71
|
+
secret=True,
|
|
72
|
+
),
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
DATABASE_NOTICE = (
|
|
76
|
+
"evalkit init-server creates the database named in the Postgres URL on that Postgres "
|
|
77
|
+
"server if it does not exist yet, and creates evalkit's tables in it."
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
@dataclass(frozen=True)
|
|
82
|
+
class Answers:
|
|
83
|
+
database_url: str
|
|
84
|
+
llm_base_url: str
|
|
85
|
+
llm_model: str
|
|
86
|
+
llm_api_key: str
|
|
87
|
+
admin_password: str
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def resolve(flags: dict[str, str | None], *, yes: bool) -> Answers:
|
|
91
|
+
values = {}
|
|
92
|
+
for question in QUESTIONS:
|
|
93
|
+
given = flags.get(question.key)
|
|
94
|
+
if given is not None:
|
|
95
|
+
values[question.key] = given
|
|
96
|
+
continue
|
|
97
|
+
if yes:
|
|
98
|
+
if question.default is None:
|
|
99
|
+
raise ApiError(f"{question.flag} (or {question.env}) is required with --yes")
|
|
100
|
+
values[question.key] = question.default
|
|
101
|
+
continue
|
|
102
|
+
values[question.key] = typer.prompt(
|
|
103
|
+
question.prompt,
|
|
104
|
+
default=question.default,
|
|
105
|
+
hide_input=question.secret and sys.stdin.isatty(),
|
|
106
|
+
)
|
|
107
|
+
return Answers(**values)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def kit_root() -> Path:
|
|
111
|
+
return skills_root() / "evalkit-deployment" / "try"
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def _direct_url() -> dict:
|
|
115
|
+
text = importlib.metadata.distribution(version.DISTRIBUTION).read_text("direct_url.json")
|
|
116
|
+
return json.loads(text) if text else {}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def pinned_requirement() -> str:
|
|
120
|
+
direct = _direct_url()
|
|
121
|
+
if direct.get("dir_info", {}).get("editable"):
|
|
122
|
+
return f"evalkit-py[otel] @ {direct['url']}"
|
|
123
|
+
return f"evalkit-py[otel]=={version.current()}"
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def kit_files_in(target: Path) -> list[str]:
|
|
127
|
+
return sorted(path.name for path in kit_root().iterdir() if (target / path.name).exists())
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def copy_kit(target: Path, *, docker: bool) -> None:
|
|
131
|
+
left_out = KIT_LEAVES_OUT if docker else (*KIT_LEAVES_OUT, *DOCKER_ONLY)
|
|
132
|
+
shutil.copytree(
|
|
133
|
+
kit_root(), target, ignore=shutil.ignore_patterns(*left_out), dirs_exist_ok=True
|
|
134
|
+
)
|
|
135
|
+
run_py = target / "run.py"
|
|
136
|
+
run_py.write_text(run_py.read_text().replace(KIT_REQUIREMENT, f'"{pinned_requirement()}"'))
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def server_config(database_url: str, data_dir: Path) -> dict:
|
|
140
|
+
data = yaml.safe_load((kit_root() / "config.yaml").read_text())
|
|
141
|
+
data["db"] = {"url": database_url}
|
|
142
|
+
data["blob"] = {"url": data_dir.resolve().as_uri()}
|
|
143
|
+
return data
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def existing_encryption_key(target: Path) -> str | None:
|
|
147
|
+
return dotenv_values(target / ".env").get(ENCRYPTION_KEY_ENV)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def write_server_files(target: Path, answers: Answers, encryption_key: str | None) -> None:
|
|
151
|
+
config = server_config(answers.database_url, target / "data")
|
|
152
|
+
(target / "config.yaml").write_text(yaml.safe_dump(config, sort_keys=False))
|
|
153
|
+
env = target / ".env"
|
|
154
|
+
env.write_text(
|
|
155
|
+
f"LLM_BASE_URL={answers.llm_base_url}\n"
|
|
156
|
+
f"LLM_MODEL={answers.llm_model}\n"
|
|
157
|
+
f"LLM_API_KEY={answers.llm_api_key}\n"
|
|
158
|
+
f"EVALKIT_ADMIN_PASSWORD={answers.admin_password}\n"
|
|
159
|
+
+ (
|
|
160
|
+
f"{ENCRYPTION_KEY_ENV}={encryption_key}\n"
|
|
161
|
+
if encryption_key
|
|
162
|
+
else f"# {ENCRYPTION_KEY_ENV}=<the encryption_key this database was set up with>\n"
|
|
163
|
+
)
|
|
164
|
+
)
|
|
165
|
+
env.chmod(0o600)
|
evalkit/cli/local_run.py
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Callable
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from evalkit import version
|
|
8
|
+
from evalkit.client.agents import HttpAgents
|
|
9
|
+
from evalkit.client.api import AsyncApi
|
|
10
|
+
from evalkit.client.blob import HttpBlobStore
|
|
11
|
+
from evalkit.client.connection import Connection
|
|
12
|
+
from evalkit.client.evaluators import HttpEvaluators
|
|
13
|
+
from evalkit.client.sessions import HttpSessionReader
|
|
14
|
+
from evalkit.client.store import HttpStore, local_holder
|
|
15
|
+
from evalkit.config import LocalConfig
|
|
16
|
+
from evalkit.contracts.enums import ExperimentStatus
|
|
17
|
+
from evalkit.contracts.settings import JudgeSettings
|
|
18
|
+
from evalkit.core.agents import explicit
|
|
19
|
+
from evalkit.core.harness_check import check_harness
|
|
20
|
+
from evalkit.core.runner import (
|
|
21
|
+
ExperimentRequest,
|
|
22
|
+
RunnerDeps,
|
|
23
|
+
dropped_cases_text,
|
|
24
|
+
harness_capabilities,
|
|
25
|
+
missing_local_keys,
|
|
26
|
+
rescore_experiment,
|
|
27
|
+
run_experiment,
|
|
28
|
+
)
|
|
29
|
+
from evalkit.core.workspace import Reference, slug
|
|
30
|
+
from evalkit.credentials import CredentialRegistry
|
|
31
|
+
from evalkit.store.base import GitRevision, Selection
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def credentials(local: LocalConfig, conn: Connection) -> CredentialRegistry:
|
|
35
|
+
return CredentialRegistry(local.credentials, local.environ(), home=conn.username)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def holder_for(conn: Connection) -> str:
|
|
39
|
+
return local_holder(conn.username or "unknown")
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _deps(
|
|
43
|
+
local: LocalConfig,
|
|
44
|
+
conn: Connection,
|
|
45
|
+
api: AsyncApi,
|
|
46
|
+
exp_id: int,
|
|
47
|
+
progress: Callable[[str], None],
|
|
48
|
+
harness_transport: httpx.AsyncBaseTransport | None,
|
|
49
|
+
custom_eval_transport: httpx.AsyncBaseTransport | None,
|
|
50
|
+
) -> RunnerDeps:
|
|
51
|
+
return RunnerDeps(
|
|
52
|
+
cfg=local,
|
|
53
|
+
store=HttpStore(api),
|
|
54
|
+
blob_store=HttpBlobStore(api, exp_id),
|
|
55
|
+
agents=HttpAgents(api),
|
|
56
|
+
evaluators=HttpEvaluators(api),
|
|
57
|
+
credentials=credentials(local, conn),
|
|
58
|
+
harness_transport=harness_transport,
|
|
59
|
+
custom_eval_transport=custom_eval_transport,
|
|
60
|
+
progress=progress,
|
|
61
|
+
sessions=HttpSessionReader(api),
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
async def run_local(
|
|
66
|
+
conn: Connection,
|
|
67
|
+
local: LocalConfig,
|
|
68
|
+
*,
|
|
69
|
+
agent: Reference,
|
|
70
|
+
dataset_slug: str,
|
|
71
|
+
selection: Selection,
|
|
72
|
+
repetitions: int,
|
|
73
|
+
model: str | None,
|
|
74
|
+
resume: int | None,
|
|
75
|
+
revision: GitRevision,
|
|
76
|
+
progress: Callable[[str], None],
|
|
77
|
+
judge: JudgeSettings | None = None,
|
|
78
|
+
transport: httpx.AsyncBaseTransport | None = None,
|
|
79
|
+
custom_eval_transport: httpx.AsyncBaseTransport | None = None,
|
|
80
|
+
api_transport: httpx.AsyncBaseTransport | None = None,
|
|
81
|
+
) -> int:
|
|
82
|
+
api = AsyncApi(conn.url, conn.token, transport=api_transport)
|
|
83
|
+
holder = holder_for(conn)
|
|
84
|
+
try:
|
|
85
|
+
await api.require_same_version()
|
|
86
|
+
store = HttpStore(api)
|
|
87
|
+
if resume is None:
|
|
88
|
+
definition = await HttpAgents(api).get(explicit(agent))
|
|
89
|
+
caps = await harness_capabilities(
|
|
90
|
+
definition, credentials(local, conn).key_for("agent", definition.ref), transport
|
|
91
|
+
)
|
|
92
|
+
exp, dropped = await store.start_experiment(
|
|
93
|
+
ExperimentRequest(
|
|
94
|
+
dataset=dataset_slug,
|
|
95
|
+
agent=slug(agent),
|
|
96
|
+
selection=selection,
|
|
97
|
+
repetitions=repetitions,
|
|
98
|
+
model=model,
|
|
99
|
+
capabilities=caps,
|
|
100
|
+
cases=revision,
|
|
101
|
+
evalkit_version=version.current(),
|
|
102
|
+
judge=judge,
|
|
103
|
+
holder=holder,
|
|
104
|
+
)
|
|
105
|
+
)
|
|
106
|
+
if dropped:
|
|
107
|
+
progress(dropped_cases_text(dropped))
|
|
108
|
+
else:
|
|
109
|
+
exp = await store.transition(resume, ExperimentStatus.RUNNING, holder)
|
|
110
|
+
progress(f"experiment {exp.id} (#{exp.number} of {exp.dataset})")
|
|
111
|
+
deps = _deps(local, conn, api, exp.id, progress, transport, custom_eval_transport)
|
|
112
|
+
for line in await missing_local_keys(
|
|
113
|
+
deps, await deps.agents.get(explicit(agent)), await store.pinned_cases(exp.id)
|
|
114
|
+
):
|
|
115
|
+
progress(line)
|
|
116
|
+
await run_experiment(deps, exp.id, holder)
|
|
117
|
+
return exp.id
|
|
118
|
+
finally:
|
|
119
|
+
await api.aclose()
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
async def evaluate_local(
|
|
123
|
+
conn: Connection,
|
|
124
|
+
local: LocalConfig,
|
|
125
|
+
exp_id: int,
|
|
126
|
+
*,
|
|
127
|
+
progress: Callable[[str], None],
|
|
128
|
+
custom_eval_transport: httpx.AsyncBaseTransport | None = None,
|
|
129
|
+
api_transport: httpx.AsyncBaseTransport | None = None,
|
|
130
|
+
refetch_trajectories: bool = False,
|
|
131
|
+
) -> None:
|
|
132
|
+
api = AsyncApi(conn.url, conn.token, transport=api_transport)
|
|
133
|
+
holder = holder_for(conn)
|
|
134
|
+
try:
|
|
135
|
+
await api.require_same_version()
|
|
136
|
+
deps = _deps(local, conn, api, exp_id, progress, None, custom_eval_transport)
|
|
137
|
+
await deps.store.transition(exp_id, ExperimentStatus.EVALUATING, holder)
|
|
138
|
+
await rescore_experiment(deps, exp_id, holder, refetch_trajectories=refetch_trajectories)
|
|
139
|
+
finally:
|
|
140
|
+
await api.aclose()
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
async def mark_interrupted(conn: Connection, exp_id: int, user: str) -> None:
|
|
144
|
+
api = AsyncApi(conn.url, conn.token)
|
|
145
|
+
try:
|
|
146
|
+
await HttpStore(api).transition(
|
|
147
|
+
exp_id,
|
|
148
|
+
ExperimentStatus.FAILED,
|
|
149
|
+
holder_for(conn),
|
|
150
|
+
error=f"interrupted: cancelled by {user}",
|
|
151
|
+
)
|
|
152
|
+
finally:
|
|
153
|
+
await api.aclose()
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
async def local_input_schema(
|
|
157
|
+
conn: Connection,
|
|
158
|
+
local: LocalConfig,
|
|
159
|
+
agent: Reference,
|
|
160
|
+
*,
|
|
161
|
+
transport: httpx.AsyncBaseTransport | None = None,
|
|
162
|
+
api_transport: httpx.AsyncBaseTransport | None = None,
|
|
163
|
+
) -> dict:
|
|
164
|
+
api = AsyncApi(conn.url, conn.token, transport=api_transport)
|
|
165
|
+
try:
|
|
166
|
+
definition = await HttpAgents(api).get(explicit(agent))
|
|
167
|
+
finally:
|
|
168
|
+
await api.aclose()
|
|
169
|
+
key = credentials(local, conn).key_for("agent", definition.ref)
|
|
170
|
+
caps = await harness_capabilities(definition, key, transport)
|
|
171
|
+
return caps.effective_input_schema
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
async def check_local(
|
|
175
|
+
conn: Connection,
|
|
176
|
+
local: LocalConfig,
|
|
177
|
+
agent: Reference,
|
|
178
|
+
*,
|
|
179
|
+
transport: httpx.AsyncBaseTransport | None = None,
|
|
180
|
+
api_transport: httpx.AsyncBaseTransport | None = None,
|
|
181
|
+
) -> dict[str, dict]:
|
|
182
|
+
api = AsyncApi(conn.url, conn.token, transport=api_transport)
|
|
183
|
+
try:
|
|
184
|
+
blob_store = HttpBlobStore(api, None)
|
|
185
|
+
definition = await HttpAgents(api).get(explicit(agent))
|
|
186
|
+
return await check_harness(
|
|
187
|
+
definition,
|
|
188
|
+
credentials(local, conn).key_for("agent", definition.ref),
|
|
189
|
+
blob_store,
|
|
190
|
+
transport=transport,
|
|
191
|
+
sessions=HttpSessionReader(api),
|
|
192
|
+
agent_slug=slug(agent),
|
|
193
|
+
)
|
|
194
|
+
finally:
|
|
195
|
+
await api.aclose()
|