Repository navigation
Conversation
Signed-off-by: Anoymoguy <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Remove the serialized CPU output comparator and numerical-policy CLI/schema fields. Bind call evidence to predeclared input/state context and keep numerical and hardware acceptance explicitly unevaluated. Signed-off-by: Anoymoguy <[email protected]>
Signed-off-by: Anoymoguy <[email protected]>
Signed-off-by: Anoymoguy <[email protected]>
|
🔍 OpenCodeReview found 7 issue(s) in this PR.
📄
|
| for index, value in enumerate(argv): | ||
| if value.startswith(option + "="): | ||
| output = Path(value.split("=", 1)[1]) | ||
| elif value == option and index + 1 < len(argv): | ||
| output = Path(argv[index + 1]) |
There was a problem hiding this comment.
This pre-parse scan matches only the exact option spelling but argparse accepts unique prefixes (--in, --out, etc.) with the default allow_abbrev=True. Any abbreviated --input/--output defeats both the same-file guard and the pre-run invalidation, allowing the input file to be overwritten or a stale passed result to persist. Either set allow_abbrev=False on the parser (preferred, so the early scan and argparse agree) or make the scan resolve abbreviations consistently.
| "hardware_validation": "not_evaluated", | ||
| }, | ||
| ) | ||
| parser = _Parser(description=__doc__) |
There was a problem hiding this comment.
argparse defaults to allow_abbrev=True, but _early_path only recognizes the full --input/--output spellings. Two concrete data-loss/false-pass triggers result:
--in foo.json --output foo.json: the early scan finds--outputbut not the abbreviated--input, soearly_input is Noneand the same-file guard is skipped._write_atomic(output, {..."incomplete"...})then overwrites the user's input evidence with a placeholder before parsing. The post-parse equality check fires afterwards, but the input is already destroyed (contradictingtest_same_input_and_output_is_rejected_without_destroying_input).--input foo.json --out foo.json: the early scan misses--out, so no invalidation happens; after parsing,output = args.outputequals the input, the equality check raises, and the failure handler writes afailedresult over the input file.
Similarly, --out result.json skips the early "incomplete" invalidation entirely, so a prior manifest_enforcement:"passed" result survives a killed run and can be falsely accepted downstream.
Disabling abbreviation fixes both the destruction and staleness paths.
Suggestion:
| parser = _Parser(description=__doc__) | |
| parser = _Parser(description=__doc__, allow_abbrev=False) |
|
@Anoymoguy The automated OCR review has completed. Please review and address all automated review bot findings, then push your updates. Maintainers will begin manual review after the bot findings have been addressed. |
Flink-ddd
left a comment
There was a problem hiding this comment.
Please also fix the failing lint check.
| def main(argv: list[str] | None = None) -> int: | ||
| argv = list(sys.argv[1:] if argv is None else argv) | ||
| output = _early_path(argv, "--output") | ||
| try: |
There was a problem hiding this comment.
Please validate the input and output paths before any write. --in evidence.json --output evidence.json overwrites the input, even with allow_abbrev=False. Please add a regression test for this case.
Signed-off-by: Anoymoguy <[email protected]>
Signed-off-by: Anoymoguy <[email protected]>
Related to #428.
Adds a provider manifest shared by operator adapters. It pins checkpoint/provider identity, kernel settings and reduction rules, checks each resolved call before launch, and validates worker records against a predeclared run. Operator-specific state layouts stay in their adapters.
Tested on Windows with CPU-only PyTorch:
All 150 manifest tests passed using real files and mocked dispatch/completion. Existing dispatch, registry and attention/logprob tests had 138 passes; one transport test was skipped because it requires a ROCm device and
aiter.ops.mha. Ruff and whitespace checks passed.The earlier layout run had five Windows failures (link flags, symlink permissions, GBK decoding, CRLF hashes) in unchanged files; it was not rerun.
Remaining work: actual ROCm dispatch/load checks and VIME hooks are not connected. CLI
enforcerejects execution. GPU numerical parity is untested; graph and full-model acceptance are unsupported. The diff contains implementation and tests only.