rebase.HuggingFacePublishConfig
Configure Hugging Face publication during model deployment.
Signature
class rebase.HuggingFacePublishConfig(
repo_id: str,
*,
private: bool = True,
repo_type: str = "model",
artifact_path: str | pathlib.Path | None = None,
path_in_repo: str | None = None,
revision: str = "main",
token: str | None = None,
create_repo: bool = True,
include_source: bool = True,
sync_source_git: bool = True,
allow_patterns: str | list[str] | None = None,
ignore_patterns: str | list[str] | None = None,
delete_patterns: str | list[str] | None = None,
commit_message: str | None = None,
)Parameters
| Parameter | Type | Description |
|---|---|---|
repo_id | str | Hugging Face namespace/name, for example rebase/add-numbers. |
private | bool | Create the repo as private when it does not already exist. Set False for public open-source publication. |
repo_type | str | model or dataset. |
artifact_path | `str | Path |
path_in_repo | `str | None` |
revision | str | Hub branch or revision to publish to, default main. |
token | `str | None` |
sync_source_git | bool | Record a matching source Git commit on the Rebase publication when the model version has clean Git metadata. Publication still works when Git metadata is absent or dirty. |
Example
model.deploy(
huggingface=rebase.HuggingFacePublishConfig(
repo_id="rebase/add-numbers",
private=False,
artifact_path="./artifacts/add-numbers",
),
)
