Repository navigation
feat(lane D): Hippius Hub migration to huggingface_hub (king publish + pull-king) - #1058
Merged
Merged
Conversation
…ublish 401) The first live king publish failed with 401 Unauthorized on cascade/laned-king-c4096-5HpKLEju/manifests/main. The Hippius registry (Harbor) answers 401 "un-recognized request" for any call on a repository name with an uppercase letter (anonymous probe: the existing cascade/ckpt-...-king-toto2-4m answers 200, the same name with KING answers 401; a missing lowercase laned-king repo answers 404). hub_repo used the raw mixed-case ss58 prefix. It now lowercases hotkey8 and refuses any result that is not a valid OCI repository name. The publisher and pull-king share hub_repo, so both sides move together; no king was ever published, so no existing repo is renamed. Not upload_file vs upload_folder: both GET manifests/main through the same fetch_manifest(missing_ok=True) (404 tolerated, 401 raised), and the 401 hit the read-back pre-check (hf_hub_download) before any upload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe
…us.com Live 2026-12-01: the Hippius registry API refuses model pushes (manifest PUT 403, "Push models with huggingface_hub: set HF_ENDPOINT=https://hub.hippius.com and use a hip_ key"). The Hub mirror now writes (create, upload, takedown delete) through HfApi(endpoint=HIPPIUS_HF_ENDPOINT or https://hub.hippius.com, token=HIPPIUS_HF_TOKEN) and reads (read-back, list, size) through an anonymous HfApi(token=False) on the same endpoint; endpoint/token are per instance, the global HF_ENDPOINT / HF_TOKEN are never read or set. 401/403 counts as missing on reads only. pull-king reads hub.hippius.com anonymously via HfApi. Lane A/B/C checkpoint pushes/pulls are unchanged (design note in the PR). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…eam first On base it failed with PullError hippius_hub_missing instead of an assertion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe
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.
Why
Live 2026-12-01 21:00 UTC: the Hippius registry API refuses model pushes (manifest PUT 403: "the registry API takes container images, not models … Push models with huggingface_hub: set HF_ENDPOINT=https://hub.hippius.com and use a hip_ key"). The patched king publish (HfApi on hub.hippius.com) succeeded at 21:14: https://hub.hippius.com/cascade/laned-king-c4096-5hpkleju
What (one feature: Hippius Hub migration to huggingface_hub)
cascade/lane_d/mirrors.py;publish.pyvia the folded-in fix(lane D): king Hub repo name is lowercase (first live publish 401) #1057 commit)HfApi(endpoint=HIPPIUS_HF_ENDPOINT or https://hub.hippius.com, token=HIPPIUS_HF_TOKEN)for create_repo / upload_file / takedown delete_file. NoHIPPIUS_HF_TOKEN:MirrorError(HF_TOKEN / HIPPIUS_HUB_TOKEN are not borrowed).HfApi(endpoint=…, token=False)for read-back, list, size (RepoMirror(read_api=),open_live_mirrors(hub_read_api=)).HF_ENDPOINT/HF_TOKENare never read or set, because the validator and trainer use real HF for fallbacks and datasets.HfUriErrorcreate_repo catch from the hot patch is dropped, since HfApi doesn't need it.cascade lane-d pull-king:anonymous_hub_api()returnsHfApi(endpoint=https://hub.hippius.com, token=False)(HIPPIUS_HF_ENDPOINToverrides it). The signature and hash checks are unchanged.cascade/shared/hippius.py): NOT changed. Design note below. Owner decides.Docs: MINER_LANE_D.md (pull-king endpoint, king link), OPERATOR.md (new "Hub credentials for king publication (
HIPPIUS_HF_TOKEN)" paragraph and the king-publish row), LANE_D.md, the king-publish unit template comment.Design note for (3): why upload_dir_to_hub is untouched
Read-only anonymous probes, 2026-12-01:
registry.hippius.comOCIHEAD manifests/sha256:0d7e107f…for lane A kingcascade/ckpt-r824229856147703689-challenger-cascade-moe-v2-120m-u164hub.hippius.com/api/models/<that repo>"digests":["sha256:0d7e107f…"],"sha":"c8e3e78c…"hub.hippius.com/<that repo>/resolve/sha256:0d7e…/config.jsoncascade/laned-king-c4096-5hpklejuon hub API"sha":"ebc14b66…"(40-hex git commit), nodigestsmanifests/mainandmanifests/ebc14b66…So a push through HfApi
upload_folderreturns a git commit sha, not an OCIsha256:digest, and the result is not visible on the OCI registry. As pointers, the released readers would fail both ways:@sha256:→hippius_hub.snapshot_downloadon registry.hippius.com: the repo isn't there (404), and no sha256 digest exists to pin.@hf:<sha>→ releasedfetch_from_hubcallshuggingface_hub.snapshot_downloadwith no endpoint, so it goes to huggingface.co, where the repo doesn't exist.Validators and satellites that never update (owner 2026-11-30) could not read new lane A/B/C checkpoints. This PR stops at (1)+(2) as instructed. Existing
@sha256:pointers stay readable, and their read path is unchanged. Options for the owner:@hh:<commit>(hub.hippius.com revision). It needs a validator release, and the satellites would burn on it.sha256:digest on the registry (the hub already listsdigestsfor OCI-pushed repos).sha256:revisions and commit shas. This is a reader change for every validator.Until then the trainer's
upload_dir_to_hub(hippius_hub OCI push) is expected to hit the same 403. Theupload_dir_to_hub_or_hfHF fallback path is untouched.Tests (torch-free, fake
huggingface_hub.HfApi)tests/unit/test_lane_d_hub_hf_migration.py(14). It covers: writer endpoint and hip_ key per instance;os.environunchanged;HIPPIUS_HF_ENDPOINToverride, neverHF_ENDPOINT; no key → MirrorError; reads anonymous; takedown through the writer; 401/403 → missing on get/size/list; 401/403 on upload/delete raises; fullpublish_kingwith split clients; pull-king anonymous on hub.hippius.com, end to end from the publisher's repo. All 14 fail on origin/main.tests/accept/w10/test_w10_pull_king.py: the anonymous-client test now pinsHfApi(endpoint=hub.hippius.com, token=False)(README contract updated).tests/unit/test_lane_d_hub_repo_lowercase.py.PATHS:
tests/accept/w13/PATHSgains the new test. W10'slane_d_pull_king.pyand docs are already in W10 PATHS.Supersedes #1057 (closed after this PR opened).
🤖 Generated with Claude Code
https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe