Skip to content

Add hugging-face command support - #1411

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

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

Conversation

@vycius

@vycius vycius commented May 31, 2026

Copy link
Copy Markdown

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

@vycius
vycius force-pushed the hugging-face-support branch from 558a817 to cabe22d Compare June 3, 2026 17:34
@vycius

vycius commented Jun 3, 2026

Copy link
Copy Markdown
Author

Reformated files.

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>
@vycius
vycius force-pushed the hugging-face-support branch from cabe22d to a0a97c9 Compare July 11, 2026 17:06
@ggainey

ggainey commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Hey @vycius - this looks good, but should be separate from the pulp-cli repo, since it's going to need to be maintained by not-the-CLI-team - it should be under some team that is responsible for it. Some options are having it in its own repo (e.g., https://github.com/pulp/pulp-cli-workflow), it could be under the pulp-cli-console repo, it could be a completely separate git-repo from the Pulp organization. We're going to close this PR not because it's "wrong" in any way - just that the CLI team can't own the code!

@ggainey ggainey closed this Jul 29, 2026
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.

2 participants