Repository navigation
Locate only Hub dataset ids; say when a file link is read - #650
Merged
Merged
Conversation
A model card's datasets: entry gets a Hub download location only when it is a Hub dataset id whose owner is no reserved Hub name; a dataset page URL is named by its id. Any other text keeps its name with no location and is not looked up. The shared rule lives in core/hub_dataset_id.py, used by the card route, the dataset lookup and the GGUF reader. A Hub model URL naming a file or directory (/resolve/main/<file>, /blob/..., /tree/main/<dir>) now says once, on every route, that the SBOM describes the repository, not that file or directory (target-ambiguous/hf-url-path). Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
hub_dataset_page() refuses text with white space or a non-printable character, as stated_url() does: urlsplit drops a tab or a newline. A local model card's datasets: (enrich) is named and located through hub_card_datasets(), so a dataset page and its id are one dataset across the Hub card, GGUF and enrich routes. The display-escape tests expect no location for a card entry that is no Hub dataset id; a library caller's dataset location covers the IRI escape end to end. Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
…own one A local model card's bare name is no Hub id: it gets no location, only a dataset page does (named by its id). A page entry's name provenance is one record (Source, Field: datasets, Method: hub_dataset_id), built with the provenance builders. A card entry naming a dataset an earlier source gave fills that dataset's unset fields (merge_dataset_into), and within a card a later page locates an earlier bare entry. Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
…flict ReadmeEnricher keeps its pylint suppression above the class. A dataset conflict from a local card names the model as its reader does (dataset_model, now in core.dataset_merge). Two spellings of one Hub dataset page (http/https, a trailing slash) are one download location. A local card's page entry is cited with the Hub route's field wording. The docs say a loom enrich fragment does not carry a fill of a dataset the model already names. Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
- dataset_merge._differ compares download URLs that are one Hub dataset page by dataset_key, so scheme, case and a trailing slash are no conflict. - loom enrich says once per dataset, in an INFO line (field-not-recordable/fragment), that a model card's download location for a dataset the model already names is written with --enrich but not carried in the fragment. Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
A dataset location dropped from an enrichment fragment is a deviation the user can act on, so it is a WARNING with an action (rule R1), not an INFO outlier. Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
enrich_model() now names generate_model_sbom(enrich=True), not the --enrich flag, as what records a dataset location the fragment drops. Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
bact
changed the base branch from
ccr-5d41e097-sud42y-hub-routing-refusals
to
main
December 3, 2026 11:56
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com> # Conflicts: # CHANGELOG.md
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com> # Conflicts: # CHANGELOG.md
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #650 +/- ##
=======================================
Coverage 99.98% 99.98%
=======================================
Files 544 545 +1
Lines 35609 35697 +88
Branches 5018 5028 +10
=======================================
+ Hits 35602 35690 +88
Misses 4 4
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Follow-up to #604/#636 (round-2 review, 0.25.2). Stacked on #641.
datasets:entry that is no Hub dataset id (free text, reserved owner) keeps its name and gets no made-uphuggingface.co/datasets/...location; a dataset page URL is named by its id./resolve/main/x.gguf,/tree/main/sub) saystarget-ambiguous/hf-url-path: the SBOM describes the repository, not that path.All 164 HF fixtures byte-identical; regression tests fail on the base.
Generated by Claude Code