Repository navigation
Conversation
…odel
The finite positive metric contract and the Flare and image quality checks
are Benchmark rules, so they move to Benchmark with no forwarder or alias:
- model/protocols/metrics.py -> benchmark/metrics.py
- model/validators/{__init__,flare,image}.py -> benchmark/validators/
benchmark/artifacts.py holds Benchmark's own sha256, write_json and
atomic_write_json, with the same function source as the Infra and Harness
copies, so Benchmark imports no Infra module for them. The new
tests/test_artifact_helper_copies.py keeps every copy equal in source and
written bytes. infra/artifacts.py stays for its other users.
The legacy run gates and the MoE task program import the Benchmark
modules. The Flare command is now python -m
inferrsi.benchmark.validators.flare with the same arguments, outputs and
exit codes. A new Flare receipt keeps its schema and keys, and its adapter
digests name the moved files.
The gate now fails a file under a retired path and any import that names
one, even when no file is behind it. The installed-wheel check asserts that
the old paths are absent, the new ones ship, and only the new Flare command
runs. Docs and CHANGELOG name the new paths. Knowledge records that pin
src/inferrsi/model/protocols/metrics.py at an earlier commit keep that path.
Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author)
Signed-off-by: GUOGUO <xwdong1998@163.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
Independent initial review of #498 slice 1: base 769522f → head f8f1553. No prior review from this account on this PR.
Source conclusion: no definite blocking code defect found in this bounded move. This is COMMENT while necessary current-head checks remain incomplete, not acceptance of the entire #498 retirement.
What I independently verified:
- Compared the actual before/after contents: metrics.py and validators/init.py are byte-identical moves; flare.py and image.py differ only in the expected artifact-helper import lines.
- Benchmark's sha256/write_json/atomic_write_json implementations match the existing copies, including bounded replace retries and nonfinite-JSON rejection; the new parity tests check source, constants and emitted bytes. No cross-core import is introduced by the new helper.
- Legacy-run and MoE imports use the canonical Benchmark modules. Flare still derives new receipt adapter hashes from the actual imported files; its receipt schema remains unchanged. The new receipt test checks that binding rather than rewriting old receipt evidence.
- The retired-path guard inspects spelled absolute and relative imports even when the retired target no longer exists, and rejects returning modules beneath the retired prefixes. The unretired image request protocol remains outside those prefixes.
- Installed-wheel checks verify absence of old modules and presence of canonical modules, and invoke new/old Flare CLI paths in an isolated interpreter from a temporary directory. Matching tests and docs explicitly disclose the CLI/pickle break instead of adding aliases.
- Reviewed all 25 changed-file diffs, relevant source implementations, AGENTS and current #498 slice-1 requirements. Slices 2–5 and their owner prerequisites are not delivered or approved by this review.
Execution evidence actually inspected:
- Draft lint-and-smoke raw log: Ruff passes; 8 passed in 0.04s. https://github.com/InferMatrixLab/InferRSI/actions/runs/44330804597/job/134894349204
- Installed-package 3.10 and 3.11 are successful; their original logs show checkout of synthetic merge b554998 (this head into 769522f) and running the copied check_installed.py using the wheel-env interpreter with -I and PYTHONPATH removed.
https://github.com/InferMatrixLab/InferRSI/actions/runs/44331108229/job/134895442411
https://github.com/InferMatrixLab/InferRSI/actions/runs/44331108229/job/134895442736 - Full-check 3.10/3.11, host/browser and declarations were not all complete during this review. The author's H200 counts are reported author evidence, not a run I independently executed.
Before approval: obtain successful necessary current-head full/host/declaration results and inspect any failure or relevant skip. No new source fix is requested by this round. Hardware performance is not established by a path migration or CPU smoke; no new NPU claim is made.
Non-blocking suggestion: add a retired-module relative-import negative control inside a package init.py, in addition to the ordinary-module relative-import controls.
No repository code, tests, builds or devices were executed by me; no other reviewers' opinions were read; no files, branches, Issue state, merge or auto-merge settings were changed.
Review of f8f1553: the retired-path controls used ordinary modules only. A package initializer resolves a relative import from its own package, so three new controls import the retired metric contract and validators relatively from benchmark/__init__.py and benchmark/sub/__init__.py, and expect the violation under the package name. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: GUOGUO <xwdong1998@163.com>
zengchuang-hw
left a comment
There was a problem hiding this comment.
Independent evidence follow-up to #503 (review). Reviewed range remains base 769522f → head f8f1553; no code delta since my preceding review.
Approve this bounded #498 slice-1 migration. My independent 25-file/source review found no blocking defect: metric and validator moves preserve implementation, canonical consumers and installed-wheel checks migrate together, artifact helper copies preserve bytes/retry behavior, receipt hashes follow the actual new adapter, and the retired-path gate rejects old absolute/relative imports without alias shims. This is not approval of #498 slices 2–5 or a claim of new hardware performance.
The outstanding execution-evidence condition is now resolved. I read original logs, not merely green check badges:
- Full Python 3.10: Ruff passes; 5215 passed, 37 skipped, 672 subtests passed, 1 warning in 592.12s. https://github.com/InferMatrixLab/InferRSI/actions/runs/44331108229/job/134895442623
- Full Python 3.11: Ruff passes; same counts in 535.03s. https://github.com/InferMatrixLab/InferRSI/actions/runs/44331108229/job/134895442283
- Windows: 8 host tests plus 25 domain/serialization tests passed. https://github.com/InferMatrixLab/InferRSI/actions/runs/44331108229/job/134895442342
- macOS: 8 host tests passed. https://github.com/InferMatrixLab/InferRSI/actions/runs/44331108229/job/134895442430
These logs identify synthetic merge b554998: this exact head into 769522f. Both installed-package logs were inspected in the preceding review. Current browser, references and declarations checks and knowledge-model-policy status are successful.
I inspected the skip list: it includes optional numpy image/PSNR numerical tests, optional torch/cannbot/device paths, platform-specific and browser tests. I do not claim those skipped paths ran. The image validator is an import-only move with its numerical implementation independently compared unchanged; wheel import/CLI checks and helper parity tests cover the changed path/helper contract. Thus those optional numerical skips are not a blocker for this bounded migration. The separate browser job passed; no real NPU/model experiment was executed or inferred.
Resolved: the prior pending full/host/declaration evidence condition. No required source correction remains from my review. The relative-import negative test inside package init.py remains a non-blocking suggestion.
Rechecked author, repository ID, current head and my prior reviews immediately before submission. No repository code, tests, builds or device jobs were executed by me; no other reviewers' opinions were used; no merge or auto-merge action was taken.
zengchuang-hw
left a comment
There was a problem hiding this comment.
Independent incremental review: f8f1553 → b508bd3. Previous review: #503 (review) (bound to the old head; now dismissed after this update).
The single-file, 16-line change addresses my non-blocking test suggestion. I independently traced all three fixtures through _module_name, graph package identity, _from_base and _retired_imports: the direct Benchmark initializer resolves '..model.protocols' from inferrsi.benchmark, and nested initializers resolve '...model.validators' / '...model' from inferrsi.benchmark.sub. The expected retired targets and package-name diagnostics are correct, without requiring the retired modules to exist. Production logic and the previously reviewed migration are unchanged. No new source defect found.
Resolved in source: the initializer-relative negative controls requested previously are now present for metrics, a validator child module and the validator package. No new non-blocking suggestion.
Evidence: inspected the fresh lint-and-smoke original log (Ruff passes; 8 passed in 0.04s): https://github.com/InferMatrixLab/InferRSI/actions/runs/44335577257/job/134911232127 . This smoke does not prove the newly added parameterized gate tests executed. Current installed-package 3.10/3.11, Windows, references and declarations report success; full-check 3.10/3.11 are still in progress, macOS is queued and browser is in progress. The earlier full results belong to f8f1553, not this head.
Before approval: successful necessary current-head regression evidence, including the three new initializer controls, and completion of remaining required checks. No code correction is requested by this round. COMMENT is intentional while that evidence is pending, rather than carrying the old approval to a new SHA.
Read actual diff and relevant test/gate implementation, reused the unchanged AGENTS and governing slice-1 scope from my initial review, and rechecked current head and my prior submissions. No repository code/tests/builds were executed, no other reviewers' opinions read, no merge or auto-merge.
|
New head: This push voided the approval given at
Evidence:
The PR body's |
zengchuang-hw
left a comment
There was a problem hiding this comment.
Independent evidence follow-up to #503 (review). Code-review range remains f8f1553 → b508bd3; no additional PR code change since that review.
Approve this exact head. The new three initializer-relative import controls correctly exercise package-relative resolution and exact retired-path diagnostics, addressing my earlier optional suggestion without changing production behavior. The original bounded slice-1 migration review remains applicable. No blocking source issue remains, and the previously pending fresh-head checks have now completed.
I inspected original current-run logs:
- Python 3.10: Ruff passes; 5224 passed, 37 skipped, 672 subtests passed, 1 warning in 570.24s. https://github.com/InferMatrixLab/InferRSI/actions/runs/44335597221/job/134911306394
- Python 3.11: same counts, Ruff passes, in 478.86s. https://github.com/InferMatrixLab/InferRSI/actions/runs/44335597221/job/134911306140
- Windows: 8 host tests + 25 domain tests passed. https://github.com/InferMatrixLab/InferRSI/actions/runs/44335597221/job/134911306251
- macOS: 8 host tests passed. https://github.com/InferMatrixLab/InferRSI/actions/runs/44335597221/job/134911306209
These logs identify synthetic merge 1c4d6c1, merging this head into 965ab5c. This is distinct from the old run's integration base 769522f; I do not attribute the entire test-count increase solely to this PR. Full pytest ran without failure; the new parameterized gate tests have no skip/dependency condition. The optional image/PSNR numerical skips remain disclosed as in my prior review and do not imply those paths ran. Current installed-package, browser, references and declarations checks also report success.
Resolved: current-head regression/host evidence gap. No required source correction or further non-blocking suggestion remains from this incremental review. Approval is limited to this PR, not #498's later slices or new hardware qualification.
Rechecked exact head, author, repository ID and my existing reviews before submitting. No repository code, tests, builds or devices executed by me, no other reviewers' opinions used, and no merge or auto-merge action.
Governing Issue and delivery slice
Refs #498
infra/andmodel/packages into their owning modules #498, confirmed by the issue owner in the plan refresh and the issue body. The body records the slice and its checklist.inferrsi.model.protocols.metricsbecomesinferrsi.benchmark.metrics.inferrsi.model.validators(flare,image) becomesinferrsi.benchmark.validators.benchmark/artifacts.pyholdssha256,write_jsonandatomic_write_json.inferrsi.model.protocols.image, the provider modules and all ofinferrsi.infrastay, and so doesinfra/artifacts.pyfor its other users.Knowledge authorship declaration
No path protected by
docs/knowledge-model-policy.mdchanges. The three Knowledge files that citesrc/inferrsi/model/protocols/metrics.pypin commitb3ef95aand are unchanged. The declaration below is disclosure only.Changed artifacts and evidence
git mvtobenchmark/metrics.pyandbenchmark/validators/. Only the import lines change in the moved files.test_legacy_run_split.py(Benchmark rules import onlyinferrsi.benchmark.metrics),test_flare_adapter.py,test_image_modules.py,test_diffusion_reference_psnr.py,test_moe_benchmark.py: pass on H200 (see Checks)benchmark/artifacts.py; newtests/test_artifact_helper_copies.pychecks that every copy (Infra, Harness, Benchmark) has the same function source, retry constants and written bytes, and that the Benchmark copy imports no otherinferrsimoduleinfrafrom the copy table. A later slice adds the Apps copy.RETIRED_MODULESand_retired_importsintests/_gate_policy_support.py. New negative controls: absolute, relative,from … import metrics,from inferrsi.model import validatorsand a returning file. Three more controls import the old paths relatively from a package initializer (b508bd3, after review). A control showsinferrsi.model.protocols.imageis not retired.test_target_module_import_gate.py: pass on H200 (see Checks)tests/check_installed.py:find_specisNonefor both old paths, the four new modules ship,-m inferrsi.benchmark.validators.flare --helpexits 0, and the old-mpath exits 1 withNo module named 'inferrsi.model.validators'installed-packagejob on this head: pendingtest_the_old_flare_cli_path_is_gonechecks the old command.test_new_receipts_bind_the_benchmark_adapter_fileschecks that a new receipt keeps its schema and bindsbenchmark/validators/flare.pyandbenchmark/artifacts.py.test_flare_adapter.py: pass on H200 (see Checks)docs/flare-qualification.md,docs/operations.md,docs/architecture.md,docs/contributing.md,docs/module-layout.md,src/inferrsi/model/README.md, CHANGELOGgit grepfor the old paths finds only intended mentions: CHANGELOG, the layout table, the historicaldocs/reviews/source-audit-ac70272.md, the three Knowledge files pinned atb3ef95a, and the retirement testsChecks and dependencies
H200 Linux, Python 3.12.13, the tree committed as
f8f1553. I ran agit archiveof the commit. All 2706 files matched a SHA-256 manifest before the run. The selected files were:test_target_module_import_gate.py,test_artifact_helper_copies.py,test_flare_adapter.py,test_legacy_run_split.py,test_module_boundaries.py,test_moe_benchmark.py,test_image_modules.py,test_diffusion_reference_psnr.py,test_architecture_closed_loop.py,test_first_wave_isolation_policy.py,test_knowledge_compatibility_shells.py,test_legacy_run_forwarder_gate.py,test_campaign_record_injection.py,test_package_root_inventory.pyandtest_knowledge_model_policy.py;test_skill_evaluation.py::test_harness_artifact_primitives_match_infra_bytes_and_semantics.Result: 510 passed, 1 skipped, 384 subtests passed. The skip is
test_package_root_inventory.py:153, which needs Git metadata that the archive does not have.full-checkruns it.Two H200 environment problems, fixed outside the tree. Two earlier attempts on the same verified tree failed for these reasons, not for code reasons:
cufile-python, which installs a regular top-level package namedtests. That package shadows the repository's namespacetests, so 8 files failed to collect. A shim directory outside the tree pointstestsback at the repository.PYTHONPATH=srcwas not resolvable from the MoE launcher's child working directory, sotest_frozen_launcher_uses_generic_executor_and_fake_torchruncould not importinferrsi. An absolute path fixed it.Lint: Ruff 0.17.5 on
src tests toolsandgit diff --checkpass atf8f1553andb508bd3.full-checkatf8f1553(run 44331108229): 3.10 and 3.11 each 5215 passed, 37 skipped, 672 subtests, on GitHub's merge tree withmain769522f. Every other check on that head also succeeded.b508bd3adds only three gate controls intests/test_target_module_import_gate.py. Locally,-k retiredin that file gives 15 passed. The ready lane onb508bd3is the full-suite proof for it.Local Windows: the same targeted run on the local laptop was stopped for low system memory and gave no result.
check_installed.pyneeds a built wheel, soinstalled-packageon this PR is its proof.full-checkon this PR.evaluatecall prepares and launches its own copy of the task files in one call, so no directory prepared before this change is launched again.harness/optimization_session.py::_runtime_identity()names no file this PR changes.infraremoval from the copy table.Remaining work and Issue closure
infra/andmodel/packages into their owning modules #498.infra/andmodel/packages into their owning modules #498 body).infra/andmodel/packages into their owning modules #498 stays open.Provenance
The code, tests and docs were written in a Claude Code session reported as
claude-opus-5-5, effortxhigh, as confirmed by the owner. This is client and session attribution, not a backend attestation. Each commit has DCO sign-off and anAgent-assisted-byline.🤖 Generated with Claude Code