diff --git a/docs/contributing.md b/docs/contributing.md index 1fee29f23..08948aac8 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -48,6 +48,18 @@ cleanup and adjudication. See [extension contracts](architecture.md#where-to-ext For a finding, edit one [record](../src/inferrsi/knowledge/data/skill_library/records/README.md). For a procedure, edit its registered owner. Commit changed skill sources, then regenerate the two build inputs with `python tools/build_skill_index.py --source-revision `. Verify with the same command plus `--check`. The catalog constructs schema-1 views when requested. See the [knowledge contribution workflow](knowledge-contribution-workflow.md). +Regenerate the checkout [SearchSpace coordinate index](searchspace-index.json) +after changing the SearchSpace Matrix, Skill registry or Skill metadata source +files with `python tools/build_skill_coverage.py --searchspace-index`. Add +`--check` to verify without writing. The index records resource and lifecycle +stage pairs from the numbered matrix's Candidate Skills column. Supplementary, +unknown, explicitly excluded and conflicting Skills have no matchable pairs. +The Python reader `load_searchspace_index(checkout)` verifies both the source +digests and the generated entries against the same canonical projection. It +qualifies entries by Skill root, id and path. Coordinate verification reads +checkout Skill metadata with PyYAML. If your interpreter lacks PyYAML, install +it from the checkout with `python -m pip install '.[skills]'`. + Protected changes also require a current-head [knowledge authorship declaration](knowledge-model-policy.md). Every material AI author must use an approved model at `xhigh` or `max`; human-only work is declared diff --git a/docs/searchspace-index.json b/docs/searchspace-index.json new file mode 100644 index 000000000..8810a3d3a --- /dev/null +++ b/docs/searchspace-index.json @@ -0,0 +1,102 @@ +{ + "schema_version": 1, + "source": { + "matrix_path": "docs/searchspace-matrix.md", + "catalog_path": "src/inferrsi/knowledge/data/skill_library/skill-index.json", + "skill_root": "src/inferrsi/knowledge/data/skill_library", + "matrix_sha256": "2d90d24c94babcbb9e3f9da9b7138d7896459af03e39280eb8d97540fdf911a0", + "catalog_sha256": "d243e2ae44c7badc8e68788153de35fe6ac31de618b7499fef6339eadf396871", + "metadata_sha256": "7e3efbdd366d493e8db5fa06c87a45ecbdb4b51bdb55b3dc30679afe697733e5" + }, + "skills": { + "ascend-aclgraph-capture-replay": {"path": "systems/platforms/ascend/ascend-aclgraph-capture-replay/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["Accelerator", "Verify"]]}, + "ascend-device-health": {"path": "systems/platforms/ascend/ascend-device-health/SKILL.md", "state": "covered", "coordinates": [["Network", "Diagnose"], ["OS", "Configure"], ["OS", "Diagnose"], ["OS", "Observe"], ["OS", "Profile"], ["OS", "Verify"]]}, + "ascend-distributed-parallel": {"path": "systems/platforms/ascend/ascend-distributed-parallel/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Network", "Configure"], ["Network", "Diagnose"], ["Network", "Observe"], ["Network", "Optimize"], ["Network", "Verify"]]}, + "ascend-graph-mode": {"path": "systems/platforms/ascend/ascend-graph-mode/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Verify"], ["SSD", "Diagnose"]]}, + "ascend-model-adaptation": {"path": "systems/platforms/ascend/ascend-model-adaptation/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["SSD", "Configure"], ["SSD", "Diagnose"]]}, + "ascend-operator-profiling": {"path": "systems/platforms/ascend/ascend-operator-profiling/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Observe"], ["Accelerator", "Profile"], ["OS", "Observe"], ["OS", "Profile"]]}, + "ascend-operator-tuning": {"path": "systems/platforms/ascend/ascend-operator-tuning/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Optimize"]]}, + "ascend-optimization-casebook": {"path": "casebooks/ascend/ascend-optimization-casebook/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Optimize"], ["Accelerator", "Verify"]]}, + "ascend-performance-analysis": {"path": "systems/platforms/ascend/ascend-performance-analysis/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Observe"], ["Accelerator", "Profile"], ["Accelerator", "Verify"], ["Network", "Diagnose"], ["Network", "Observe"], ["Network", "Profile"], ["Network", "Verify"], ["OS", "Diagnose"]]}, + "ascend-video-diffusion-optimization": {"path": "systems/platforms/ascend/ascend-video-diffusion-optimization/SKILL.md", "state": "supplementary", "coordinates": []}, + "ascendc-tiling-design": {"path": "systems/platforms/ascend/ascendc-tiling-design/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Optimize"]]}, + "assess-serving-preemption": {"path": "playbooks/planning/assess-serving-preemption/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["Accelerator", "Verify"], ["RAM/Host", "Configure"], ["RAM/Host", "Diagnose"], ["RAM/Host", "Optimize"], ["RAM/Host", "Verify"]]}, + "assess-split-backward-schedule": {"path": "playbooks/planning/assess-split-backward-schedule/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["Accelerator", "Verify"]]}, + "audit-afd-p2p-exchanges": {"path": "systems/engines/afd-plugin/audit-afd-p2p-exchanges/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Verify"]]}, + "audit-fixed-workload-claim": {"path": "playbooks/measurement/audit-fixed-workload-claim/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "SKILL.md §§ Preserve the observation hierarchy, Check what was actually compared, and Return an auditable conclusion audit supplied measurements and verdicts; device identity is comparison metadata, not a hardware-resource mechanism."}, + "audit-flare-session-lifecycle": {"path": "systems/engines/flare-local-inference/audit-flare-session-lifecycle/SKILL.md", "state": "supplementary", "coordinates": []}, + "audit-h3-metal-fasth3-semantics": {"path": "systems/engines/h3-metal/audit-h3-metal-fasth3-semantics/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Observe"], ["Accelerator", "Verify"]]}, + "audit-h3-runtime-residency": {"path": "systems/engines/h3-c/audit-h3-runtime-residency/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Observe"], ["Accelerator", "Verify"], ["RAM/Host", "Diagnose"], ["RAM/Host", "Observe"], ["RAM/Host", "Verify"], ["SSD", "Configure"], ["SSD", "Diagnose"], ["SSD", "Verify"]]}, + "audit-llama-runtime-state": {"path": "systems/engines/llama-cpp/audit-llama-runtime-state/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Verify"], ["RAM/Host", "Diagnose"], ["RAM/Host", "Verify"]]}, + "audit-recurrent-kv-finalization": {"path": "systems/engines/vllm-rlt/audit-recurrent-kv-finalization/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Verify"]]}, + "audit-sd-cpp-residency": {"path": "systems/engines/stable-diffusion-cpp/audit-sd-cpp-residency/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Observe"], ["Accelerator", "Verify"], ["RAM/Host", "Diagnose"], ["RAM/Host", "Observe"], ["RAM/Host", "Verify"], ["SSD", "Diagnose"], ["SSD", "Verify"]]}, + "audit-sglang-diffusion-lifetimes": {"path": "systems/engines/sglang/audit-sglang-diffusion-lifetimes/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Verify"], ["RAM/Host", "Diagnose"], ["RAM/Host", "Verify"]]}, + "audit-vllm-kv-lifetimes": {"path": "systems/engines/vllm/audit-vllm-kv-lifetimes/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Observe"], ["Accelerator", "Verify"]]}, + "bound-windowed-attention-replay": {"path": "systems/engines/deepinfer/bound-windowed-attention-replay/SKILL.md", "state": "supplementary", "coordinates": []}, + "budget-speculative-verification": {"path": "systems/engines/deepinfer/budget-speculative-verification/SKILL.md", "state": "supplementary", "coordinates": []}, + "calibrate-serving-simulation": {"path": "playbooks/measurement/calibrate-serving-simulation/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Verify"]]}, + "cann-attribution-overlap": {"path": "systems/platforms/ascend/cann-attribution-overlap/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Observe"], ["Accelerator", "Optimize"], ["Accelerator", "Profile"], ["Accelerator", "Verify"], ["Network", "Diagnose"], ["Network", "Optimize"], ["Network", "Verify"]]}, + "cgroup-resource-controls": {"path": "systems/platforms/host/cgroup-resource-controls/SKILL.md", "state": "covered", "coordinates": [["RAM/Host", "Configure"], ["RAM/Host", "Observe"], ["RAM/Host", "Profile"], ["RAM/Host", "Verify"], ["OS", "Configure"], ["OS", "Diagnose"], ["OS", "Observe"], ["OS", "Optimize"], ["OS", "Profile"], ["OS", "Verify"]]}, + "checkpoint-recovery-consistency": {"path": "playbooks/planning/checkpoint-recovery-consistency/SKILL.md", "state": "covered", "coordinates": [["RAM/Host", "Configure"], ["RAM/Host", "Verify"], ["SSD", "Configure"], ["SSD", "Verify"], ["Network", "Configure"], ["Network", "Diagnose"], ["Network", "Verify"], ["OS", "Configure"], ["OS", "Diagnose"]]}, + "choose-parallel-training-plan": {"path": "playbooks/planning/choose-parallel-training-plan/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["Accelerator", "Verify"], ["Network", "Configure"], ["Network", "Diagnose"], ["Network", "Optimize"], ["Network", "Verify"]]}, + "cite-check-downstream-pr": {"path": "workflows/governance/cite-check-downstream-pr/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "SKILL.md §§ Checklist and Red flags check acceptance links, revision/artifact citations and claim wording; they provide no hardware-resource mechanism."}, + "claim-contract": {"path": "workflows/governance/claim-contract/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Verify"]]}, + "comfy-ui": {"path": "systems/engines/comfy-ui/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Verify"], ["RAM/Host", "Configure"], ["RAM/Host", "Diagnose"], ["RAM/Host", "Verify"]]}, + "competitor-scan": {"path": "workflows/research/competitor-scan/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "SKILL.md §§ Frame, Rules and Deliverable produce a qualitative competitive comparison with evidence limits, not a hardware-resource decision or implementation mechanism."}, + "dcp-async-save-performance": {"path": "systems/frameworks/pytorch/dcp-async-save-performance/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["RAM/Host", "Configure"], ["RAM/Host", "Observe"], ["RAM/Host", "Optimize"], ["RAM/Host", "Profile"], ["RAM/Host", "Verify"], ["SSD", "Configure"], ["SSD", "Observe"], ["SSD", "Optimize"], ["SSD", "Profile"], ["SSD", "Verify"]]}, + "dense-performance-evidence": {"path": "playbooks/measurement/dense-performance-evidence/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Observe"], ["Accelerator", "Profile"], ["Accelerator", "Verify"], ["RAM/Host", "Verify"], ["Network", "Verify"]]}, + "diagnose-attention-bottlenecks": {"path": "systems/platforms/cuda/diagnose-attention-bottlenecks/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["Accelerator", "Verify"]]}, + "diagnose-vllm-admission-pressure": {"path": "systems/engines/vllm/diagnose-vllm-admission-pressure/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Observe"], ["Accelerator", "Optimize"], ["Accelerator", "Verify"]]}, + "diffusers-invocation-state": {"path": "systems/frameworks/diffusers/diffusers-invocation-state/SKILL.md", "state": "supplementary", "coordinates": []}, + "draft-acceptance-issue": {"path": "workflows/governance/draft-acceptance-issue/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "SKILL.md §§ Steps and Output prepare an acceptance issue, RunSpec, frozen gates and evidence paths; device identifiers are campaign metadata rather than a hardware-resource mechanism."}, + "dwarfstar": {"path": "systems/engines/dwarfstar/SKILL.md", "state": "supplementary", "coordinates": []}, + "evaluate-elastic-serving-placement": {"path": "playbooks/planning/evaluate-elastic-serving-placement/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["Accelerator", "Verify"], ["RAM/Host", "Configure"], ["RAM/Host", "Diagnose"], ["RAM/Host", "Optimize"], ["RAM/Host", "Verify"], ["Network", "Configure"], ["Network", "Diagnose"], ["Network", "Optimize"], ["Network", "Verify"]]}, + "generation-cache-lifecycle": {"path": "systems/engines/mlx-lm/generation-cache-lifecycle/SKILL.md", "state": "supplementary", "coordinates": []}, + "host-memory-management": {"path": "systems/platforms/host/host-memory-management/SKILL.md", "state": "covered", "coordinates": [["RAM/Host", "Configure"], ["RAM/Host", "Verify"]]}, + "host-overhead-optimization": {"path": "systems/platforms/host/host-overhead-optimization/SKILL.md", "state": "covered", "coordinates": [["RAM/Host", "Diagnose"], ["RAM/Host", "Optimize"], ["RAM/Host", "Verify"]]}, + "host-overhead-profiling": {"path": "systems/platforms/cuda/host-overhead-profiling/SKILL.md", "state": "covered", "coordinates": [["RAM/Host", "Diagnose"], ["RAM/Host", "Observe"], ["RAM/Host", "Profile"]]}, + "husky": {"path": "systems/engines/husky/SKILL.md", "state": "unknown", "coordinates": []}, + "inference-benchmark-design": {"path": "playbooks/measurement/inference-benchmark-design/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "SKILL.md §§ Select the task and its evaluation contract, Statistical requirements, Shared-machine measurement discipline, and Search integrity and final-state verification design comparable evaluation; hardware identity and allocation isolation are comparison controls, not a hardware-resource mechanism."}, + "inference-optimization-casebook": {"path": "casebooks/inference/inference-optimization-casebook/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Optimize"]]}, + "inference-task-router": {"path": "tasks/inference-task-router/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "This entry selects a task and its evidence requirements before resource-layer analysis."}, + "kernel-writing-guide": {"path": "playbooks/optimization/kernel-writing-guide/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["Accelerator", "Verify"]]}, + "kv-tier-management": {"path": "systems/engines/lmcache/kv-tier-management/SKILL.md", "state": "covered", "coordinates": [["RAM/Host", "Configure"], ["RAM/Host", "Optimize"], ["SSD", "Optimize"]]}, + "lazy-evaluation-stream-lifetimes": {"path": "systems/frameworks/mlx/lazy-evaluation-stream-lifetimes/SKILL.md", "state": "supplementary", "coordinates": []}, + "lily": {"path": "systems/engines/lily/SKILL.md", "state": "supplementary", "coordinates": []}, + "lithos-metal": {"path": "systems/engines/lithos-metal/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["Accelerator", "Verify"]]}, + "local-dream": {"path": "systems/engines/local-dream/SKILL.md", "state": "supplementary", "coordinates": []}, + "mistral-rs": {"path": "systems/engines/mistral-rs/SKILL.md", "state": "supplementary", "coordinates": []}, + "mlc-llm": {"path": "systems/engines/mlc-llm/SKILL.md", "state": "supplementary", "coordinates": []}, + "mlx-swift-lm": {"path": "systems/engines/mlx-swift-lm/SKILL.md", "state": "supplementary", "coordinates": []}, + "model-sol-analysis": {"path": "playbooks/measurement/model-sol-analysis/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Verify"], ["Network", "Diagnose"], ["Network", "Verify"]]}, + "npu-skill-factory": {"path": "workflows/maintenance/npu-skill-factory/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "SKILL.md §§ Choose the evidence product, Artifact lifecycle, and What this skill does not do define skill-distillation/evaluation methodology; NPU task tiers are evaluation prerequisites, not a hardware-resource mechanism."}, + "optimization-search-policy": {"path": "playbooks/planning/optimization-search-policy/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Optimize"]]}, + "os-process-placement": {"path": "systems/platforms/host/os-process-placement/SKILL.md", "state": "covered", "coordinates": [["OS", "Optimize"]]}, + "performance-ceiling-analysis": {"path": "playbooks/measurement/performance-ceiling-analysis/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Verify"], ["OS", "Configure"]]}, + "plan-activation-residency": {"path": "playbooks/planning/plan-activation-residency/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["Accelerator", "Verify"]]}, + "project-maya": {"path": "systems/engines/project-maya/SKILL.md", "state": "supplementary", "coordinates": []}, + "pytorch": {"path": "systems/frameworks/pytorch/pytorch/SKILL.md", "state": "supplementary", "coordinates": []}, + "reason-hopper-kernels": {"path": "systems/platforms/cuda/reason-hopper-kernels/SKILL.md", "state": "supplementary", "coordinates": []}, + "repository-evolution-analysis": {"path": "workflows/research/repository-evolution-analysis/SKILL.md", "state": "covered", "coordinates": [["OS", "Configure"], ["OS", "Diagnose"], ["OS", "Verify"]]}, + "rsi-evidence": {"path": "workflows/governance/rsi-evidence/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Verify"]]}, + "skill-evolution-playbook": {"path": "workflows/maintenance/skill-evolution-playbook/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "SKILL.md §§ When should one trajectory update a skill?, How large should a skill edit be?, and When should skills split or merge? govern skill-text evolution and held-out evaluation, not hardware-resource state or control."}, + "splash": {"path": "systems/engines/splash/SKILL.md", "state": "supplementary", "coordinates": []}, + "storage-io-measurement": {"path": "systems/platforms/host/storage-io-measurement/SKILL.md", "state": "covered", "coordinates": [["SSD", "Diagnose"], ["SSD", "Observe"], ["SSD", "Profile"], ["SSD", "Verify"]]}, + "task-accuracy": {"path": "tasks/task-accuracy/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "The procedure selects supporting evidence and tests within the caller's declared search space."}, + "task-day-0": {"path": "tasks/task-day-0/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "The procedure selects supporting evidence and tests within the caller's declared search space."}, + "task-debug": {"path": "tasks/task-debug/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "The procedure selects supporting evidence and tests within the caller's declared search space."}, + "task-derived-engine": {"path": "tasks/task-derived-engine/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "The procedure selects supporting evidence and tests within the caller's declared search space."}, + "task-independent-engine": {"path": "tasks/task-independent-engine/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "The procedure selects supporting evidence and tests within the caller's declared search space."}, + "task-performance": {"path": "tasks/task-performance/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "The procedure selects supporting evidence and tests within the caller's declared search space."}, + "task-version-alignment": {"path": "tasks/task-version-alignment/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "The procedure selects supporting evidence and tests within the caller's declared search space."}, + "torch-npu": {"path": "systems/frameworks/torch-npu/torch-npu/SKILL.md", "state": "supplementary", "coordinates": []}, + "torchnpu-device-memory-lifecycle": {"path": "systems/platforms/ascend/torchnpu-device-memory-lifecycle/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["Accelerator", "Verify"]]}, + "torchnpu-pinned-host-memory-lifecycle": {"path": "systems/platforms/ascend/torchnpu-pinned-host-memory-lifecycle/SKILL.md", "state": "covered", "coordinates": [["RAM/Host", "Configure"], ["RAM/Host", "Diagnose"], ["RAM/Host", "Optimize"], ["RAM/Host", "Verify"]]}, + "training-input-pipeline": {"path": "playbooks/optimization/training-input-pipeline/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Observe"], ["Accelerator", "Optimize"], ["RAM/Host", "Configure"], ["RAM/Host", "Diagnose"], ["RAM/Host", "Observe"], ["RAM/Host", "Optimize"], ["SSD", "Configure"], ["SSD", "Diagnose"], ["SSD", "Optimize"], ["Network", "Configure"], ["Network", "Optimize"], ["OS", "Configure"], ["OS", "Optimize"]]}, + "training-resource-budget": {"path": "playbooks/planning/training-resource-budget/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["RAM/Host", "Configure"], ["RAM/Host", "Diagnose"], ["RAM/Host", "Observe"], ["RAM/Host", "Optimize"], ["RAM/Host", "Verify"], ["SSD", "Configure"], ["SSD", "Optimize"], ["Network", "Diagnose"], ["Network", "Observe"], ["Network", "Verify"], ["OS", "Configure"], ["OS", "Diagnose"]]}, + "video-diffusion-optimization": {"path": "playbooks/optimization/video-diffusion-optimization/SKILL.md", "state": "supplementary", "coordinates": []}, + "vllm-ascend": {"path": "systems/engines/vllm-ascend/SKILL.md", "state": "supplementary", "coordinates": []}, + "vllm-metal": {"path": "systems/engines/vllm-metal/SKILL.md", "state": "supplementary", "coordinates": []}, + "weight-loading-optimization": {"path": "playbooks/optimization/weight-loading-optimization/SKILL.md", "state": "covered", "coordinates": [["SSD", "Diagnose"], ["SSD", "Observe"], ["SSD", "Optimize"], ["SSD", "Profile"], ["SSD", "Verify"], ["Network", "Configure"], ["Network", "Optimize"], ["Network", "Verify"]]} + } +} diff --git a/src/inferrsi/knowledge/searchspace_index.py b/src/inferrsi/knowledge/searchspace_index.py new file mode 100644 index 000000000..f86592d76 --- /dev/null +++ b/src/inferrsi/knowledge/searchspace_index.py @@ -0,0 +1,389 @@ +"""Read a matrix coordinate snapshot for an InferRSI source checkout.""" + +from __future__ import annotations + +import hashlib +import json +import re +from collections import defaultdict +from collections.abc import Iterable, Mapping +from dataclasses import dataclass +from pathlib import Path +from types import MappingProxyType + +from ._knowledge_errors import MissingSkillsExtra +from .skill_catalog import _effective, _entry, skill_directories + +LIBRARY = Path("src/inferrsi/knowledge/data/skill_library") +CATALOG = LIBRARY / "skill-index.json" +MATRIX = Path("docs/searchspace-matrix.md") +INDEX = Path("docs/searchspace-index.json") + +RESOURCES = {"1": "Accelerator", "2": "RAM/Host", "3": "SSD", "4": "Network", "5": "OS"} +STAGES = ("Observe", "Profile", "Diagnose", "Configure", "Optimize", "Verify") +STATES = ("covered", "supplementary", "unknown", "not-applicable", "conflict") + + +# The five SearchSpace resource layers are a maintained contract. A renamed +# heading fails generation instead of silently relabelling coverage. +LAYERS = { + "1": "Graphics Card / Accelerator", + "2": "RAM / Host Memory", + "3": "SSD / Storage", + "4": "Communication Card / Network", + "5": "OS / System", +} +HEADING = re.compile(r"^## ([1-5]) · (.+)$") +LINK = re.compile(r"\(([^()\s]*/skill_library/[^()\s]+/SKILL\.md)\)") +BOLD = re.compile(r"\*\*(.+?)\*\*") +CANDIDATE_LINK = r"\[(?P