niceeval 0.13.1 → 0.13.2
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.
- package/INDEX.md +25 -2
- package/README.md +9 -10
- package/README.zh.md +9 -10
- package/dist/agents/ai-sdk.cjs.map +1 -1
- package/dist/agents/ai-sdk.d.cts +1 -1
- package/dist/agents/ai-sdk.d.mts +1 -1
- package/dist/agents/ai-sdk.d.ts +1 -1
- package/dist/agents/bub-install-spec.cjs +19 -5
- package/dist/agents/bub-install-spec.cjs.map +1 -1
- package/dist/agents/bub-install-spec.d.cts +9 -2
- package/dist/agents/bub-install-spec.d.mts +9 -2
- package/dist/agents/bub-install-spec.d.ts +9 -2
- package/dist/agents/bub-install-spec.js +14 -12
- package/dist/agents/bub.cjs +10 -6
- package/dist/agents/bub.cjs.map +1 -1
- package/dist/agents/bub.d.cts +2 -2
- package/dist/agents/bub.d.mts +2 -2
- package/dist/agents/bub.d.ts +2 -2
- package/dist/agents/claude-code.cjs.map +1 -1
- package/dist/agents/claude-code.d.cts +2 -2
- package/dist/agents/claude-code.d.mts +2 -2
- package/dist/agents/claude-code.d.ts +2 -2
- package/dist/agents/codex.cjs +4 -4
- package/dist/agents/codex.cjs.map +1 -1
- package/dist/agents/codex.d.cts +3 -3
- package/dist/agents/codex.d.mts +3 -3
- package/dist/agents/codex.d.ts +3 -3
- package/dist/agents/coding-cli-versions.cjs +10 -1
- package/dist/agents/coding-cli-versions.cjs.map +1 -1
- package/dist/agents/coding-cli-versions.d.cts +8 -3
- package/dist/agents/coding-cli-versions.d.mts +8 -3
- package/dist/agents/coding-cli-versions.d.ts +8 -3
- package/dist/agents/coding-cli-versions.js +18 -12
- package/dist/agents/deepseek-harness.cjs +151 -0
- package/dist/agents/deepseek-harness.cjs.map +1 -0
- package/dist/agents/deepseek-harness.d.cts +14 -0
- package/dist/agents/deepseek-harness.d.mts +14 -0
- package/dist/agents/deepseek-harness.d.ts +14 -0
- package/dist/agents/deepseek-harness.js +7 -0
- package/dist/agents/deepseek-harness.js.map +1 -0
- package/dist/agents/exact-npm-plugins.cjs +28 -0
- package/dist/agents/exact-npm-plugins.cjs.map +1 -0
- package/dist/agents/exact-npm-plugins.d.cts +10 -0
- package/dist/agents/exact-npm-plugins.d.mts +10 -0
- package/dist/agents/exact-npm-plugins.d.ts +10 -0
- package/dist/agents/exact-npm-plugins.js +8 -0
- package/dist/agents/exact-npm-plugins.js.map +1 -0
- package/dist/agents/index.cjs +5 -1
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/index.d.cts +4 -0
- package/dist/agents/index.d.mts +4 -0
- package/dist/agents/index.d.ts +4 -0
- package/dist/agents/index.js +54 -50
- package/dist/agents/index.mjs +54 -50
- package/dist/agents/omp.cjs +170 -0
- package/dist/agents/omp.cjs.map +1 -0
- package/dist/agents/omp.d.cts +14 -0
- package/dist/agents/omp.d.mts +14 -0
- package/dist/agents/omp.d.ts +14 -0
- package/dist/agents/omp.js +7 -0
- package/dist/agents/omp.js.map +1 -0
- package/dist/agents/openclaw.cjs +51 -2
- package/dist/agents/openclaw.cjs.map +1 -1
- package/dist/agents/openclaw.d.cts +2 -0
- package/dist/agents/openclaw.d.mts +2 -0
- package/dist/agents/openclaw.d.ts +2 -0
- package/dist/agents/types.cjs.map +1 -1
- package/dist/agents/types.d.cts +4 -4
- package/dist/agents/types.d.mts +4 -4
- package/dist/agents/types.d.ts +4 -4
- package/dist/agents/ui-message-stream.cjs +24 -7
- package/dist/agents/ui-message-stream.cjs.map +1 -1
- package/dist/analysis/api.cjs +28 -2
- package/dist/analysis/api.cjs.map +1 -1
- package/dist/analysis/api.d.cts +22 -1
- package/dist/analysis/api.d.mts +22 -1
- package/dist/analysis/api.d.ts +22 -1
- package/dist/analysis/api.js +8 -6
- package/dist/analysis/bindings.cjs +11 -18
- package/dist/analysis/bindings.cjs.map +1 -1
- package/dist/analysis/bindings.d.cts +177 -49
- package/dist/analysis/bindings.d.mts +177 -49
- package/dist/analysis/bindings.d.ts +177 -49
- package/dist/analysis/contracts.cjs +1 -0
- package/dist/analysis/contracts.cjs.map +1 -1
- package/dist/analysis/contracts.d.cts +43 -3
- package/dist/analysis/contracts.d.mts +43 -3
- package/dist/analysis/contracts.d.ts +43 -3
- package/dist/analysis/cost-projection.cjs +2 -1
- package/dist/analysis/cost-projection.cjs.map +1 -1
- package/dist/analysis/cost-projection.d.cts +1 -1
- package/dist/analysis/cost-projection.d.mts +1 -1
- package/dist/analysis/cost-projection.d.ts +1 -1
- package/dist/analysis/cost.cjs +13 -3
- package/dist/analysis/cost.cjs.map +1 -1
- package/dist/analysis/cost.d.cts +10 -3
- package/dist/analysis/cost.d.mts +10 -3
- package/dist/analysis/cost.d.ts +10 -3
- package/dist/analysis/experiment-groups.cjs +96 -0
- package/dist/analysis/experiment-groups.cjs.map +1 -0
- package/dist/analysis/experiment-groups.d.cts +9 -0
- package/dist/analysis/experiment-groups.d.mts +9 -0
- package/dist/analysis/experiment-groups.d.ts +9 -0
- package/dist/analysis/experiment-groups.js +10 -0
- package/dist/analysis/experiment-groups.js.map +1 -0
- package/dist/analysis/index.cjs +4 -1
- package/dist/analysis/index.cjs.map +1 -1
- package/dist/analysis/index.d.cts +4 -2
- package/dist/analysis/index.d.mts +4 -2
- package/dist/analysis/index.d.ts +4 -2
- package/dist/analysis/index.js +40 -36
- package/dist/analysis/index.mjs +40 -36
- package/dist/assertions/limits.cjs +4 -0
- package/dist/assertions/limits.cjs.map +1 -1
- package/dist/assertions/limits.d.cts +4 -0
- package/dist/assertions/limits.d.mts +4 -0
- package/dist/assertions/limits.d.ts +4 -0
- package/dist/assertions/match.cjs +63 -25
- package/dist/assertions/match.cjs.map +1 -1
- package/dist/assertions/match.d.cts +7 -0
- package/dist/assertions/match.d.mts +7 -0
- package/dist/assertions/match.d.ts +7 -0
- package/dist/assertions/record/attachment.cjs +32 -4
- package/dist/assertions/record/attachment.cjs.map +1 -1
- package/dist/assertions/record/diff.cjs +10 -4
- package/dist/assertions/record/diff.cjs.map +1 -1
- package/dist/assertions/record/producer.cjs +101 -4
- package/dist/assertions/record/producer.cjs.map +1 -1
- package/dist/assertions/record/producer.d.cts +4 -1
- package/dist/assertions/record/producer.d.mts +4 -1
- package/dist/assertions/record/producer.d.ts +4 -1
- package/dist/assertions/runtime.cjs +45 -5
- package/dist/assertions/runtime.cjs.map +1 -1
- package/dist/cli/record.cjs +113 -8
- package/dist/cli/record.cjs.map +1 -1
- package/dist/cli/record.d.cts +20 -1
- package/dist/cli/record.d.mts +20 -1
- package/dist/cli/record.d.ts +20 -1
- package/dist/cli/record.js +4 -2
- package/dist/cli.cjs +386 -31
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +10 -2
- package/dist/cli.d.mts +10 -2
- package/dist/cli.d.ts +10 -2
- package/dist/context/send-retry.cjs +4 -4
- package/dist/context/send-retry.cjs.map +1 -1
- package/dist/coordination/host/runtime.cjs +8 -30
- package/dist/coordination/host/runtime.cjs.map +1 -1
- package/dist/coordination/host/runtime.d.cts +3 -3
- package/dist/coordination/host/runtime.d.mts +3 -3
- package/dist/coordination/host/runtime.d.ts +3 -3
- package/dist/coordination/host/types.cjs.map +1 -1
- package/dist/coordination/host/types.d.cts +0 -5
- package/dist/coordination/host/types.d.mts +0 -5
- package/dist/coordination/host/types.d.ts +0 -5
- package/dist/coordination/platform/node.cjs +90 -9
- package/dist/coordination/platform/node.cjs.map +1 -1
- package/dist/define.cjs +25 -1
- package/dist/define.cjs.map +1 -1
- package/dist/experiment/host/index.cjs +1 -0
- package/dist/experiment/host/index.cjs.map +1 -1
- package/dist/i18n/en.cjs +26 -8
- package/dist/i18n/en.cjs.map +1 -1
- package/dist/i18n/en.d.cts +19 -6
- package/dist/i18n/en.d.mts +19 -6
- package/dist/i18n/en.d.ts +19 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/o11y/parsers/hermes.cjs +1 -1
- package/dist/o11y/parsers/hermes.cjs.map +1 -1
- package/dist/o11y/prices.json +1 -1
- package/dist/o11y/record/families.cjs +12 -3
- package/dist/o11y/record/families.cjs.map +1 -1
- package/dist/o11y/record/families.d.cts +8 -8
- package/dist/o11y/record/families.d.mts +8 -8
- package/dist/o11y/record/families.d.ts +8 -8
- package/dist/o11y/record/family-projectors.d.cts +66 -18
- package/dist/o11y/record/family-projectors.d.mts +66 -18
- package/dist/o11y/record/family-projectors.d.ts +66 -18
- package/dist/o11y/record/family-writers.d.cts +11 -3
- package/dist/o11y/record/family-writers.d.mts +11 -3
- package/dist/o11y/record/family-writers.d.ts +11 -3
- package/dist/o11y/record/runner-producer.cjs +14 -4
- package/dist/o11y/record/runner-producer.cjs.map +1 -1
- package/dist/record/codec/core.d.cts +2 -2
- package/dist/record/codec/core.d.mts +2 -2
- package/dist/record/codec/core.d.ts +2 -2
- package/dist/record/family/catalog.d.cts +44 -12
- package/dist/record/family/catalog.d.mts +44 -12
- package/dist/record/family/catalog.d.ts +44 -12
- package/dist/record/family/index.js +128 -124
- package/dist/record/family/observability-v1.cjs +35 -0
- package/dist/record/family/observability-v1.cjs.map +1 -0
- package/dist/record/family/observability-v1.d.cts +3 -0
- package/dist/record/family/observability-v1.d.mts +3 -0
- package/dist/record/family/observability-v1.d.ts +3 -0
- package/dist/record/family/observability-v1.js +6 -0
- package/dist/record/family/observability-v1.js.map +1 -0
- package/dist/record/family/observability.cjs +58 -9
- package/dist/record/family/observability.cjs.map +1 -1
- package/dist/record/family/observability.d.cts +1014 -15
- package/dist/record/family/observability.d.mts +1014 -15
- package/dist/record/family/observability.d.ts +1014 -15
- package/dist/record/family/observability.js +22 -18
- package/dist/record/host/runtime.cjs +600 -31
- package/dist/record/host/runtime.cjs.map +1 -1
- package/dist/record/host/types.cjs.map +1 -1
- package/dist/record/host/types.d.cts +33 -9
- package/dist/record/host/types.d.mts +33 -9
- package/dist/record/host/types.d.ts +33 -9
- package/dist/record/maintenance/runtime.cjs +1 -2
- package/dist/record/maintenance/runtime.cjs.map +1 -1
- package/dist/record/model/core.cjs.map +1 -1
- package/dist/record/model/core.d.cts +1 -1
- package/dist/record/model/core.d.mts +1 -1
- package/dist/record/model/core.d.ts +1 -1
- package/dist/record/model/definition.d.cts +6 -6
- package/dist/record/model/definition.d.mts +6 -6
- package/dist/record/model/definition.d.ts +6 -6
- package/dist/record/model/identifiers.cjs +1 -1
- package/dist/record/model/identifiers.cjs.map +1 -1
- package/dist/record/model/identifiers.d.cts +1 -1
- package/dist/record/model/identifiers.d.mts +1 -1
- package/dist/record/model/identifiers.d.ts +1 -1
- package/dist/record/platform/node.cjs +159 -23
- package/dist/record/platform/node.cjs.map +1 -1
- package/dist/record/platform/services.cjs.map +1 -1
- package/dist/record/platform/services.d.cts +15 -2
- package/dist/record/platform/services.d.mts +15 -2
- package/dist/record/platform/services.d.ts +15 -2
- package/dist/record/reader/errors.cjs +37 -1
- package/dist/record/reader/errors.cjs.map +1 -1
- package/dist/record/reader/errors.d.cts +49 -1
- package/dist/record/reader/errors.d.mts +49 -1
- package/dist/record/reader/errors.d.ts +49 -1
- package/dist/record/reader/errors.js +22 -12
- package/dist/record/reader/format.cjs +76 -17
- package/dist/record/reader/format.cjs.map +1 -1
- package/dist/record/reader/format.d.cts +11 -4
- package/dist/record/reader/format.d.mts +11 -4
- package/dist/record/reader/format.d.ts +11 -4
- package/dist/record/reader/format.js +2 -0
- package/dist/record/reader/index.js +32 -18
- package/dist/record/reader/runtime.cjs +64 -0
- package/dist/record/reader/runtime.cjs.map +1 -1
- package/dist/record/reader/runtime.d.cts +15 -0
- package/dist/record/reader/runtime.d.mts +15 -0
- package/dist/record/reader/runtime.d.ts +15 -0
- package/dist/record/reader/runtime.js +2 -0
- package/dist/report/assets/styles.css +53 -29
- package/dist/report/built-in/analysis-values.cjs +21 -13
- package/dist/report/built-in/analysis-values.cjs.map +1 -1
- package/dist/report/built-in/analysis-values.d.cts +11 -22
- package/dist/report/built-in/analysis-values.d.mts +11 -22
- package/dist/report/built-in/analysis-values.d.ts +11 -22
- package/dist/report/built-in/analysis-values.js +4 -6
- package/dist/report/built-in/index.cjs +1 -3
- package/dist/report/built-in/index.cjs.map +1 -1
- package/dist/report/built-in/index.d.cts +1 -1
- package/dist/report/built-in/index.d.mts +1 -1
- package/dist/report/built-in/index.d.ts +1 -1
- package/dist/report/built-in/index.js +4 -8
- package/dist/report/built-in/index.mjs +4 -8
- package/dist/report/built-in/machine.cjs +0 -2
- package/dist/report/built-in/machine.cjs.map +1 -1
- package/dist/report/built-in/machine.d.cts +0 -2
- package/dist/report/built-in/machine.d.mts +0 -2
- package/dist/report/built-in/machine.d.ts +0 -2
- package/dist/report/built-in/result-components.cjs +49 -51
- package/dist/report/built-in/result-components.cjs.map +1 -1
- package/dist/report/built-in/result-components.d.cts +16 -17
- package/dist/report/built-in/result-components.d.mts +16 -17
- package/dist/report/built-in/result-components.d.ts +16 -17
- package/dist/report/built-in/result-components.js +0 -4
- package/dist/report/built-in/run-membership-overview.cjs +126 -17
- package/dist/report/built-in/run-membership-overview.cjs.map +1 -1
- package/dist/report/built-in/run-membership-overview.d.cts +14 -0
- package/dist/report/built-in/run-membership-overview.d.mts +14 -0
- package/dist/report/built-in/run-membership-overview.d.ts +14 -0
- package/dist/report/built-in/run-membership-overview.js +4 -2
- package/dist/report/built-in/standard.cjs +80 -45
- package/dist/report/built-in/standard.cjs.map +1 -1
- package/dist/report/built-in/standard.d.cts +19 -41
- package/dist/report/built-in/standard.d.mts +19 -41
- package/dist/report/built-in/standard.d.ts +19 -41
- package/dist/report/built-in/standard.js +6 -6
- package/dist/report/components/attempt-detail/compute.cjs +78 -2
- package/dist/report/components/attempt-detail/compute.cjs.map +1 -1
- package/dist/report/components/attempt-detail/compute.d.cts +1 -1
- package/dist/report/components/attempt-detail/compute.d.mts +1 -1
- package/dist/report/components/attempt-detail/compute.d.ts +1 -1
- package/dist/report/components/attempt-detail/content.cjs +1 -1
- package/dist/report/components/attempt-detail/content.cjs.map +1 -1
- package/dist/report/components/entity-lists/compute.cjs +42 -5
- package/dist/report/components/entity-lists/compute.cjs.map +1 -1
- package/dist/report/components/entity-lists/compute.d.cts +10 -8
- package/dist/report/components/entity-lists/compute.d.mts +10 -8
- package/dist/report/components/entity-lists/compute.d.ts +10 -8
- package/dist/report/components/entity-lists/content.cjs +31 -6
- package/dist/report/components/entity-lists/content.cjs.map +1 -1
- package/dist/report/components/entity-lists/index.cjs +9 -4
- package/dist/report/components/entity-lists/index.cjs.map +1 -1
- package/dist/report/components/entity-lists/index.d.cts +4 -7
- package/dist/report/components/entity-lists/index.d.mts +4 -7
- package/dist/report/components/entity-lists/index.d.ts +4 -7
- package/dist/report/components/summaries/compute.cjs +8 -1
- package/dist/report/components/summaries/compute.cjs.map +1 -1
- package/dist/report/components/summaries/compute.d.cts +9 -1
- package/dist/report/components/summaries/compute.d.mts +9 -1
- package/dist/report/components/summaries/compute.d.ts +9 -1
- package/dist/report/components/summaries/index.cjs +48 -4
- package/dist/report/components/summaries/index.cjs.map +1 -1
- package/dist/report/components/summaries/index.d.cts +7 -4
- package/dist/report/components/summaries/index.d.mts +7 -4
- package/dist/report/components/summaries/index.d.ts +7 -4
- package/dist/report/definition/cell.cjs +3 -0
- package/dist/report/definition/cell.cjs.map +1 -1
- package/dist/report/definition/cell.d.cts +2 -0
- package/dist/report/definition/cell.d.mts +2 -0
- package/dist/report/definition/cell.d.ts +2 -0
- package/dist/report/definition/primitives/chart.cjs +8 -5
- package/dist/report/definition/primitives/chart.cjs.map +1 -1
- package/dist/report/definition/primitives/points-dataset.cjs +1 -0
- package/dist/report/definition/primitives/points-dataset.cjs.map +1 -1
- package/dist/report/definition/primitives.cjs +15 -2
- package/dist/report/definition/primitives.cjs.map +1 -1
- package/dist/report/definition/report.cjs +27 -3
- package/dist/report/definition/report.cjs.map +1 -1
- package/dist/report/definition/report.d.cts +8 -0
- package/dist/report/definition/report.d.mts +8 -0
- package/dist/report/definition/report.d.ts +8 -0
- package/dist/report/execution/machine.cjs +30 -14
- package/dist/report/execution/machine.cjs.map +1 -1
- package/dist/report/execution/machine.d.cts +20 -10
- package/dist/report/execution/machine.d.mts +20 -10
- package/dist/report/execution/machine.d.ts +20 -10
- package/dist/report/execution/machine.js +6 -6
- package/dist/report/host/execute.cjs +25 -16
- package/dist/report/host/execute.cjs.map +1 -1
- package/dist/report/host/execute.d.cts +4 -0
- package/dist/report/host/execute.d.mts +4 -0
- package/dist/report/host/execute.d.ts +4 -0
- package/dist/report/host/from-record.cjs +22 -5
- package/dist/report/host/from-record.cjs.map +1 -1
- package/dist/report/host/machine.cjs +53 -11
- package/dist/report/host/machine.cjs.map +1 -1
- package/dist/report/host/site-runtime.cjs +9 -8
- package/dist/report/host/site-runtime.cjs.map +1 -1
- package/dist/report/host/site-runtime.d.cts +1 -1
- package/dist/report/host/site-runtime.d.mts +1 -1
- package/dist/report/host/site-runtime.d.ts +1 -1
- package/dist/report/host/static.cjs +56 -9
- package/dist/report/host/static.cjs.map +1 -1
- package/dist/report/index.cjs.map +1 -1
- package/dist/report/index.d.cts +1 -1
- package/dist/report/index.d.mts +1 -1
- package/dist/report/index.d.ts +1 -1
- package/dist/report/model/dataset.cjs +7 -2
- package/dist/report/model/dataset.cjs.map +1 -1
- package/dist/report/model/locale.cjs +2 -0
- package/dist/report/model/locale.cjs.map +1 -1
- package/dist/report/model/locale.d.cts +1 -0
- package/dist/report/model/locale.d.mts +1 -0
- package/dist/report/model/locale.d.ts +1 -0
- package/dist/report/model/metrics.cjs +3 -1
- package/dist/report/model/metrics.cjs.map +1 -1
- package/dist/report/model/pricing.cjs +16 -11
- package/dist/report/model/pricing.cjs.map +1 -1
- package/dist/report/react/styles.css +53 -29
- package/dist/runner/adoption.cjs +1 -0
- package/dist/runner/adoption.cjs.map +1 -1
- package/dist/runner/attempt.cjs +44 -5
- package/dist/runner/attempt.cjs.map +1 -1
- package/dist/runner/attempt.d.cts +13 -1
- package/dist/runner/attempt.d.mts +13 -1
- package/dist/runner/attempt.d.ts +13 -1
- package/dist/runner/config-identity.cjs +10 -2
- package/dist/runner/config-identity.cjs.map +1 -1
- package/dist/runner/config-identity.d.cts +4 -2
- package/dist/runner/config-identity.d.mts +4 -2
- package/dist/runner/config-identity.d.ts +4 -2
- package/dist/runner/feedback/human.cjs +298 -59
- package/dist/runner/feedback/human.cjs.map +1 -1
- package/dist/runner/feedback/json.cjs +14 -6
- package/dist/runner/feedback/json.cjs.map +1 -1
- package/dist/runner/feedback/json.d.cts +3 -2
- package/dist/runner/feedback/json.d.mts +3 -2
- package/dist/runner/feedback/json.d.ts +3 -2
- package/dist/runner/feedback/reducer.cjs +2 -0
- package/dist/runner/feedback/reducer.cjs.map +1 -1
- package/dist/runner/judge-config.cjs +1 -1
- package/dist/runner/judge-config.cjs.map +1 -1
- package/dist/runner/ledger.cjs +124 -12
- package/dist/runner/ledger.cjs.map +1 -1
- package/dist/runner/project-current.cjs +13 -5
- package/dist/runner/project-current.cjs.map +1 -1
- package/dist/runner/run.cjs +564 -256
- package/dist/runner/run.cjs.map +1 -1
- package/dist/runner/sandbox-pool.cjs +161 -30
- package/dist/runner/sandbox-pool.cjs.map +1 -1
- package/dist/runner/sandbox-pool.d.cts +34 -2
- package/dist/runner/sandbox-pool.d.mts +34 -2
- package/dist/runner/sandbox-pool.d.ts +34 -2
- package/dist/runner/shared-state-lease.cjs +803 -0
- package/dist/runner/shared-state-lease.cjs.map +1 -0
- package/dist/runner/shared-state-lease.d.cts +121 -0
- package/dist/runner/shared-state-lease.d.mts +121 -0
- package/dist/runner/shared-state-lease.d.ts +121 -0
- package/dist/runner/shared-state-lease.js +24 -0
- package/dist/runner/shared-state-lease.js.map +1 -0
- package/dist/runner/teardown-registry.cjs +97 -34
- package/dist/runner/teardown-registry.cjs.map +1 -1
- package/dist/runner/teardown-registry.d.cts +27 -1
- package/dist/runner/teardown-registry.d.mts +27 -1
- package/dist/runner/teardown-registry.d.ts +27 -1
- package/dist/runner/teardown-registry.js +20 -16
- package/dist/runner/types.cjs.map +1 -1
- package/dist/runner/types.d.cts +31 -5
- package/dist/runner/types.d.mts +31 -5
- package/dist/runner/types.d.ts +31 -5
- package/dist/sample/analysis.cjs +249 -459
- package/dist/sample/analysis.cjs.map +1 -1
- package/dist/sample/capability.cjs +138 -7
- package/dist/sample/capability.cjs.map +1 -1
- package/dist/sample/capability.d.cts +3 -1
- package/dist/sample/capability.d.mts +3 -1
- package/dist/sample/capability.d.ts +3 -1
- package/dist/sample/capability.js +8 -6
- package/dist/sandbox/docker-agent-image.cjs +5 -1
- package/dist/sandbox/docker-agent-image.cjs.map +1 -1
- package/dist/sandbox/docker-agent-image.d.cts +2 -0
- package/dist/sandbox/docker-agent-image.d.mts +2 -0
- package/dist/sandbox/docker-agent-image.d.ts +2 -0
- package/dist/sandbox/docker-agent-image.js +14 -10
- package/dist/sandbox/docker-profile/schema.cjs +283 -534
- package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
- package/dist/sandbox/docker-profile/schema.d.cts +10 -27
- package/dist/sandbox/docker-profile/schema.d.mts +10 -27
- package/dist/sandbox/docker-profile/schema.d.ts +10 -27
- package/dist/sandbox/e2b-agent-template.cjs +5 -2
- package/dist/sandbox/e2b-agent-template.cjs.map +1 -1
- package/dist/sandbox/index.cjs +4 -2
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.d.cts +1 -1
- package/dist/sandbox/index.d.mts +1 -1
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/index.js +120 -116
- package/dist/sandbox/index.mjs +120 -116
- package/dist/sandbox/keep-registry.cjs +28 -66
- package/dist/sandbox/keep-registry.cjs.map +1 -1
- package/dist/sandbox/types.cjs.map +1 -1
- package/dist/sandbox/types.d.cts +1 -1
- package/dist/sandbox/types.d.mts +1 -1
- package/dist/sandbox/types.d.ts +1 -1
- package/dist/shared/aggregate.cjs +16 -6
- package/dist/shared/aggregate.cjs.map +1 -1
- package/dist/shared/aggregate.d.cts +12 -4
- package/dist/shared/aggregate.d.mts +12 -4
- package/dist/shared/aggregate.d.ts +12 -4
- package/dist/shared/turn-label.cjs +20 -2
- package/dist/shared/turn-label.cjs.map +1 -1
- package/dist/shared/turn-label.d.cts +2 -0
- package/dist/shared/turn-label.d.mts +2 -0
- package/dist/shared/turn-label.d.ts +2 -0
- package/dist/shared/turn-label.js +4 -2
- package/dist/vendor/remark/remark-gfm.cjs +7 -7
- package/dist/vendor/remark/remark-gfm.cjs.map +1 -1
- package/dist/vendor/remark/remark-parse.cjs +12 -12
- package/dist/vendor/remark/remark-parse.cjs.map +1 -1
- package/dist/vendor/remark/remark.cjs +13 -13
- package/dist/vendor/remark/remark.cjs.map +1 -1
- package/dist/view/server.cjs +6 -0
- package/dist/view/server.cjs.map +1 -1
- package/docs-site/images/hitl-handshake-zh.svg +3 -3
- package/docs-site/zh/examples/ai-agent-application.mdx +1 -1
- package/docs-site/zh/examples/coding-agent-extensions.mdx +1 -1
- package/docs-site/zh/examples/integrations/ai-sdk-v7.mdx +4 -3
- package/docs-site/zh/examples/integrations/claude-sdk.mdx +3 -3
- package/docs-site/zh/examples/integrations/codex-sdk.mdx +5 -5
- package/docs-site/zh/examples/integrations/langgraph.mdx +4 -4
- package/docs-site/zh/examples/integrations/pi-sdk.mdx +5 -5
- package/docs-site/zh/explanation/adapter.mdx +5 -5
- package/docs-site/zh/explanation/assert.mdx +7 -7
- package/docs-site/zh/explanation/drive.mdx +4 -2
- package/docs-site/zh/explanation/evals.mdx +10 -8
- package/docs-site/zh/explanation/experiment.mdx +2 -2
- package/docs-site/zh/explanation/hitl.mdx +9 -9
- package/docs-site/zh/explanation/judge.mdx +5 -5
- package/docs-site/zh/explanation/overview.mdx +3 -3
- package/docs-site/zh/explanation/runner.mdx +1 -1
- package/docs-site/zh/index.mdx +3 -3
- package/docs-site/zh/reference/builtin-agents.mdx +13 -13
- package/docs-site/zh/reference/capabilities.mdx +1 -1
- package/docs-site/zh/reference/cli.mdx +18 -12
- package/docs-site/zh/reference/define-agent.mdx +130 -5
- package/docs-site/zh/reference/define-config.mdx +2 -2
- package/docs-site/zh/reference/define-eval.mdx +4 -4
- package/docs-site/zh/reference/events.mdx +11 -11
- package/docs-site/zh/reference/official-adapters.mdx +6 -6
- package/docs-site/zh/reference/results-data.mdx +6 -0
- package/docs-site/zh/troubleshooting/debugging.mdx +1 -1
- package/docs-site/zh/troubleshooting/recover-after-kill.mdx +37 -5
- package/docs-site/zh/tutorials/accept-results.mdx +72 -0
- package/docs-site/zh/tutorials/agent-onboarding.mdx +6 -6
- package/docs-site/zh/tutorials/authoring.mdx +9 -13
- package/docs-site/zh/tutorials/ci-integration.mdx +6 -6
- package/docs-site/zh/tutorials/compare-runs.mdx +61 -0
- package/docs-site/zh/tutorials/concurrency.mdx +13 -12
- package/docs-site/zh/tutorials/configuration.mdx +4 -6
- package/docs-site/zh/tutorials/connect-your-agent.mdx +1 -1
- package/docs-site/zh/tutorials/control-run-cost.mdx +58 -0
- package/docs-site/zh/tutorials/criteria-files.mdx +2 -2
- package/docs-site/zh/tutorials/custom-reports.mdx +2 -2
- package/docs-site/zh/tutorials/debug-lifecycle-plan.mdx +46 -0
- package/docs-site/zh/tutorials/docker-in-docker.mdx +52 -43
- package/docs-site/zh/tutorials/eval-groups.mdx +6 -6
- package/docs-site/zh/tutorials/evaluation-kinds.mdx +3 -3
- package/docs-site/zh/tutorials/experiments.mdx +2 -3
- package/docs-site/zh/tutorials/handle-execution-failures.mdx +18 -10
- package/docs-site/zh/tutorials/install-custom-sandbox-agent.mdx +16 -8
- package/docs-site/zh/tutorials/nixos-managed-dind.mdx +160 -0
- package/docs-site/zh/tutorials/plugins.mdx +14 -0
- package/docs-site/zh/tutorials/rerun-and-cache.mdx +4 -2
- package/docs-site/zh/tutorials/sandbox-agent.mdx +17 -11
- package/docs-site/zh/tutorials/sandbox-providers.mdx +17 -13
- package/docs-site/zh/tutorials/sandbox-reuse.mdx +12 -19
- package/docs-site/zh/tutorials/select-and-preview.mdx +65 -0
- package/docs-site/zh/tutorials/verify-judge.mdx +78 -0
- package/docs-site/zh/tutorials/viewing-results.mdx +38 -1
- package/docs-site/zh/tutorials/write-experiment.mdx +7 -5
- package/docs-site/zh/tutorials/write-send.mdx +9 -8
- package/package.json +9 -5
- package/dist/report/built-in/overview.cjs +0 -44
- package/dist/report/built-in/overview.cjs.map +0 -1
- package/dist/report/built-in/overview.d.cts +0 -6
- package/dist/report/built-in/overview.d.mts +0 -6
- package/dist/report/built-in/overview.d.ts +0 -6
- package/dist/report/built-in/overview.js +0 -9
- package/dist/report/built-in/overview.js.map +0 -1
- package/dist/runner/gate-lease.cjs +0 -283
- package/dist/runner/gate-lease.cjs.map +0 -1
- package/dist/runner/gate-lease.d.cts +0 -62
- package/dist/runner/gate-lease.d.mts +0 -62
- package/dist/runner/gate-lease.d.ts +0 -62
- package/dist/runner/gate-lease.js +0 -22
- package/dist/runner/gate-lease.js.map +0 -1
|
@@ -8,7 +8,7 @@ CI 运行 Experiment 时,进程退出状态决定门禁是否通过。`--json`
|
|
|
8
8
|
|
|
9
9
|
## 基本命令
|
|
10
10
|
|
|
11
|
-
只要存在 mismatched 的 Boolean condition
|
|
11
|
+
只要存在 mismatched 的 Boolean condition、低于明确 `.gate(n)` 阈值的 measurement 或执行错误,[NiceEval](https://niceeval.com/) 就以非零状态码退出。`.atLeast(n)` 只记录局部 condition,本身不改变判定或退出状态。需要阻止合并的要求直接写在评估用例源码中,CI 与本地运行读取同一套判定。
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
14
|
npx niceeval exp ci --json --junit ./artifacts/niceeval-junit.xml
|
|
@@ -36,11 +36,11 @@ JUnit 和外部平台文件不拥有 Record。Verdict、Usage、断言和诊断
|
|
|
36
36
|
exit "${PIPESTATUS[0]}"
|
|
37
37
|
|
|
38
38
|
- name: 上传 JUnit
|
|
39
|
-
if: always()
|
|
40
|
-
uses: actions/upload-artifact@v4
|
|
41
|
-
with:
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
if: always()
|
|
40
|
+
uses: actions/upload-artifact@v4
|
|
41
|
+
with:
|
|
42
|
+
name: niceeval-junit
|
|
43
|
+
path: ./artifacts/niceeval-junit.xml
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
将模型凭据作为 CI secret 注入命令运行所需的变量。不要把凭据写入 Experiment、receipt、JUnit 或日志。
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "比较多个固定 Run"
|
|
3
|
+
sidebarTitle: "比较多个 Run"
|
|
4
|
+
description: "用明确 Run ID 固定比较分母,核对结果覆盖,再比较通过率、得分、成本与时长,而不让新结果改变已打开的比较。"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
比较模型、提示词或 Agent 版本时,先固定要看的 Run。不要用“最新结果”代替实验边界;新 Run 发布后不应悄悄改变已经开始的比较。
|
|
8
|
+
|
|
9
|
+
## 取得每次运行的 Run ID
|
|
10
|
+
|
|
11
|
+
TTY 完成反馈会显示 Run ID。机器流程从 `exp --json` 最后一条 receipt 读取 `runIds`:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
pnpm exec niceeval exp baseline --json > baseline.ndjson
|
|
15
|
+
pnpm exec niceeval exp candidate --json > candidate.ndjson
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
保留这两个固定 ID。它们定义比较使用的计划与 expected-slot 分母。
|
|
19
|
+
|
|
20
|
+
## 先分别核对结果覆盖
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
pnpm exec niceeval show --run <baseline-run-id>
|
|
24
|
+
pnpm exec niceeval show --run <candidate-run-id>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
先看每个 Run 有多少位置是已执行、自动沿用、人工采用、未派发或中断。结果覆盖不足时,不要把缺失位置当成失败、零分或成功。
|
|
28
|
+
|
|
29
|
+
如果一个 Run 因预算、首过即停或部分采用留下 `not-dispatched`,应先决定补跑、接受不完整分母,还是只比较两边共同且明确的范围。
|
|
30
|
+
|
|
31
|
+
## 在同一个固定选择中比较
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
pnpm exec niceeval show \
|
|
35
|
+
--run <baseline-run-id> \
|
|
36
|
+
--run <candidate-run-id>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
浏览器需要完整页面时使用同一组参数:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
pnpm exec niceeval view \
|
|
43
|
+
--run <baseline-run-id> \
|
|
44
|
+
--run <candidate-run-id>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
通过制评估比较通过率,计分制评估比较 earned score。混合 Experiment 分别保留两种主读数,不把它们合成一个百分比。
|
|
48
|
+
|
|
49
|
+
成本和时长只在有完整 Observability 时比较。缺失、部分采集或不支持的数据必须保持可见,不能填成零。
|
|
50
|
+
|
|
51
|
+
## 下钻差异来源
|
|
52
|
+
|
|
53
|
+
从 Run 页面复制 Attempt locator:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
pnpm exec niceeval show @1K1P0VJAPVJ12
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
详情页用于核对 Assertion、Judge 理由、工具调用、用量、时间和 File Changes。Run 页面解释本次位置为何使用该 Attempt;Attempt 页面解释这次执行实际发生了什么。
|
|
60
|
+
|
|
61
|
+
需要自定义分组、成本 Profile 或专用页面时,继续阅读[编写自定义报告](/zh/tutorials/custom-reports)。
|
|
@@ -65,7 +65,7 @@ import { Picker, Schedule } from '/snippets/widgets.jsx';
|
|
|
65
65
|
| --- | --- | --- | --- |
|
|
66
66
|
| 全局并发位 | `--max-concurrency`,或 `niceeval.config.ts` 的 `maxConcurrency` | 本次运行的总吞吐 | 各算各的,两个终端的值相加 |
|
|
67
67
|
| 实验并发上限 | 实验文件的 `maxConcurrency` | 这一个实验同时跑几条 | 各算各的,两个终端的值相加 |
|
|
68
|
-
| 共享状态租约 | 实验文件的 `sharedState.key` | 同一 checkpoint
|
|
68
|
+
| 共享状态租约 | 实验文件的 `sharedState.key` | 同一 checkpoint 的完整恢复、执行与回存区间 | 同 key 的区间串行 |
|
|
69
69
|
|
|
70
70
|
全局值的解析顺序是 `--max-concurrency` → 配置里的 `maxConcurrency` → 当前 Sandbox Provider 的推荐默认值(`docker` 10、`e2b` 20、`vercel` 1、`local` 1)。推荐值反映的是 Provider 侧的约束。你自己 Agent 接口的限速用 `--max-concurrency` 压。
|
|
71
71
|
|
|
@@ -147,10 +147,11 @@ export default defineExperiment({
|
|
|
147
147
|
});
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
`maxConcurrency: 1` 只串行本 Invocation 的 Attempt。`sharedState.key`
|
|
151
|
-
租约在 Experiment 和 Sandbox 的 `setup` 之前取得,到 Sandbox `teardown`、Provider finalizer 与 Experiment `teardown` 完成后才释放。等待方不创建 Sandbox。租约释放后,等待方继续自己的既定计划;它不读取或沿用另一 Record 的结果。
|
|
150
|
+
`maxConcurrency: 1` 只串行本 Invocation 的 Attempt。`sharedState.key` 会在同一项目 Coordination 域内保护跨 Invocation 的同一 checkpoint。租约在 Experiment 与 Sandbox `setup` 前取得,直到 Sandbox `teardown`、Provider finalizer 和 Experiment `teardown` 全部完成才释放。等待方不会提前创建 Sandbox;拿到租约后继续自己的计划,不读取或沿用另一个 Run 的结果。
|
|
152
151
|
|
|
153
|
-
`sharedState`
|
|
152
|
+
`sharedState` 只提供互斥,不负责 checkpoint 存储、原子提交、回滚或强杀后的半次写入恢复。能原子回存时应原子回存,否则换新 key,从干净 cohort 重建。跨机器协调仍归外部编排。
|
|
153
|
+
|
|
154
|
+
NiceEval 不会根据超时、PID 或 heartbeat 自动接管租约。原 owner 暂停时仍然拥有租约;强杀或 cleanup 失败后,等待方继续阻塞,避免两条 Invocation 同时改同一份状态。确认原 owner 已终止、外部状态已静止后,按[运行被强杀后恢复](/zh/troubleshooting/recover-after-kill#恢复共享状态租约)里的公开命令检查 owner token,并显式恢复。
|
|
154
155
|
|
|
155
156
|
只有一个 Agent 服务频繁限流时,同样在这个实验上设 `maxConcurrency: N`,不要去降全局上限——降全局会连累同批其它实验。实验级并发上限退避时不放行第 N+1 条,所以服务不会在已经限流时继续被加压。
|
|
156
157
|
|
|
@@ -170,7 +171,7 @@ const fixtures = new WeakMap<Sandbox, { repoUrl: string; destroy(): Promise<void
|
|
|
170
171
|
Attempt,并复用至多一台 Sandbox;不同组和未分组评估用例继续竞争剩余并发位。你不需要把
|
|
171
172
|
整个 Experiment 设成 `maxConcurrency: 1`。
|
|
172
173
|
|
|
173
|
-
`evals` 数组只声明成员,不声明业务顺序。Runner
|
|
174
|
+
`evals` 数组只声明成员,不声明业务顺序。Runner 按规范化评估用例 ID 稳定串行;
|
|
174
175
|
`attempts > 1` 时,同一成员需要真实派发的各次 Attempt 连续进入组内泳道。完整目录、
|
|
175
176
|
Experiment 写法和 `--dry` 输出见[用评估组复用 Sandbox](/zh/tutorials/eval-groups)。
|
|
176
177
|
|
|
@@ -195,23 +196,23 @@ export default defineExperiment({
|
|
|
195
196
|
});
|
|
196
197
|
```
|
|
197
198
|
|
|
198
|
-
##
|
|
199
|
+
## 多开终端时共用 Record
|
|
199
200
|
|
|
200
|
-
同一 Record root
|
|
201
|
+
同一 Record root 允许多个 append writer 并发,但不会让两条 Invocation 自动分工。确认本机、Provider 和 Agent 服务还有余量时,两个终端可以使用同一个 root:
|
|
201
202
|
|
|
202
203
|
```bash
|
|
203
|
-
niceeval exp compare --record .niceeval/record
|
|
204
|
-
niceeval exp compare --record .niceeval/record
|
|
204
|
+
niceeval exp compare --record .niceeval/record --max-concurrency 2
|
|
205
|
+
niceeval exp compare --record .niceeval/record --max-concurrency 2
|
|
205
206
|
```
|
|
206
207
|
|
|
207
|
-
|
|
208
|
+
两边各自规划完整选择,可能重复执行相同评估用例,因为双方都不会读取对方尚未发布的 Attempt。完整 Run 会原子发布到共享 Record。只有确实需要隔离 Run、Sample 与 Report 时才使用不同 root;NiceEval 不自动合并分开的 root。
|
|
208
209
|
|
|
209
210
|
三个边界:
|
|
210
211
|
|
|
211
212
|
- 两边的 CLI 上限会相加,Provider 容量不会。配额紧张时把两边都调低。
|
|
212
213
|
- 实验自己的 `maxConcurrency` 也是每个终端各算各的:两条命令都声明 3 时,合计最多跑六条。
|
|
213
|
-
- 两个终端的 Sandbox 池也各自独立。只有确实共享外部 checkpoint 时才声明 `sharedState.key
|
|
214
|
-
-
|
|
214
|
+
- 两个终端的 Sandbox 池也各自独立。只有确实共享外部 checkpoint 时才声明 `sharedState.key`;它不会合并 Record。
|
|
215
|
+
- 并发 append writer 可以共用 root。Record maintenance 仍然独占;遇到 `record-maintenance-busy` 时,先停掉 reader 和 writer 再重试。
|
|
215
216
|
|
|
216
217
|
## 边界
|
|
217
218
|
|
|
@@ -15,7 +15,7 @@ import { ConfigLayers } from '/snippets/diagram-config-layers.jsx';
|
|
|
15
15
|
|
|
16
16
|
## 配置:想让这个值活多久,就写在哪一层
|
|
17
17
|
|
|
18
|
-
同一个值出现在多层时,按 **CLI flag → experiment →
|
|
18
|
+
同一个值出现在多层时,按 **CLI flag → experiment → 评估用例 → config → 内置默认** 取,前面有值就不看后面。config 是默认来源,不是覆盖层——评估用例自己声明的 `timeoutMs` 不会被项目默认压掉。
|
|
19
19
|
|
|
20
20
|
<ConfigLayers />
|
|
21
21
|
|
|
@@ -79,10 +79,8 @@ export default defineConfig({
|
|
|
79
79
|
| --- | --- | --- |
|
|
80
80
|
| `ANTHROPIC_API_KEY` | `claudeCodeAgent()` | 工厂参数 `apiKey` 可覆盖 |
|
|
81
81
|
| `ANTHROPIC_BASE_URL` | `claudeCodeAgent()` | 网关地址,工厂参数 `baseUrl` 可覆盖 |
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
| `BUB_API_KEY` | `bubAgent()` | 工厂参数 `apiKey` 可覆盖 |
|
|
85
|
-
| `BUB_API_BASE` | `bubAgent()` | 工厂参数 `apiBase` 可覆盖 |
|
|
82
|
+
| `OPENAI_API_KEY` | `codexAgent()`、`bubAgent()` | 工厂参数 `apiKey` 可覆盖 |
|
|
83
|
+
| `OPENAI_BASE_URL` | `codexAgent()`、`bubAgent()` | OpenAI 兼容代理地址,工厂参数 `baseUrl` / `apiBase` 可覆盖 |
|
|
86
84
|
| `OPENCLAW_API_KEY` / `OPENCLAW_BASE_URL` | `openClawAgent()` | key 省略时回落 `ANTHROPIC_API_KEY` |
|
|
87
85
|
| `OPENCODE_API_KEY` / `OPENCODE_BASE_URL` | `openCodeAgent()` | key 省略时回落 `ANTHROPIC_API_KEY` |
|
|
88
86
|
| `HERMES_API_KEY` / `HERMES_API_BASE` | `hermesAgent()` | key 省略时依次回落 `OPENROUTER_API_KEY`、`ANTHROPIC_API_KEY` |
|
|
@@ -148,7 +146,7 @@ NICEEVAL_JUDGE_KEY=sk-...
|
|
|
148
146
|
| Judge 模型与端点 | config 或评估用例的 `judge.model` / `judge.baseUrl` |
|
|
149
147
|
| OTel 接收地址 | config 的 `telemetry: { host, port }` |
|
|
150
148
|
|
|
151
|
-
Judge
|
|
149
|
+
Judge 默认从 `NICEEVAL_JUDGE_KEY` 读取 key,也可以改读 `judge.apiKeyEnv` 指定的变量;端点只从 `judge.baseUrl` 读。它不会借用被测应用的 `OPENAI_API_KEY`。
|
|
152
150
|
|
|
153
151
|
## 接着看
|
|
154
152
|
|
|
@@ -18,7 +18,7 @@ description: "写一个 Adapter、配置一个 Experiment,并运行第一条
|
|
|
18
18
|
评估 Claude Code / Codex / bub 这种独立的 Agent:用内置 Sandbox Agent。
|
|
19
19
|
</Card>
|
|
20
20
|
<Card title="其它 AI Agent" icon="plug">
|
|
21
|
-
自己的 Agent 需要 [编写 Send](/zh/tutorials/write-send)。如应用已有 OTel 埋点,可
|
|
21
|
+
自己的 Agent 需要 [编写 Send](/zh/tutorials/write-send)。如应用已有 OTel 埋点,可[接入 OTel](/zh/tutorials/connect-otel)。
|
|
22
22
|
</Card>
|
|
23
23
|
</CardGroup>
|
|
24
24
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "控制一次运行的成本"
|
|
3
|
+
sidebarTitle: "控制运行成本"
|
|
4
|
+
description: "用 attempts、首过即停、budget、并发和结果沿用分别控制统计样本、停止派发、花费保护与资源占用。"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
控制成本前先判断你要减少什么。不同开关回答不同问题,不能互相替代。
|
|
8
|
+
|
|
9
|
+
| 目标 | 使用方式 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| 测完整稳定性分布 | 设置 `attempts: N`,默认跑满。 |
|
|
12
|
+
| 只确认至少能成功一次 | 使用 `--early-exit`。 |
|
|
13
|
+
| 给每个 Experiment 的花费加保护 | 使用 `--budget <美元>`。 |
|
|
14
|
+
| 限制同时占用的资源 | 使用 `--max-concurrency <数量>`。 |
|
|
15
|
+
| 跳过没有受影响的结果 | 使用默认沿用或 `--rerun`。 |
|
|
16
|
+
| 分摊 Sandbox 创建和准备成本 | 使用 `sandboxReuse`。 |
|
|
17
|
+
|
|
18
|
+
## 先预览运行矩阵
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
pnpm exec niceeval exp regression --dry
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
先确认评估用例数量、Experiment 数量和 Attempt 数量。`--dry` 不预测最终模型费用,但能在派发前发现范围选错或重复次数过大。
|
|
25
|
+
|
|
26
|
+
## 只关心能否成功时首过即停
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
pnpm exec niceeval exp regression --early-exit
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
某条评估用例的一个 Attempt 得到 `passed` 后,尚未派发的剩余 Attempt 会写成 `not-dispatched`。同一评估用例已经在运行的 Attempt 会通过 `ctx.signal` 收到取消信号;Adapter 是否及时观察它,决定这个 Attempt 能否尽快结束。
|
|
33
|
+
|
|
34
|
+
一次通过触发首过即停后才返回的同一评估用例 Attempt 不会进入结果。
|
|
35
|
+
|
|
36
|
+
`failed`、`errored` 或 `skipped` 不触发首过即停。需要完整通过率分布时不要打开这个选项。
|
|
37
|
+
|
|
38
|
+
## 给花费设置保护上限
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
pnpm exec niceeval exp regression --budget 25
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
预算按每个 Experiment ID 分别计算。每条已完成的 Attempt,NiceEval 从 Experiment 的 `model`、上报的 token 用量和 Config/runtime price table 推得 `estimatedCostUSD`,再把这个估算累加进预算。`usage.costUSD` 是 Provider 或 Adapter 上报的 observed 值,绝不驱动预算。累计 estimate 到达上限后,NiceEval 停止派发新 Attempt;已经在运行的任务不会被中途终止。
|
|
45
|
+
|
|
46
|
+
因此 `--budget` 是保护上限,不是精确账单。并发任务尚未结算时,最终花费可能短暂超过设置值。缺少 model、token 用量或匹配的价格时,NiceEval 无法产生 `estimatedCostUSD`,`usage.costUSD` 也不能补上。Runner 会给出警告,而不是假装预算仍可执行。
|
|
47
|
+
|
|
48
|
+
预算耗尽会留下 `budget_exhausted` diagnostic,未派发位置写成 `not-dispatched`,命令以非零状态退出。提高预算后重跑同一范围,合格的已完成 Attempt 会沿用,只补剩余位置。
|
|
49
|
+
|
|
50
|
+
## 并发只控制资源占用
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
pnpm exec niceeval exp regression --max-concurrency 4
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
并发上限限制同时运行的评估用例,不是费用上限。费用保护仍使用 `--budget`。Sandbox 构建并发由独立的 `--max-build-concurrency` 控制。
|
|
57
|
+
|
|
58
|
+
需要进一步分摊环境准备成本时,阅读[复用 Sandbox](/zh/tutorials/sandbox-reuse)。需要选择只重跑失败项或全部重验时,阅读[重跑与沿用结果](/zh/tutorials/rerun-and-cache)。
|
|
@@ -4,7 +4,7 @@ sidebarTitle: "隐藏测试判分"
|
|
|
4
4
|
description: "用 loadText 在模块顶层读入隐藏测试、跑测脚本等判据文件,文件内容进入 fingerprint:改一字节自动重跑,不靠人工 --rerun。"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Sandbox Coding 任务常用一份隐藏测试判分:Agent 改完代码后,评估用例把测试文件写进 Sandbox 执行,
|
|
8
8
|
测试通过就算过。这份测试文件就是判分标准本体——改了它,等于换了一道题,旧结果不能再采信。
|
|
9
9
|
|
|
10
10
|
用 `loadText` 读它,NiceEval 会把文件内容算进这条评估用例的 fingerprint:
|
|
@@ -63,6 +63,6 @@ description: "用 loadText 在模块顶层读入隐藏测试、跑测脚本等
|
|
|
63
63
|
- **`loadText` 必须写在模块顶层。** 缓存判断发生在运行之前,写进 `test(t)` 里运行期才读就来不及了,
|
|
64
64
|
NiceEval 会直接报错并提示挪到顶层。
|
|
65
65
|
- **读 Agent 的产物用 `t.sandbox`,不用 `loadText`。** Sandbox 里 Agent 跑出来的文件是本次运行的证据,
|
|
66
|
-
每次都不同,不属于 fingerprint。用 `t.sandbox.
|
|
66
|
+
每次都不同,不属于 fingerprint。用 `await t.sandbox.readText(path)` 读取,再把返回的字符串交给 `t.check`。
|
|
67
67
|
- 判据是结构化数据(case 对照表)时用 `loadYaml` / `loadJson`,
|
|
68
68
|
见[数据驱动测试](/zh/tutorials/dataset-fanout)。
|
|
@@ -134,8 +134,8 @@ const pricing = definePricingProfile({
|
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
在组件中只调用 `costUSD(pricing)` 或 `totalCostUSD(pricing)`;二者没有零参数形式。Analysis 计算 slot-provider ledger、exact total 和
|
|
137
|
-
`numerator / denominator` mean,Report Host 只验证 Profile、捕获闭包和呈现结果。Runner `estimatedCostUSD` 即使 observed
|
|
138
|
-
|
|
137
|
+
`numerator / denominator` mean,Report Host 只验证 Profile、捕获闭包和呈现结果。Runner `estimatedCostUSD` 即使 observed 成本存在也独立计算;
|
|
138
|
+
Experiment budget 与 `maxCost` 使用它,Report 不读取它。
|
|
139
139
|
|
|
140
140
|
`aggregate(ctx.scope, { values: { cost: costUSD(pricing) } })` 的 `cost` cell 是可观察的 `CostMetricValue`,其 `cell.projection` 是
|
|
141
141
|
`CostProjectionValue`。这两个类型以及 projection 的 state、basis、ledger 和 reason data types 都从 `niceeval/report` 以 type-only
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "运行前检查生命周期计划"
|
|
3
|
+
sidebarTitle: "检查生命周期计划"
|
|
4
|
+
description: "用 niceeval debug 查看一个 Experiment 与评估用例配对的 Plugin、Sandbox、Agent、Fixture 和 teardown 顺序,而不创建任何运行资源。"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
`exp --dry` 适合确认运行矩阵。需要检查一条评估在 Sandbox 里会按什么顺序准备、安装、执行和收尾时,使用 `niceeval debug`。
|
|
8
|
+
|
|
9
|
+
## 选择一个精确配对
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm exec niceeval debug compare/codex memory/commit0
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Experiment 和评估用例 selector 都必须唯一。精确 ID 优先;前缀命中多个候选时,CLI 会列出候选并停止。
|
|
16
|
+
|
|
17
|
+
评估用例只能从该 Experiment 已选择的范围中匹配。选择一个评估组成员不会把其它成员加入计划,但输出仍会显示评估组生命周期包裹。
|
|
18
|
+
|
|
19
|
+
## 按顺序阅读计划
|
|
20
|
+
|
|
21
|
+
计划会依次显示:
|
|
22
|
+
|
|
23
|
+
1. Plugin lifecycle;
|
|
24
|
+
2. 作者声明的 prepare;
|
|
25
|
+
3. Agent ensure、setup 与 teardown;
|
|
26
|
+
4. Sandbox materialize 与 Provider finalizer;
|
|
27
|
+
5. 评估组和物理 Sandbox lifecycle;
|
|
28
|
+
6. Fixture、test 与 cleanup。
|
|
29
|
+
|
|
30
|
+
静态 `shell()` 和 `command()` 会展开实际命令。普通 callback 标为 `Opaque`,因为它只能在运行时执行。路径、凭据、环境变量值和不安全的远端 locator 不会泄露到 Human 输出。
|
|
31
|
+
|
|
32
|
+
## 给工具读取结构化计划
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
pnpm exec niceeval debug compare/codex memory/commit0 --json > debug-plan.json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
JSON 保留结构化步骤和精确度标记,不包含终端框线。`debug` 只接受 `--json`;预算、重跑、并发等运行 flag 不适用于这个命令。
|
|
39
|
+
|
|
40
|
+
## 确认它不会执行资源操作
|
|
41
|
+
|
|
42
|
+
`debug` 不运行 setup、test、teardown、ensure、materialize 或 finalizer,也不创建 Invocation、Run、Record、锁、Sandbox 或构建任务。
|
|
43
|
+
|
|
44
|
+
它会加载受信任定义并执行 Experiment 的选择 predicate。Provider planner 也可能读取本地文件、调用只读 CLI 或查询远端控制面,因此仍应只在可信项目中运行。
|
|
45
|
+
|
|
46
|
+
矩阵和 Attempt 数量先用[选择并预览运行范围](/zh/tutorials/select-and-preview)确认。真实执行失败后需要进入保留现场时,使用[保留 Sandbox 现场排查问题](/zh/troubleshooting/debug-sandbox)。
|
|
@@ -4,28 +4,28 @@ sidebarTitle: "Docker 与 DinD"
|
|
|
4
4
|
description: "根据任务信任边界选择 Docker socket、raw privileged DinD 或受管 rootless DinD,并为 Agent 准备 Docker CLI 与 daemon。"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
当评估任务要求 Agent执行 `docker build`、`docker run
|
|
7
|
+
当评估任务要求 Agent 执行 `docker build`、`docker run` 或 `docker compose` 时,先按任务的信任边界
|
|
8
8
|
选择 Docker access:
|
|
9
9
|
|
|
10
10
|
| 模式 | 什么时候用 | 启动成本 | 安全边界 |
|
|
11
11
|
| --- | --- | --- | --- |
|
|
12
|
-
| Docker socket | 可信 Agent、个人开发机、已有 daemon,优先启动速度 | 最低,共用已有 daemon | Agent拥有该 daemon的完整控制权。rootful socket通常等价宿主 root |
|
|
13
|
-
| Raw privileged DinD | 一次性 VM或专用 runner,需要独立 image、network和 cache | 每个 Sandbox启动 inner daemon | outer container是 raw privileged,不是安全隔离方案 |
|
|
14
|
-
| Managed rootless DinD | 不可信 Agent、共享宿主、并发评估、需要资源准入和强杀恢复 | 最高,需要宿主 profile | privileged限制在受管 rootless user namespace或专用 VM,并有 watchdog与容量契约 |
|
|
12
|
+
| Docker socket | 可信 Agent、个人开发机、已有 daemon,优先启动速度 | 最低,共用已有 daemon | Agent 拥有该 daemon 的完整控制权。rootful socket 通常等价宿主 root |
|
|
13
|
+
| Raw privileged DinD | 一次性 VM 或专用 runner,需要独立 image、network 和 cache | 每个 Sandbox 启动 inner daemon | outer container 是 raw privileged,不是安全隔离方案 |
|
|
14
|
+
| Managed rootless DinD | 不可信 Agent、共享宿主、并发评估、需要资源准入和强杀恢复 | 最高,需要宿主 profile | privileged 限制在受管 rootless user namespace 或专用 VM,并有 watchdog 与容量契约 |
|
|
15
15
|
|
|
16
|
-
三种模式都要求镜像预装 Docker CLI。两种 DinD模式只接受从官方
|
|
17
|
-
`docker:<version>-dind
|
|
18
|
-
但不需要自定义 NiceEval `ENTRYPOINT`。NiceEval负责启动与监督 inner daemon、
|
|
19
|
-
Sandbox保活、容器内 TTL和 `docker info
|
|
16
|
+
三种模式都要求镜像预装 Docker CLI。两种 DinD 模式只接受从官方
|
|
17
|
+
`docker:<version>-dind` 派生的兼容镜像。镜像需要 Docker daemon、Node 和评估工具,
|
|
18
|
+
但不需要自定义 NiceEval `ENTRYPOINT`。NiceEval 负责启动与监督 inner daemon、
|
|
19
|
+
Sandbox 保活、容器内 TTL 和 `docker info` 探活,不会向任意镜像动态安装 Docker。
|
|
20
20
|
|
|
21
|
-
不能直接把未经派生的 `docker:<version>-dind
|
|
22
|
-
需要的 Node,也没有被测 Agent的工具。创建时会以
|
|
23
|
-
`dind-image-incompatible: missing node
|
|
24
|
-
再让 `source
|
|
21
|
+
不能直接把未经派生的 `docker:<version>-dind` 写成 `source.image`。该镜像没有 NiceEval supervisor
|
|
22
|
+
需要的 Node,也没有被测 Agent 的工具。创建时会以
|
|
23
|
+
`dind-image-incompatible: missing node` 失败。请使用下面的 Dockerfile,或先发布等价的派生镜像,
|
|
24
|
+
再让 `source` 引用它。
|
|
25
25
|
|
|
26
26
|
## 方案一:直接挂 Docker socket
|
|
27
27
|
|
|
28
|
-
先准备只有 CLI、Node和评估工具的镜像:
|
|
28
|
+
先准备只有 CLI、Node 和评估工具的镜像:
|
|
29
29
|
|
|
30
30
|
```dockerfile title="sandbox/Dockerfile"
|
|
31
31
|
FROM docker:29-cli
|
|
@@ -35,7 +35,7 @@ RUN apk add --no-cache ca-certificates git nodejs npm python3 \
|
|
|
35
35
|
&& adduser -D -u 1000 -G node node
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
在 Experiment里显式填写宿主 Unix socket。NiceEval不会从进程环境或 Docker context猜这个路径:
|
|
38
|
+
在 Experiment 里显式填写宿主 Unix socket。NiceEval 不会从进程环境或 Docker context 猜这个路径:
|
|
39
39
|
|
|
40
40
|
```ts title="experiments/docker-socket.ts"
|
|
41
41
|
import { defineExperiment } from "niceeval";
|
|
@@ -59,22 +59,22 @@ export default defineExperiment({
|
|
|
59
59
|
});
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
NiceEval会解析 symlink、确认最终目标是 Unix socket,把它挂到 Sandbox内固定的
|
|
63
|
-
`/var/run/docker.sock`,并按 socket的数值 GID给 `node
|
|
64
|
-
镜像没有预设 Docker endpoint或 context,而且默认 `docker info
|
|
65
|
-
daemon。CLI缺失、用户无法访问 socket或镜像把默认 endpoint改到别处时,Sandbox创建失败。
|
|
62
|
+
NiceEval 会解析 symlink、确认最终目标是 Unix socket,把它挂到 Sandbox 内固定的
|
|
63
|
+
`/var/run/docker.sock`,并按 socket 的数值 GID 给 `node` 添加补充组。启动 Agent 前,NiceEval 会确认
|
|
64
|
+
镜像没有预设 Docker endpoint 或 context,而且默认 `docker info` 与显式访问这个 Unix socket 得到同一个
|
|
65
|
+
daemon。CLI 缺失、用户无法访问 socket 或镜像把默认 endpoint 改到别处时,Sandbox 创建失败。
|
|
66
66
|
|
|
67
|
-
这项检查只固定 Agent启动时的默认用法,不是安全边界。Agent之后仍可显式传 `docker --host
|
|
68
|
-
endpoint。不可信任务需要依赖 managed模式的网络策略,而不是依赖 Docker CLI的默认值。
|
|
67
|
+
这项检查只固定 Agent 启动时的默认用法,不是安全边界。Agent 之后仍可显式传 `docker --host` 访问另一个
|
|
68
|
+
endpoint。不可信任务需要依赖 managed 模式的网络策略,而不是依赖 Docker CLI 的默认值。
|
|
69
69
|
|
|
70
70
|
<Warning>
|
|
71
|
-
这不是隔离方案。Agent可以通过 socket创建 privileged容器、挂宿主目录,并操作同一 daemon上的
|
|
72
|
-
其它容器、image、volume和 network。不要给不可信 Agent挂 rootful宿主 socket。
|
|
71
|
+
这不是隔离方案。Agent 可以通过 socket 创建 privileged 容器、挂宿主目录,并操作同一 daemon 上的
|
|
72
|
+
其它容器、image、volume 和 network。不要给不可信 Agent 挂 rootful 宿主 socket。
|
|
73
73
|
</Warning>
|
|
74
74
|
|
|
75
75
|
## 方案二:Docker-in-Docker
|
|
76
76
|
|
|
77
|
-
DinD让每个外层 Sandbox拥有自己的 inner daemon。先创建镜像:
|
|
77
|
+
DinD 让每个外层 Sandbox 拥有自己的 inner daemon。先创建镜像:
|
|
78
78
|
|
|
79
79
|
```dockerfile title="sandbox/Dockerfile"
|
|
80
80
|
FROM docker:29-dind
|
|
@@ -85,7 +85,7 @@ RUN apk add --no-cache ca-certificates git nodejs npm python3 \
|
|
|
85
85
|
&& addgroup node docker
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
生产评估应把 `FROM
|
|
88
|
+
生产评估应把 `FROM` 钉到审核过的 digest,并把被测 Agent 需要的固定 CLI 烘焙进镜像。
|
|
89
89
|
|
|
90
90
|
### NiceEval 如何启动 DinD
|
|
91
91
|
|
|
@@ -111,15 +111,17 @@ Agent 仍以 `user: "node"` 运行。上面 Dockerfile 在构建期把 `node`
|
|
|
111
111
|
|
|
112
112
|
### 在 setup 中准备 Attempt 运行时
|
|
113
113
|
|
|
114
|
-
Dockerfile
|
|
115
|
-
`setup`,不要放进镜像 `ENTRYPOINT
|
|
116
|
-
workspace,并运行项目自己的 smoke check:
|
|
114
|
+
Dockerfile 只烘焙固定工具和项目初始文件。需要 inner daemon 的操作放进 Sandbox 级
|
|
115
|
+
`setup`,不要放进镜像 `ENTRYPOINT`。下面这个完整 setup 会创建可写 workspace 并验证 inner daemon;只有镜像确实烘焙了对应归档和文件时,才在这里加入 `docker load`、文件复制或项目 smoke-check 命令:
|
|
117
116
|
|
|
118
117
|
```ts title="lib/dind-sandbox.ts"
|
|
119
|
-
import {
|
|
118
|
+
import { dockerSandbox } from "niceeval/sandbox";
|
|
120
119
|
|
|
121
|
-
export const dindSandbox =
|
|
122
|
-
|
|
120
|
+
export const dindSandbox = dockerSandbox({
|
|
121
|
+
source: {
|
|
122
|
+
type: "dockerfile",
|
|
123
|
+
context: new URL("../sandbox/", import.meta.url),
|
|
124
|
+
},
|
|
123
125
|
user: "node",
|
|
124
126
|
dockerAccess: {
|
|
125
127
|
mode: "dind",
|
|
@@ -132,7 +134,11 @@ export const dindSandbox = dockerfileSandbox({
|
|
|
132
134
|
},
|
|
133
135
|
}).setup(async (sandbox, ctx) => {
|
|
134
136
|
ctx.progress({ message: "准备 inner Docker 运行时" });
|
|
135
|
-
const result = await sandbox.runCommand("
|
|
137
|
+
const result = await sandbox.runCommand("sh", ["-lc", [
|
|
138
|
+
"set -eu",
|
|
139
|
+
"mkdir -p /workspace",
|
|
140
|
+
"docker info >/dev/null",
|
|
141
|
+
].join("\n")], {
|
|
136
142
|
user: "root",
|
|
137
143
|
stream: true,
|
|
138
144
|
});
|
|
@@ -148,7 +154,7 @@ Attempt 在 `sandbox.create` 阶段记为 `errored`,不会把半成品 Sandbox
|
|
|
148
154
|
|
|
149
155
|
### Raw privileged DinD
|
|
150
156
|
|
|
151
|
-
在一次性 VM或专用 runner上,可以显式选择 raw privileged:
|
|
157
|
+
在一次性 VM 或专用 runner 上,可以显式选择 raw privileged:
|
|
152
158
|
|
|
153
159
|
```ts title="experiments/dind-raw.ts"
|
|
154
160
|
import { defineExperiment } from "niceeval";
|
|
@@ -172,13 +178,16 @@ export default defineExperiment({
|
|
|
172
178
|
});
|
|
173
179
|
```
|
|
174
180
|
|
|
175
|
-
必填的 `raw-privileged
|
|
181
|
+
必填的 `raw-privileged` 字面量是风险授权。NiceEval 不会把 raw 模式描述成 rootless,也不会在失败时
|
|
176
182
|
自动改用 managed profile。
|
|
177
183
|
|
|
178
184
|
### Managed rootless DinD
|
|
179
185
|
|
|
180
|
-
共享宿主或不可信 Agent使用 managed模式。它在 inner daemon之外增加 profile attestation、单容器
|
|
181
|
-
资源限制、跨进程容量准入、独占外层网络和 watchdog恢复:
|
|
186
|
+
共享宿主或不可信 Agent 使用 managed 模式。它在 inner daemon 之外增加 profile attestation、单容器
|
|
187
|
+
资源限制、跨进程容量准入、独占外层网络和 watchdog 恢复:
|
|
188
|
+
|
|
189
|
+
NixOS 宿主先按照[在 NixOS 上配置 Managed DinD](/zh/tutorials/nixos-managed-dind)部署并验证 profile,
|
|
190
|
+
再配置下面的 Experiment。
|
|
182
191
|
|
|
183
192
|
```ts title="experiments/dind-managed.ts"
|
|
184
193
|
import { defineExperiment } from "niceeval";
|
|
@@ -226,7 +235,7 @@ export default defineExperiment({
|
|
|
226
235
|
});
|
|
227
236
|
```
|
|
228
237
|
|
|
229
|
-
profile缺失、拼错、attestation失败或容量不足时,NiceEval会在模型调用前失败,绝不降级成 raw
|
|
238
|
+
profile 缺失、拼错、attestation 失败或容量不足时,NiceEval 会在模型调用前失败,绝不降级成 raw
|
|
230
239
|
privileged。宿主部署完成后先检查 profile:
|
|
231
240
|
|
|
232
241
|
```bash
|
|
@@ -235,9 +244,9 @@ npx niceeval docker profile doctor default --smoke
|
|
|
235
244
|
npx niceeval exp dind-managed
|
|
236
245
|
```
|
|
237
246
|
|
|
238
|
-
`doctor --smoke
|
|
239
|
-
`docker run --rm alpine:3.20 true`。它证明 profile支持 nested Docker,但不会检查项目自己的
|
|
240
|
-
Dockerfile。项目镜像仍由默认 `docker info` readiness验证。
|
|
247
|
+
`doctor --smoke` 会在该 profile 上启动一次 DinD 容器,并实际运行内层
|
|
248
|
+
`docker run --rm alpine:3.20 true`。它证明 profile 支持 nested Docker,但不会检查项目自己的
|
|
249
|
+
Dockerfile。项目镜像仍由默认 `docker info` readiness 验证。
|
|
241
250
|
|
|
242
251
|
### 为 DinD 设置运行并发
|
|
243
252
|
|
|
@@ -270,9 +279,9 @@ pnpm exec niceeval show @1ABC234DEF
|
|
|
270
279
|
| Docker access compatibility timeout | 从 `niceeval show` 给出的有界 `dockerd.log` 尾部检查 daemon 启动、socket 与 storage driver |
|
|
271
280
|
| 启动前提示 orphan Sandbox | 先用 `niceeval sandbox list --orphans` 只读核对,再显式运行 `niceeval sandbox prune` |
|
|
272
281
|
|
|
273
|
-
##
|
|
282
|
+
## 在评估用例里验证 Docker 任务
|
|
274
283
|
|
|
275
|
-
|
|
284
|
+
三种模式对评估用例暴露相同的 Docker CLI 用法:
|
|
276
285
|
|
|
277
286
|
```ts title="evals/docker-compose.eval.ts"
|
|
278
287
|
import { defineEval } from "niceeval";
|
|
@@ -291,5 +300,5 @@ export default defineEval({
|
|
|
291
300
|
});
|
|
292
301
|
```
|
|
293
302
|
|
|
294
|
-
|
|
295
|
-
`sandbox
|
|
303
|
+
Socket 模式的命令操作显式选择的外层 daemon。两种 DinD 模式操作 Sandbox 内的 inner daemon。
|
|
304
|
+
`sandbox` 也可以直接写在 `defineEval({ sandbox: ... })` 里。多条评估用例共用配置时写在 Experiment 上。
|
|
@@ -12,7 +12,7 @@ Sandbox,也不要为了复用而把整批任务都降成串行。`defineEvalGr
|
|
|
12
12
|
| 你会得到什么 | 运行行为 |
|
|
13
13
|
| --- | --- |
|
|
14
14
|
| 公共准备少付几次 | Sandbox 创建和组级 `setup()` 每个组内实例只执行一次 |
|
|
15
|
-
| 组内稳定串行 | Runner
|
|
15
|
+
| 组内稳定串行 | Runner 按规范化评估用例 ID 排序,同组同时只派发一条 Attempt |
|
|
16
16
|
| 组间保留吞吐 | 不同组和未分组评估用例可以并行 |
|
|
17
17
|
| 结果仍能单独比较 | 每条 Attempt 继续拥有自己的断言、判定、用量和文件改动 |
|
|
18
18
|
|
|
@@ -69,9 +69,9 @@ export default defineEvalGroup({
|
|
|
69
69
|
`tag` 或 `selector`。NiceEval 也不会自动收集同目录文件;成员增删和顺序变化都会明确出现在
|
|
70
70
|
`eval-group.ts` 的 diff 中。
|
|
71
71
|
|
|
72
|
-
`evals` 数组只声明成员,不声明业务顺序。Runner
|
|
72
|
+
`evals` 数组只声明成员,不声明业务顺序。Runner 始终按规范化评估用例 ID 稳定排序;只调整
|
|
73
73
|
数组位置不会改变调度行为或组指纹。需要“先构建、后查询”这类结果依赖时,把两个步骤放进
|
|
74
|
-
|
|
74
|
+
同一条评估用例。评估组的业务排序 API 还没有实现。
|
|
75
75
|
|
|
76
76
|
`onUnavailable` 是必填策略。`"stop-group"` 在物理 Sandbox 无法创建、重置或准备时停止
|
|
77
77
|
该组后续派发;`"replace-sandbox"` 会先退休当前实例,并让下一条 slot 尝试建立替代实例。
|
|
@@ -123,14 +123,14 @@ codex workflow/01-index [group workflow] new
|
|
|
123
123
|
codex workflow/02-query [group workflow] new
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
确认两条选中评估用例都显示相同的组 ID 后再运行:
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
129
|
npx niceeval exp codex
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
当前调度器按规范化评估用例 ID 排列成员;`attempts` 大于 1 时,同一成员的各次 Attempt 连续
|
|
133
|
+
进入组内泳道,再进入下一个成员。这只是稳定的调度规则,不是跨评估用例的数据依赖契约。
|
|
134
134
|
首过即停或结果沿用没有实际派发的槽位会直接跳过。
|
|
135
135
|
|
|
136
136
|
## 把公共准备放到评估组
|
|
@@ -28,7 +28,7 @@ Boolean `matched` 进入 Verdict;`mismatched` 使最终 Verdict 为 `failed`
|
|
|
28
28
|
|
|
29
29
|
## 连续质量线
|
|
30
30
|
|
|
31
|
-
`similarity(...)` 这类 Match 产生 `[0, 1]` 的 measurement
|
|
31
|
+
`similarity(...)` 这类 Match 产生 `[0, 1]` 的 measurement。它计算字符级 Levenshtein 编辑相似度,不判断语义。通过制评估用 `.gate(n)` 给它 hard 阈值:
|
|
32
32
|
|
|
33
33
|
```ts
|
|
34
34
|
t.check(turn.message, similarity(expected))
|
|
@@ -44,7 +44,7 @@ t.check(turn.message, similarity(expected))
|
|
|
44
44
|
|
|
45
45
|
```ts
|
|
46
46
|
import { defineScoreEval } from "niceeval";
|
|
47
|
-
import { commandSucceeded, includes
|
|
47
|
+
import { commandSucceeded, includes } from "niceeval/expect";
|
|
48
48
|
|
|
49
49
|
export default defineScoreEval({
|
|
50
50
|
description: "安装并启动 DB-GPT",
|
|
@@ -57,7 +57,7 @@ export default defineScoreEval({
|
|
|
57
57
|
t.check(health, commandSucceeded()).score(1).label("健康检查可达");
|
|
58
58
|
t.check(health.stdout, includes("ok")).score(1).label("健康检查内容正确");
|
|
59
59
|
|
|
60
|
-
t.check(turn.message,
|
|
60
|
+
t.check(turn.message, includes("验证")).score(2).label("回复说明验证方法");
|
|
61
61
|
|
|
62
62
|
t.score(1).label("代码精简");
|
|
63
63
|
},
|
|
@@ -84,11 +84,10 @@ pnpm exec niceeval view --experiment models
|
|
|
84
84
|
```ts
|
|
85
85
|
evals: (eval) =>
|
|
86
86
|
eval.id.startsWith("coding/") &&
|
|
87
|
-
eval.tags.includes("coding")
|
|
88
|
-
eval.environment !== "gpu"
|
|
87
|
+
eval.tags.includes("coding")
|
|
89
88
|
```
|
|
90
89
|
|
|
91
|
-
`eval.id` 是文件路径推导出的项目内 ID,不是绝对路径,可以直接用 `startsWith` / `includes` 判断。在[评估用例](/zh/tutorials/authoring#tags-与-
|
|
90
|
+
`eval.id` 是文件路径推导出的项目内 ID,不是绝对路径,可以直接用 `startsWith` / `includes` 判断。在[评估用例](/zh/tutorials/authoring#tags-与-sandbox)中,`coding/fix-button` 示例同时满足两个条件。解析结果形成本次运行计划。报告读取实际物理 Attempts 与覆盖事实。
|
|
92
91
|
|
|
93
92
|
## 设计 experiment 的建议
|
|
94
93
|
|