Skip to content

feat: add shared engineering task evaluation and Ascend RMSNorm - #338

Draft
Bounty-hunter wants to merge 19 commits into
InferMatrixLab:mainfrom
Bounty-hunter:codex/issue252-engineering-benchmarks
Draft

Bounty-hunter wants to merge 19 commits into
InferMatrixLab:mainfrom
Bounty-hunter:codex/issue252-engineering-benchmarks

Conversation

@Bounty-hunter

@Bounty-hunter Bounty-hunter commented Nov 3, 2026 •

Copy link
Copy Markdown

This PR supplies shared engineering task evaluation and the first Ascend NPU RMSNorm task. It extends the existing Workbench with task-owned correctness checks, synchronized measurements and optional profiling, and retains a real-device reference-control exercise.

Draft — foundation delivery, not completion of the real-Agent workflow. Current head: 9a755f97554d71a1a4b1d59200eddc30a11bdf01; NPU-tested source: 6308268fc6d1fbf90e9ab97b5da8af79152f39ea. The latest change removes the built-in CPU RMSNorm task and its dedicated probe, migrates shared tests to Softmax, and updates current usage documentation. NPU task/worker and shared grader code are unchanged; device evidence retains its original source identity. The NPU per-action/total-timeout review remains unresolved; this PR is not ready to merge.

Read first: 中文范围与两项工作 · existing capabilities and remaining integration · task-library plan · device evidence and limits.

Delivered behavior

  • Shared task packages, task/grader/candidate/runtime identities and explicit check / measure / profile / compare operations reuse the existing Workbench, AB/BA runner and reports.
  • rmsnorm-npu / torch-npu-rmsnorm-v1 accepts compute(x, weight, *, eps) on contiguous 2D float32 NPU tensors. It checks against an independent scalar double/math.fsum oracle, validates shape/dtype/device and input/weight preservation, and never falls back to CPU.
  • Timing covers eager dispatch and device completion synchronization. Preparation, transfers, oracle and output checks are outside timing; each timed output is checked. Profiling is a separate, optional diagnostic operation, not a universal Agent-completion gate.
  • tools.npu_benchmark_validate exercises the packaged baseline/reference and incorrect controls, freezes identities, checks actual runtime consistency, and uses Workbench for A/A and reference AB/BA. It is explicitly launched and does not generate Agent candidates.
  • softmax-cpu remains as the CPU software control. rmsnorm-cpu and its dedicated usefulness probe are removed; historical CPU experiment records remain source-pinned, with historical checkout links for reproduction. Shared correctness, replay-rejection, AB/BA and retained-artifact controls now use Softmax. The formal CPU artifact adapter remains. Formal task resolution uses canonical packaged resources; the formal adapter explicitly rejects NPU until its artifact execution boundary is qualified.

Two work issues, two initial PRs

Work This PR contributes Remaining delivery
#336 — ongoing task library Shared task contract, research/reuse records and first NPU task Further tasks researched, adapted and verified in separate batches
#337 — connect tasks to existing execution/evaluation Explicit task operations, identities and limited NPU tool evidence Real Agent handoff, one external-project NPU target, artifact execution boundary, whole-run outcome/usage association and repeated real validation

Former #334 research and #335 interface scopes are consolidated into #336/#337; their closure is an organizational disposition, not feature acceptance. Original research and interface documents remain.

The first delivery is this Draft PR. One subsequent Draft PR is planned, not yet created, for the bounded #337 integration and its verification; no separate report-only PR is planned. Later task additions belong to #336.

The intended workflow accepts built-in tasks or external projects with declared tests/benchmarks. Independent acceptance uses those fixed rules, not Agent-reported success. Callers control variables and repeat runs; the evaluator need not understand indexer or knowledge-library conditions. Profiling is optional. Existing #248 efficacy and #249/search-policy responsibilities remain separate; this PR does not add a general Agent platform or search controller.

Device evidence, with explicit limits

The plan was recorded before execution. One scheduled Ascend 910B1, CANN 9.1.0, torch 2.10.0+cpu with torch_npu 2.10.0.post4: baseline/reference each passed 375 assertions, six incorrect controls were rejected without metrics, and an additional replay control passed initial checks then failed on the first varying warmup. Actual traces show six composed compute kernels versus one RmsNorm per selected input.

Workload Baseline median ms Fused median ms Synchronized eager-call reduction A/A difference
[1,4096] 0.278377 0.181495 34.802% 0.374%
[64,4096] 0.311328 0.216051 30.603% 0.296%

All 800 samples, controls and identities remain retained. Each comparison used four AB/BA pairs. The script's seven checks passed and the recorded runs exited successfully; this does not resolve the timeout-enforcement defect below. The original frozen plan, profiler checks and raw verdicts are unchanged by making profiling optional in the general workflow.

These observations concern an existing vendor fused reference under the recorded float32 workload. They do not demonstrate autonomous Agent discovery, statistically established general gains, model/service speedups, formal NPU isolation or RSI efficacy. Raw traces/logs remain in the private execution archive; the public extraction explains its omissions. Early failed probes and corrected test failures remain documented.

Validation and review status

  • NPU-tested source CI: Python 3.10/3.11 each 3649 passed, 20 skipped, 284 subtests; installed-package checks passed; formal CPU artifact controls 54 passed, zero skips. Hosted CI has no NPU; device execution is separate.
  • Previous documentation head Ready CI is historical validation; it is not the test result for the CPU-task removal.
  • Current removal regression on Windows/Python 3.11: 98 passed, 6 skipped across engineering tasks, formal artifact evaluation/comparison and NPU device-free tests. Five skips require Linux bubblewrap; one requires explicitly scheduled Ascend execution. No new NPU or model execution. Current-head Ready CI passed: Python 3.10 and 3.11 each 3642 passed, 19 skipped, 284 subtests passed; both installed-package checks passed; the strict Linux formal artifact job passed 51 tests, zero skips. Draft KV qualification remained skipped by its existing policy.
  • Ruff and whitespace checks passed. sdist/wheel builds and the clean installed-package check passed; installed tasks are exactly softmax-cpu and rmsnorm-npu. The first Windows build hit a long-path error; the build succeeded with a shorter temporary extraction directory.
  • Nine changed Markdown files / 79 relative links validated. Independent review of the removal diff found no new issue. Historical JSON/profile evidence, NPU implementation and shared grader code remain unchanged.
  • Canonical-task shadowing finding cleared by its original reviewer at the tested source. This is scoped clearance, not whole-PR approval.
  • Open P2: NPU action/total-timeout enforcement. Paired Workbench trials do not receive the frozen action cap; the script does not itself enforce the total pilot envelope. A fix and targeted timeout-control evidence remain required in this PR.

Real NPU execution currently uses reviewed trusted source. #337 must establish the actual Agent-to-artifact handoff and a suitable NPU execution boundary; the CPU sandbox cannot qualify that by analogy. Runtime success is not project acceptance. PR remains Draft and GitHub reviewDecision remains CHANGES_REQUESTED.

Refs #252
Refs #336
Refs #337

Base: 663f3b327998526a13aa31e72ad729025c18983c. DCO and Agent-assisted-by attribution retained. Protected knowledge/policy paths are unchanged; no new model or device execution accompanies the CPU-task removal.

Add frozen task packages, independent CPU oracles and profiling, with bindings to the existing Workbench and offline SkillEval verifier. Include research decisions, reproducible integration checks and explicit qualification limits.

Agent-assisted-by: Codex (implementation and documentation)
Signed-off-by: dengyunyang <584797741@qq.com>

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scoped draft review of the new CPU benchmark measurement path against #252 and the campaign no-output-replay rule in #30. P2 benchmark-validity concern is attached inline: the precheck and timed samples reuse the same input object/content, so a memoizing candidate can appear faster without performing the operation on each call. Please address or explicitly constrain this before treating timing as optimization evidence. Static source review only; no tests, model runs, hardware measurements, or acceptance decision made here. The initial task subset remains subject to the recorded owner decision.

if profiler:
profiler.enable()
started = time.perf_counter_ns()
output = compute(x, eps=oracle["eps"])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 — measured calls can become cached-output replay. The precheck at line 94 already invokes compute(x), and this loop passes the same x object and values to every warmup/sample. A candidate with a process-local id(x)/content → output memo can pass every value/input-preservation assertion while most timed calls only return the stored output; the reported suite_latency_ms then measures replay, contrary to the campaign's no-final-output-caching boundary (#30). Suggest preparing a frozen, paired varying input sequence outside the timing boundary (same sequence for baseline and candidate) and validating each invocation; add a stateful memoizing-candidate negative regression. Public development workloads still cannot establish hostile-code resistance or held-out generalization.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in ce84506e7106c4fc48fafdfab55d2ea2f9dffd50 with numpy-axis1-v2. Inputs/oracles are prepared before candidate invocation and retained for the complete action; each timed input has distinct bytes from precheck/warmup/other samples. Both arms and all consumers share the same deterministic per-call sequence. Each sample is bound to an input hash. The invariant zero case remains correctness-only, so the new score covers five varying workloads; old task/grader identities and evidence are preserved.

Regression controls confirm exact id/content memo implementations have no cache hits in the sequence, while shape/layout output replay is rejected without a metric. The fix does not claim hostile-code resistance. Forty focused tests and related CLI/SkillEval tests passed; actual Workbench and offline verifier execution retained 300 samples with matching planned and actual inputs. Statistical resolution remains unqualified.

Fix and validation · RSI consumer boundaries. Please re-review; this response does not mark the thread resolved or claim maintainer acceptance.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The specific cached-output replay finding is addressed in ac03ae23; this is a scoped source confirmation, not approval of the whole draft.

  • Inputs and independent oracles are prepared before candidate calls. All input objects stay alive, and later inputs must have distinct bytes; the zero case is correctness-only and five varying cases contribute timing.
  • The new regressions require both identity-keyed and content-keyed memoization to miss, and reject stale shape/layout output replay without a usable performance metric. Per-sample input hashes and the frozen task/grader bindings are retained.
  • @Bounty-hunter remains the implementer. Full-PR review, v2 timing/noise qualification and the recorded parent scope decision remain open; this confirmation establishes neither reliable performance ordering nor optimizer/skill benefit.
Evidence and limits

Assessed head: ac03ae23ce0bb5864a55c2c97d5f3d8d3b550d39; API base and actual main: 663f3b327998526a13aa31e72ad729025c18983c.

Read the current task contract, NumPy evaluator, worker, consumer/verifier bindings, both task manifests and the regression definitions, including input preparation and memo/replay controls. This is not a completed review of all 42 changed files.

The Python 3.11 hosted job reports Ruff success and 3,584 passed / 13 skipped / 284 subtests. It checked out merge 396688581967ea85d8edf2f7f169925546c5e207 (current head into the main above); the API comparison returned zero file differences from the standalone head. Draft qualification was skipped. I did not rerun tests or independently inspect the author's local 300-sample archive. No model/device execution or scope acceptance occurred.

Agent-assisted-by: Codex (validation fixture and documentation)
Signed-off-by: dengyunyang <584797741@qq.com>
Document existing RSI consumers and remaining end-to-end acceptance.

Agent-assisted-by: Codex (implementation, review and validation)
Signed-off-by: dengyunyang <584797741@qq.com>
Agent-assisted-by: Codex (documentation)
Signed-off-by: dengyunyang <584797741@qq.com>
Agent-assisted-by: Codex (review, implementation and documentation)
Signed-off-by: dengyunyang <584797741@qq.com>
Agent-assisted-by: Codex (implementation, validation and documentation)
Signed-off-by: dengyunyang <584797741@qq.com>
Agent-assisted-by: Codex (review)
Signed-off-by: dengyunyang <584797741@qq.com>
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Skill evaluation

PLANNED: not executed; there are no task outcomes yet.
No approval, model efficacy or current-head test result is implied.

  • Next: resolve check applicability at head 9a755f97554d71a1a4b1d59200eddc30a11bdf01.
  • Task selection: no supported automatic comparison; choose a relevant source/content check and disposition uncovered claims.
  • Selected comparisons: 0 · Estimated task calls: 0. Uncovered/unsupported changes: 70; Canonical library paths: 0; Generated projection paths: 0; Other paths: 70. These are paths, not independent claims.
  • Return: command, input/source pin, exit status, outputs/failures and untested claims for independent verified/refuted/unverified disposition.
Author verification steps (nonpaid; not yet run)
  1. Bind the checkout. Run git rev-parse HEAD; it must equal 9a755f97554d71a1a4b1d59200eddc30a11bdf01. If it differs, obtain a current plan; do not reuse old results.
  2. Choose an applicable check. Match each changed behavior to the task below or a source/content check; a path match alone does not establish relevance.
    No supported automatic comparison is selected. Review the canonical changes and explain which claims need evidence, are unaffected, or remain unverified; do not treat generated records as separate behavioral claims.
    Uncovered scope by location: Canonical library paths: 0; Generated projection paths: 0; Other paths: 70. Path counts are not claim counts; no metadata-only conclusion is inferred.
  3. Return evidence for independent review: head, check/task/source pin, command, environment, exit status, outputs/failures and untested claims. Label scripted controls. Request each claim's disposition: verified, refuted or unverified; this plan proves neither model provenance nor benefit.
    Check recipes and evidence limits

Evidence and logs · Retention: 30 days.
Retained artifacts are verifiable only before Unix time 1796372377 while the linked artifact is available. Expired evidence is unverified.

Plan bindings, budget, frozen exam and advisory details

Advisory: obtain missing evidence

Retained evidence availability: planned / unexecuted. No approval or merge authorization is issued.
Applicable only while these revisions and inputs match the current PR.
Paid execution requires trusted label authorization and cumulative PR reservation. Unknown accounting blocks new paid calls; planning is not execution.
Pipeline evidence only; offline fixed outputs do not establish skill efficacy.
Unchanged-correct is valid neutral evidence, not incremental benefit.
Content/source review and authorship admission remain separate.
Trusted regrading checks retained answers, not model/hardware provenance or a hostile executor; this is not an efficacy certification.

  • Retained evidence is planned / unexecuted.
  • No supported comparison cases were selected.
  • Uncovered/unsupported scope needs a case or explicit reviewer disposition.
    Plan SHA-256: e34149169b33e70a1c47dda272508f7a21011bce3b934779f08dfaca67837cda
    Base: 663f3b327998526a13aa31e72ad729025c18983c · Head: 9a755f97554d71a1a4b1d59200eddc30a11bdf01
    Trusted implementation: 663f3b327998526a13aa31e72ad729025c18983c

Model/settings: {"effort":"not_applicable","name":"claude-opus-5-5"}
Budget: {"comparisons":0,"estimated_calls":0,"limits_per_comparison":{"campaign_seconds":600,"max_task_calls":2,"repeats":1,"timeout_seconds":180,"token_stop_new_trials":200000},"provider_config_sha256":"b28d80f8194fbe0f5a9f01515efb24b218979fd45f702776560da276f4b30d04","reservation":null}

Skill Comparison Cases Estimated calls

Automatic execution / cumulative PR budget:

{"reason":"Trusted configuration or pricing missing, invalid or expired","remaining_usd":"unknown","reserved_or_unresolved_usd":"unknown","spent_or_legacy_usd":"unknown","state":"blocked"}

Provider/settings: {"client":{"api_version":"2023-06-01","endpoint":"https://yibuapi.com/v1/messages","kind":"anthropic-messages-full-context-v1","max_output_tokens":4096,"max_read_bytes":32768,"max_request_bytes":262144,"max_requests":1,"max_tool_calls":12,"provider":"yibuapi"},"limits":{"token_stop_new_trials":200000},"model":{"effort":"not_applicable","name":"claude-opus-5-5"},"pricing":{"currency":"USD","expires_at":1793271228,"group":"default","max_input_tokens":1000000,"model":"claude-opus-5-5","rate_evidence":"https://github.com/InferMatrixLab/InferRSI/issues/215#issuecomment-6467531341","rates":{"cache_read":"0.4","cache_write":"10","input":"8","output":"40"},"request_fee":"0","unit":"per_million_tokens"},"spend_limit":{"amount":"200","currency":"USD"}}

Uncovered / unsupported paths (70)
  • uncovered: ".gitattributes"
  • uncovered: ".github/workflows/ci-ready.yml"
  • uncovered: "docs/architecture.md"
  • uncovered: "docs/engineering-benchmarks.md"
  • uncovered: "docs/operations.md"
  • uncovered: "docs/plans/issue-252/01-research.md"
  • uncovered: "docs/plans/issue-252/02-contract.md"
  • uncovered: "docs/plans/issue-252/03-tasks.md"
  • uncovered: "docs/plans/issue-252/04-integration.md"
  • uncovered: "docs/plans/issue-252/README.md"
  • uncovered: "docs/plans/issue-252/formal-integration.md"
  • uncovered: "docs/plans/issue-252/formal-validation-summary.json"
  • uncovered: "docs/plans/issue-252/npu-pilot.md"
  • uncovered: "docs/plans/issue-252/npu-validation-summary.json"
  • uncovered: "docs/plans/issue-252/npu-validation.md"
  • uncovered: "docs/plans/issue-252/replay-measurements.json"
  • uncovered: "docs/plans/issue-252/replay-profiles/rmsnorm-cpu.txt"
  • uncovered: "docs/plans/issue-252/replay-profiles/softmax-cpu.txt"
  • uncovered: "docs/plans/issue-252/replay-validation-summary.json"
  • uncovered: "docs/plans/issue-252/replay-validation.md"
  • uncovered: "docs/plans/issue-252/review.md"
  • uncovered: "docs/plans/issue-252/rsi-integration.md"
  • uncovered: "docs/plans/issue-252/task-expansion/01-operators.md"
  • uncovered: "docs/plans/issue-252/task-expansion/02-host-runtime.md"
  • uncovered: "docs/plans/issue-252/task-expansion/03-memory.md"
  • uncovered: "docs/plans/issue-252/task-expansion/04-communication.md"
  • uncovered: "docs/plans/issue-252/task-expansion/05-serving.md"
  • uncovered: "docs/plans/issue-252/task-expansion/README.md"
  • uncovered: "docs/plans/issue-252/task-expansion/gso-source-audit.json"
  • uncovered: "docs/plans/issue-252/usefulness-profiles/einsum.txt"
  • uncovered: "docs/plans/issue-252/usefulness-profiles/unchanged.txt"
  • uncovered: "docs/plans/issue-252/usefulness-summary.json"
  • uncovered: "docs/plans/issue-252/usefulness.md"
  • uncovered: "docs/plans/issue-252/validation-summary.json"
  • uncovered: "docs/plans/issue-252/validation.md"
  • uncovered: "docs/plans/issue-252/walkthrough.md"
  • uncovered: "docs/skill-eval-comparison.md"
  • uncovered: "pyproject.toml"
  • uncovered: "src/inferrsi/arguments.py"
  • uncovered: "src/inferrsi/cli.py"
  • uncovered: "src/inferrsi/data/engineering_benchmarks/rmsnorm-npu/LICENSE"
  • uncovered: "src/inferrsi/data/engineering_benchmarks/rmsnorm-npu/README.md"
  • uncovered: "src/inferrsi/data/engineering_benchmarks/rmsnorm-npu/baseline.py"
  • uncovered: "src/inferrsi/data/engineering_benchmarks/rmsnorm-npu/candidate.py"
  • uncovered: "src/inferrsi/data/engineering_benchmarks/rmsnorm-npu/task.json"
  • uncovered: "src/inferrsi/data/engineering_benchmarks/softmax-cpu/LICENSE"
  • uncovered: "src/inferrsi/data/engineering_benchmarks/softmax-cpu/README.md"
  • uncovered: "src/inferrsi/data/engineering_benchmarks/softmax-cpu/baseline.py"
  • uncovered: "src/inferrsi/data/engineering_benchmarks/softmax-cpu/candidate.py"
  • uncovered: "src/inferrsi/data/engineering_benchmarks/softmax-cpu/task.json"
  • uncovered: "src/inferrsi/harness/benchmarks/init.py"
  • uncovered: "src/inferrsi/harness/benchmarks/cli.py"
  • uncovered: "src/inferrsi/harness/benchmarks/consumers.py"
  • uncovered: "src/inferrsi/harness/benchmarks/contract.py"
  • uncovered: "src/inferrsi/harness/benchmarks/npu_task.py"
  • uncovered: "src/inferrsi/harness/benchmarks/numpy_task.py"
  • uncovered: "src/inferrsi/harness/benchmarks/skill_verifier.py"
  • uncovered: "src/inferrsi/harness/benchmarks/worker.py"
  • uncovered: "src/inferrsi/harness/skill_eval_benchmark.py"
  • uncovered: "src/inferrsi/harness/skill_eval_engineering.py"
  • uncovered: "src/inferrsi/harness/skill_evaluation.py"
  • uncovered: "tests/check_installed.py"
  • uncovered: "tests/test_engineering_benchmarks.py"
  • uncovered: "tests/test_npu_engineering_benchmark.py"
  • uncovered: "tests/test_skill_eval_benchmark.py"
  • uncovered: "tests/test_skill_eval_benchmark_compare.py"
  • uncovered: "tools/engineering_benchmark_validate.py"
  • uncovered: "tools/npu_benchmark_validate.py"
  • uncovered: "tools/skill_eval_compare.py"
  • uncovered: "tools/skill_eval_local.py"

Agent-assisted-by: Codex (validation)
Signed-off-by: dengyunyang <584797741@qq.com>
Agent-assisted-by: Codex (validation and documentation)
Signed-off-by: dengyunyang <584797741@qq.com>

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incremental review at fd0f396c of the formal artifact integration since ac03ae23: one P2 correctness blocker, attached inline. The new built-in-only adapter can resolve a same-named working-directory task instead of the packaged task, and its freeze/revalidation path preserves that substitution.

The earlier cached-output replay finding remains addressed; I am not reopening or duplicating it. I inspected the new adapter, reused task/sandbox contracts, controller/run-trial/local-capture/report changes, regression definitions and CI wiring. Current Ready CI succeeds: the dedicated Linux controls report 49 passed with strict sandbox availability enabled; the 3.11 full check reports 3,631 passed, 18 skipped and 284 subtests. Actual checkout 98156741 has zero file differences from this head. Those tests do not cover cwd task shadowing.

Static source review plus existing hosted logs only; no local candidate/test execution, model or hardware work. Bounty-hunter retains the correction. Correctness-only limits, performance/skill-benefit gaps and #252's outstanding acceptance decision remain separate; this review does not accept the broader goal.

def task_descriptor(name: str) -> dict:
if name not in builtin_tasks():
raise ValueError("Only built-in shared CPU benchmark tasks are supported")
package = load_task(name)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 — resolve formal tasks from the packaged resource, not the working directory. Checking that name occurs in builtin_tasks() does not ensure that load_task(name) loads that built-in package: contract.load_task first prefers any existing Path(name) directory. validate_task(), starter() and verify() repeat the same lookup, so they all agree on a shadow rather than detect it.

For a concrete source-trace case, run from the InferRSI checkout with a local softmax-cpu/ copy of the packaged task and change only its oracle.atol to 1. Generate the descriptor through task_descriptor('softmax-cpu'). The manifest validator permits that positive finite tolerance. prepare() copies this same package, freezes its checkout-relative paths, and load_plan() compares against the same shadow, so the paired path also accepts it. A compute returning np.zeros_like(x) then satisfies all four output checks for every input: true softmax values lie in [0,1], so np.allclose(0, expected, atol=1) accepts them. The canonical packaged files need not change. This is static tracing/arithmetic, not a claim that I executed the candidate.

This makes a built-in-only, independently frozen correctness task depend on the caller's cwd and allows an incorrect artifact to pass under an accidentally or deliberately substituted rubric. It is separate from the documented public-suite/protocol-spoofing limits. Please use an explicit packaged-resource/built-in-only loader throughout the formal adapter and its prepare() dependency collection, while retaining path loading for the trusted Workbench API. Add a regression with a same-named cwd task directory that proves the canonical oracle/hash is used or the shadow is rejected.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The specific cwd-shadowing finding is addressed at 6308268fc6d1fbf90e9ab97b5da8af79152f39ea (fix introduced in 00c41b24). This clears this finding only.

  • load_builtin_task() resolves the packaged resource and checks its manifest ID. The formal descriptor, starter and parent verifier now use task_package(); prepare copies and freezes dependencies through that same canonical loader. Revalidation compares the retained package hash and starter against the canonical descriptor. Trusted Workbench path loading remains available.
  • The new regressions cover a same-named softmax-cpu/ cwd directory with atol=1, canonical descriptor/starter/oracle selection, prepare/dependency freezing and later revalidation. The real sandbox control rejects the zero-output implementation despite that shadow. The formal CPU path also rejects the new NPU adapter before execution.
  • I read the exact-head source and dedicated Linux control log: 54 passed, zero skips, with INFERRSI_REQUIRE_BENCHMARK_SANDBOX=1 and NumPy 2.2.6. The 3.11 full check reports 3,649 passed / 20 skipped / 284 subtests. CI checked out merge 6f1506bc; its tree has zero file differences from this head. I did not execute code locally.

The separate NPU action/total-timeout finding remains open and is not superseded by this reply. This is not whole-PR approval, device qualification, performance/skill-benefit evidence, or scope acceptance; Bounty-hunter retains the implementation.

Agent-assisted-by: Codex (documentation and scope review)
Signed-off-by: dengyunyang <584797741@qq.com>
Agent-assisted-by: Codex (source research and task design)
Signed-off-by: dengyunyang <584797741@qq.com>
@Bounty-hunter Bounty-hunter changed the title feat: add shared CPU engineering benchmark tasks feat: add shared CPU benchmarks and formal SkillEval artifact checks Nov 4, 2026
Keep reviewed path loading available to Workbench while resolving formal descriptors, starters, oracle checks and prepare dependencies only from packaged task resources. Reject unsupported device adapters before the NumPy sandbox.

Agent-assisted-by: Codex (implementation and tests)
Signed-off-by: dengyunyang <584797741@qq.com>
Define the affine device task and qualification flow; retain CPU results as historical software evidence and keep NPU SkillEval isolation separate.

Agent-assisted-by: Codex (documentation)
Signed-off-by: dengyunyang <584797741@qq.com>
Execute trusted candidates on an allocated NPU with an independent scalar oracle, synchronized eager timing, separate device profiling and Workbench A/A and reference controls.

Agent-assisted-by: Codex (implementation and review)
Signed-off-by: dengyunyang <584797741@qq.com>
A no-op comparison may fail either its speed gate or correctness. Accept the no-op control only after successful final quality validation, and compare its actual environment with every other result.

Agent-assisted-by: Codex (implementation and review)
Signed-off-by: dengyunyang <584797741@qq.com>
Match all action, trial and final validation identities against the pre-execution freeze, including incorrect controls stored outside the task package.

Agent-assisted-by: Codex (implementation and review)
Signed-off-by: dengyunyang <584797741@qq.com>

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scoped incremental static review of the new rmsnorm-npu pilot in PR #338 (head 6308268f), against the execution limits recorded in Issue #337. One P2 execution-budget contract gap, attached inline: the 180-second action timeout is applied to standalone check/profile/negative controls but not to the A/A or reference Workbench trials. This can leave an individual trial running until the 8-minute comparison deadline; the script also does not itself enforce the separately stated 20-minute pilot envelope. Please bind the per-action and total deadlines or identify and verify the outer enforcement, with a timeout-control regression. This is a source/contract finding, not a hardware result. I inspected the new NPU adapter/driver, RunSpec, the Workbench runner/external/local executor chain and relevant tests. The earlier canonical-task shadowing review remains separate and is not repeated. No NPU/model/test execution or acceptance decision was performed.

comparisons = {}
# Same implementation in both arms is the explicit no-op/A-A control.
for name, path in (("aa", baseline), ("reference", candidate)):
spec = task.runspec(path, repo=args.repo, output_dir=output / "results" / name,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 — the frozen per-action timeout is not applied to paired NPU trials. Issue #337's predeclared pilot says --timeout-seconds 180, two Workbench comparisons capped at 8 minutes each, and a 20-minute total runtime. Here args.timeout_seconds is passed only to run_action() for check/profile/negative controls (lines 96–116); task.runspec() does not carry it. run_experiment() passes its whole-comparison deadline to execute_trial() → execute_command(), which calls process.wait(timeout=deadline-now). Thus a first stalled A/A or reference trial may occupy almost the entire 480-second comparison instead of stopping at 180 seconds; two comparisons plus all standalone controls can also exceed 20 minutes unless an independently enforced outer deadline exists. That changes the frozen resource/lifecycle budget, particularly on a shared NPU allocation. Please cap each Workbench trial at min(comparison_remaining, action_timeout, pilot_remaining) (or implement equivalent tested enforcement), and include a deliberately nonterminating synthetic command in a CPU-only timeout regression. If a scheduler supplies the global bound, record its enforceable receipt and distinguish that from this script's guarantees.

Publish the NPU workflow, all timing samples and scoped keep decision; distinguish the trusted device pilot from formal artifact isolation and Agent efficacy.

Agent-assisted-by: Codex (documentation and evidence review)
Signed-off-by: dengyunyang <584797741@qq.com>
@Bounty-hunter Bounty-hunter changed the title feat: add shared CPU benchmarks and formal SkillEval artifact checks feat: add NPU RMSNorm pilot and shared benchmark evaluation Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Review at head a91b913e (draft): not approving yet.

  1. Per-action timeout still not applied to paired NPU trials (tools/npu_benchmark_validate.py:101 vs :117-120): args.timeout_seconds is passed to run_action() for check/profile/negative controls, but the aa / reference comparisons build task.runspec(...) and call run_experiment(spec, ...) without it. Issue task: connect engineering tasks to existing Agent execution and evaluation #337's predeclared limits (--timeout-seconds 180, 8 min per comparison, 20 min total) therefore do not bound the paired trials. This is the open Dong1017 finding from 2026-11-04 03:02 UTC; the head has no later code commit. Expected: thread the timeout into the runspec/trial launcher and add a test.
  2. Scope question: the PR is +24,166 lines across 76 files (CPU benchmark path, formal Skill Eval adapter and the NPU RMSNorm pilot/evidence). Is the evidence part within the evidence byte budget discussion in [Investigation] Agent-led workflow gaps: closure, decision visibility, review provenance and focus #273, and should the pilot evidence be split from the harness change for review?
  3. The PR is still a draft; please mark it ready once the above is resolved so the Ready checks run.

Keep profiling optional, distinguish existing task tools from pending real-Agent integration, and preserve scoped evidence and unresolved review findings.

Agent-assisted-by: Codex (documentation and scope review)
Signed-off-by: dengyunyang <584797741@qq.com>
@Bounty-hunter Bounty-hunter changed the title feat: add NPU RMSNorm pilot and shared benchmark evaluation feat: add shared engineering task evaluation and Ascend RMSNorm Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Incremental review a91b913e..125b0645 (draft; one docs-only commit, docs: consolidate task library and evaluation integration plans), checked against my previous review. Not approving yet.

This delta: the 12 files under docs/plans/issue-252/ consolidate #334/#335 into #336 (task library) and #337 (integration), make profiling an optional diagnostic for the general flow while keeping the frozen profiling checks of the executed NPU pilot, and add an explicit tracker for remaining work. I did not find broken relative links in the changed text (e.g. task-expansion/README.md now points at ../README.md, which resolves to the #252 overview). The wording is careful not to count closed issues as accepted work. CI at 125b0645 is green.

Still open:

  1. Per-action / total timeout for paired NPU trials (tools/npu_benchmark_validate.py:101 vs :117-120): no code change in this delta. The docs now record it as unresolved (03-tasks.md tracker, 04-integration.md last paragraph, README.md, npu-validation.md), which is accurate, but the fix itself is still needed: thread --timeout-seconds into the runspec/trial launcher for the aa / reference comparisons, enforce the overall budget, and add a test.
  2. Scope / size question from last round is not answered yet: is the pilot evidence within the [Investigation] Agent-led workflow gaps: closure, decision visibility, review provenance and focus #273 evidence byte budget, and should the evidence be split from the harness change for review?
  3. The PR is still a draft; please mark it ready once 1 is fixed so the Ready checks run.

Static doc review of the delta only; I did not run the NPU tooling.

Remove the CPU RMSNorm package and its dedicated historical probe. Keep Softmax regression coverage, preserve source-pinned experiment records, and retain the NPU task unchanged.

Agent-assisted-by: Codex (implementation, test migration, and documentation)
Signed-off-by: dengyunyang <584797741@qq.com>

Copy link
Copy Markdown
Collaborator

Incremental review 125b0645..9a755f97 (draft; one commit, chore: remove the built-in CPU RMSNorm task), checked against my previous review. Not approving yet.

This delta looks consistent:

  • The rmsnorm-cpu package and tests/fixtures/engineering_benchmark_usefulness.py are removed; tests/test_engineering_benchmarks.py now asserts builtin_tasks() == {"softmax-cpu", "rmsnorm-npu"} and that loading rmsnorm-cpu fails explicitly.
  • Tests migrated to softmax-cpu. In tests/test_skill_eval_benchmark_compare.py the two-task run is replaced by repeats=2 with a per-repeat mode key, which keeps the AB/BA order check ([1, 1, 2, 2]) and the fix/unchanged-correct counts with one task. The cached-output replay control is rewritten as a Softmax memoizer, so that regression is still covered.
  • tools/engineering_benchmark_validate.py iterates builtin_tasks(), so no stale rmsnorm-cpu reference there. CI at 9a755f97 is green.

Still open:

  1. Per-action / total timeout for paired NPU trials (tools/npu_benchmark_validate.py:102-103 vs :121-126): unchanged in this delta. --timeout-seconds still reaches run_action() only; the aa / reference comparisons call task.runspec(...) + run_experiment(...) without it, and the 20-minute pilot envelope is not enforced. Please thread the timeout into the paired trials, bound the total, and add a test.
  2. Scope / size question from the last two rounds is still unanswered: is the pilot evidence within the [Investigation] Agent-led workflow gaps: closure, decision visibility, review provenance and focus #273 evidence byte budget, and should it be split from the harness change?
  3. Historical links point at a fork commit (docs/plans/issue-252/walkthrough.md, new links to Bounty-hunter/InferRSI/tree/125b0645...): after a squash merge that commit will not exist in this repo and depends on the fork staying alive. Could you pin these to a commit that will be in InferMatrixLab/InferRSI (e.g. the pre-removal commit once merged), or confirm the fork is the intended permanent record?
  4. Still a draft; please mark it ready once 1 is fixed so the Ready checks run.

Static review of the delta only; I did not run the tests or the NPU tooling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:workbench CLI workbench: profile, A/B loop, quality gates, evidence reports

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants