You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change HuggingFace Space default visibility to private for security
Changed the default value of `private` parameter from False to True to follow
security best practices. Private by default prevents accidental exposure of
deployment information.
Changes:
- Set private=True as default in HuggingFaceDeployerSettings
- Updated docstring to indicate default is True for security
- Updated documentation to reflect new default value
- Removed redundant private=True from code example (now default)
- Updated security section to mention both private and public Spaces
- Clarified that secure secrets handling protects credentials even in public Spaces
Users can still explicitly set private=False to make Spaces publicly visible,
but the safer default protects users who don't explicitly configure visibility.
Copy file name to clipboardExpand all lines: docs/book/component-guide/deployers/huggingface.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ For additional configuration of the Hugging Face deployer, you can pass the foll
103
103
104
104
*`space_hardware` (default: `None`): Hardware tier for the Space (e.g., `'cpu-basic'`, `'cpu-upgrade'`, `'t4-small'`, `'t4-medium'`, `'a10g-small'`, `'a10g-large'`). If not specified, uses free CPU tier. See [Hugging Face Spaces GPU documentation](https://huggingface.co/docs/hub/spaces-gpus) for available options and pricing.
105
105
*`space_storage` (default: `None`): Persistent storage tier for the Space (e.g., `'small'`, `'medium'`, `'large'`). If not specified, no persistent storage is allocated.
106
-
*`private` (default: `False`): Whether to create the Space as private. Public Spaces are visible to everyone.
106
+
*`private` (default: `True`): Whether to create the Space as private. Set to `False` to make the Space publicly visible to everyone.
107
107
*`app_port` (default: `8000`): Port number where your deployment server listens. Defaults to 8000 (ZenML server default). Hugging Face Spaces will route traffic to this port.
108
108
109
109
Check out [this docs page](https://docs.zenml.io/concepts/steps_and_pipelines/configuration) for more information on how to specify settings.
@@ -116,7 +116,7 @@ from zenml.integrations.huggingface.deployers import HuggingFaceDeployerSettings
@@ -167,12 +167,12 @@ The Hugging Face deployer handles secrets and environment variables **securely**
167
167
-**Nothing is baked into the Dockerfile** - no risk of leaked credentials even in public Spaces
168
168
169
169
**What this means:**
170
-
- ✅ Safe to use with public Spaces (the default)
171
-
- ✅ Secrets remain encrypted and hidden from public view
170
+
- ✅ Safe to use with both private and public Spaces
171
+
- ✅ Secrets remain encrypted and hidden from view
172
172
- ✅ Environment variables are managed through HF's secure API
173
173
- ✅ No credentials exposed in Dockerfile or repository files
174
174
175
-
This is especially important since Hugging Face Spaces are **public by default**(`private: bool = False`). Without this secure approach, any secrets would be visible to anyone viewing your Space's repository.
175
+
This secure approach ensures that if you choose to make your Space public (`private=False`), credentials remain protected and are never visible to anyone viewing your Space's repository.
0 commit comments