Skip to content

tools: stricter catalog validation, run_evals --skill, machine-readable Harbor job check - #75

Merged
xaleryb merged 5 commits into
intel:mainfrom
vchamarthi:feat/tooling-fixes
Oct 27, 2026
Merged

xaleryb merged 5 commits into
intel:mainfrom
vchamarthi:feat/tooling-fixes

Conversation

@vchamarthi

Copy link
Copy Markdown
Contributor

What this changes

Five fixes to the repo's own tooling. No skill text changed.

  • validate_skills.py: an unknown skills.yaml key (e.g. intel-hw-clas) and an intel-hw-class outside cpu | gpu | npu | accelerator are errors. A non-string $schema / schema in skills.sh.json is an error, with a --self-test that CI runs.
  • run_evals.py --skill NAME limits --validate and scoring to one skill (0/3, not 0/30).
  • check_harbor_job.py --json prints a machine-readable verdict (ok, problems, per-trial results). Missing, malformed, non-object, deeply nested and NaN/Infinity/overflowing results become structured failures; text output and --allow-errors are unchanged.
  • compare_harbor_skill.py --report-only no longer raises KeyError: 'candidate' when only the baseline arm exists; the delta cell prints —.

Checklist

  • description check: N/A, tools only.
  • python3 tools/validate_skills.py passes locally.

Evidence

  • base: 5fdf63e
  • python3 -m unittest discover -s tools/tests -t tools/tests: 33 tests, OK on Python 3.11, 3.14, 3.15. The deep-nesting test accepts either failure message, since 3.14+ parses that depth instead of raising RecursionError.
  • python3 tools/validate_skills.py --self-test: PASS. run_evals.py --validate --skill dpnp-interop: OK 1 eval file(s), 3 case(s); plain --validate unchanged at 10 / 30.
  • Before, each new test fails on main (misspelt key and intel-hw-class: GPU give no error; --skill and --json are unrecognized arguments; --report-only crashes).

Blast radius

tools/validate_skills.py, run_evals.py, check_harbor_job.py, compare_harbor_skill.py, new tools/tests/, and two validate.yml steps (self-test, unittest discovery with a collected-count guard).

@vchamarthi vchamarthi changed the title tools: validator checks, run_evals --skill, check_harbor_job --json, report-only fix tools: stricter catalog validation, run_evals --skill, machine-readable Harbor job check Oct 23, 2026
The file used bare pytest-style functions, so the unittest-based Tool tests
step collected none of them and a broken --skill filter stayed green.
The unknown-skill test now checks the tool's own FAIL line, since argparse
rejecting the flag on main satisfied the old assertion.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
…rbor_skill

check_harbor_job.load() now raises LoadError instead of exiting, and
summarize() did not catch it, so a malformed trial result.json ended
--report-only and the post-run summary in a traceback.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
reward_of() returns None for NaN, infinity and overflowing rewards, so the
text report told the author to write a reward file that was already
written. A present but non-finite or overflowing reward now gets its own
message; rc and the --json rows are unchanged.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
The validate.yml row names each blocking step, but left out the two
blocking steps this branch adds: Tool tests and the validate_skills.py
self-test.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
@xaleryb

xaleryb commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Ran on the head: the validate.yml steps verbatim, the unit tests with and without node, and mutations of the new guards. Pushed fixes, each with a test that fails without it:

  • 6f64dec: test_run_evals_skill_filter.py used pytest-style functions, so unittest collected none of them ("collected 33") and breaking --skill kept CI green. It is now a unittest.TestCase: 36 collected, and those breaks turn the step red.
  • e741fc2: compare_harbor_skill.py --report-only with a malformed trial result.json printed a LoadError traceback; it prints one FAIL <path> line again, as on main.
  • 301b505: a NaN or Infinity reward in text mode said no reward was written and suggested reward.txt; it now says the reward is not a finite number.
  • 3b7df36: the CI table in MAINTAINERS.md lists the two new blocking steps.

PR body: text mode now fails NaN/Infinity rewards that main passed, which "text output unchanged" does not cover.

@xaleryb xaleryb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving at 3b7df36 with the fixes from the comment above; CI is green on this head.

@xaleryb
xaleryb merged commit a84c2c5 into intel:main Oct 27, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants