Skip to content

Add hugging-face command support#1411

Open
vycius wants to merge 1 commit into
pulp:mainfrom
vycius:hugging-face-support
Open

Add hugging-face command support#1411
vycius wants to merge 1 commit into
pulp:mainfrom
vycius:hugging-face-support

Conversation

@vycius
Copy link
Copy Markdown

@vycius vycius commented May 31, 2026

Summary

  • Adds a new hugging-face command group backed by the pulp_hugging_face plugin, for managing Hugging Face Hub pull-through caching via Pulp.
  • pulp-glue: new entity contexts — PulpHuggingFaceRemoteContext, PulpHuggingFaceRepositoryContext, PulpHuggingFaceRepositoryVersionContext, and PulpHuggingFaceDistributionContext (all gated on hugging_face >= 0.1.0).
  • CLI: pulp hugging-face with remote, repository, and distribution subgroups (create/show/list/update/destroy, labels, repository versions).
    • remote adds a write-only --hf-token (never returned in API responses) and a --policy option (immediate/on_demand/streamed) for pull-through caching.
    • distribution supports attaching/detaching a remote or repository via --remote / --repository resource options.
  • Registers the plugin entry point in pyproject.toml and adds a deferred-context help-page test case.
  • Ships functional bash test scripts for the remote, repository, and distribution command groups.

Notes

  • PulpHuggingFaceDistributionContext.preprocess_entity only defaults repository/remote to null on create (partial=False), so partial updates no longer detach an attached remote/repository.
  • The distribution update command exposes --base-path, consistent with the other distribution plugins.

Test plan

  • make lint typecheck test
  • Functional: tests/scripts/pulp_hugging_face/test_remote.sh
  • Functional: tests/scripts/pulp_hugging_face/test_repository.sh
  • Functional: tests/scripts/pulp_hugging_face/test_distribution.sh

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

Introduce a thin CLI and pulp-glue layer for the pulp_hugging_face plugin, enabling pull-through caching of Hugging Face Hub content.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant