fix: int8-static artifact publishes under its own id - #226
Merged
Merged
Conversation
publish_model derives the canonical filename from metadata id+precision; with the base id the static zip's canonical name is ara-diac-small-2.1-int8.zip — identical to the shipped dynamic-int8 asset, so publishing would clobber it. The id now carries the variant inside the slug (schema ids must end in major.minor): ara-diac-small-int8static-2.1 -> canonical ...-int8.zip, distinct.
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.
What
One-line fix, hot on the heels of #224: the int8-static artifact must publish under its own id.
publish_model.pyderives the canonical published filename from the zip metadata'sid+precision. With the base id, the static zip's canonical name becomesara-diac-small-2.1-int8.zip— identical to the shipped dynamic-int8 asset — so publishing would clobber it (asset re-upload under the same name, models.yaml entry replaced: the dynamic variant would be gone).The id now carries the variant inside the slug (
ara-diac-small-int8static-2.1→ canonicalara-diac-small-int8static-2.1-int8.zip). Slug placement is forced by the schema: ids must end inmajor.minor. Fixture spec extended to pin the id contract.Spec
test_static_zip_declares_int8_and_validates_strictnow assertsid == fixture-int8static-1.0alongside the strict-validation pass (the strict gate exercises the schema id rule itself — the first cut of this fix,fixture-1.0-int8static, was caught exactly there).