Repository navigation
Published model cards always carry the Hub's YAML metadata - #25
Merged
Merged
Conversation
Exports made before cards had front matter were uploaded as-is, and Hugging Face showed "empty or missing yaml metadata". hf_upload now adds the front matter, licence section and licence files first. The Llama gate ignores our own LICENSE-BASE-MODEL.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: engagepy <42845567+engagepy@users.noreply.github.com>
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.
Hugging Face showed "empty or missing yaml metadata" on
M37labsorg/ade-extract-3b-v1. The export was made before model cards had front matter, and publishing uploaded it unchanged.Changes
hf_uploadcallsfuse.ensure_card_metadatabefore uploading. It adds whatever is missing: YAML front matter, the licence section with limitations,LICENSE-BASE-MODEL.mdand the upstream licence files. It never adds anything twice._front_matteruses the Hub's licence ids (HUB_LICENCE). Qwen's research licence becomeslicense: other+license_name: qwen-research+license_link, the same as Qwen's own repos. It also addspipeline_tag: text-generation.has_upstream_licence, so our ownLICENSE-BASE-MODEL.mdno longer counts as Meta's licence.Tests
yaml.safe_loadandhuggingface_hub.ModelCardcan read. A second publish adds nothing.LICENSE-BASE-MODEL.mdis present.🤖 Generated with Claude Code