Repository navigation
rm-core 0.1.2: airm-placement document normative (PROTOCOL §5.4) - #3
Merged
Merged
Conversation
The airm-placement ConfigMap was defined by usage: rm-controller writes it, hetero-llm-d documents and ships its empty default, lmd-top reads it. 5.4 states the format they already agree on (no field changes, protocol stays 0.1): location, fields, roles via workload.kind, card refs by accelerator id, the vendor.model label, the generation rule and forward compatibility. - rm_core.placement: PlacementDocument/Decision model, stdlib validate(doc) -> list[str], parse, build (generation bumps only on change), configmap, is_newer (reader rule) - k8s/airm-placement.schema.json, tested against the code's enumerations and examples - airm.placements conformance also validates the document made from a policy's decisions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gspark-etri
added a commit
that referenced
this pull request
Oct 20, 2026
rm-core 0.1.2: airm-placement document normative (PROTOCOL §5.4)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HUB-12 / roadmap W6: the
airm-placementConfigMap format becomes part of the protocol.Derived from the three existing users
rm-controller/document.py{protocol, generation, updatedAt, placement, decisions[{pool, workload{kind,model,slo,labels}, acceleratorIds, kvTransport, reason}]}; generation bumps only on change; labelairm.ai-computing.io/accelerator: <vendor>.<model>per roledeploy/airm/{"protocol":"0.1","generation":0,"updatedAt":null,"decisions":[]}src/airm.rsdecisions.json, keys decisions bypool/kind, tolerant of missing fields§5.4 states what they all agree on. No field changed, protocol stays 0.1, so this is a patch release (0.1.2) like 0.1.1, and components pinned
rm-core>=0.1,<0.2pick it up.How the requested items map onto the existing format (no new fields were needed):
workload.kind: oneprefill+ onedecodedecision per PD pool; an aggregated (any-role) pool usesserve(anyis not aWORKLOAD_KINDSvalue and is rejected).acceleratorIds=<node>/<vendor>:<index>(=AcceleratorProfile.spec.id); node is the part before/(Decision.nodes).workload.labels["airm.ai-computing.io/accelerator"], as in the node labels; cards must match its vendor.placement/decisions, never down; an unchanged rewrite keeps it. Readers apply only a greater generation (is_newer).updatedAtRFC 3339 UTC,nullonly at generation 0. policy name →placement, required once generation > 0.Changes
PROTOCOL.md§5.4 (MUST/SHOULD), §5.2/§8 pointers, change log 0.1.2src/rm_core/placement.py:PlacementDocument/Decision(to/from dict), stdlibvalidate(doc) -> list[str],parse,build,configmap,is_newerk8s/airm-placement.schema.json(draft 2020-12) for the structure; cross-field rules are documented as validator-onlypython -m rm_core.conformance:airm.placementscheck also builds the document from the policy's decisions (incl. the empty-pool decision) and validates + round-trips ittests/test_placement.py(14 tests): the real documents from all three users, 23 violation cases, unknown-field tolerance, generation rule, ConfigMap parse, schema enums == code enums, schema agreement viajsonschemawhen installedpyproject.toml/__version__, README EN/KO layout + roadmap. Not tagged/released; install pins and badge stay at v0.1.1 until the tag.Verified
python -m unittest discover -s tests→ 27 tests OK (Python 3.11, clean venv withpip install -e .+ jsonschema)python -m rm_core.conformance→ PASS sim, loopback, greedy; with ai-rm's rm-controller installed also PASSairm.placements:topologyexamples/spec.yamlandexamples/hetero-p2p.yaml(placed and unplaceable) validates, andPlacementDocument.from_dict(doc).to_dict() == doc, so switching writers does not bump generation on the live ConfigMaptools/check_sensitive.py .cleanFollow-ups after release (not in this PR)
rm_core.placement(replacerm_controller/document.pywithDecision.from_placement,build,parse,configmap) and pinrm-core>=0.1.2,<0.2.deploy/airm/README.md: says generation is "incremented on every write"; should read "on every change" and link §5.4 instead of restating the format.decisions.jsononly).🤖 Generated with Claude Code