HuggingFace Integration
Installation
pip install foundry-ml[huggingface]Quick Start
Python API
from foundry import Foundry
from foundry.integrations.huggingface import push_to_hub
# Get a dataset
f = Foundry()
dataset = f.search("band gap", limit=1).iloc[0].FoundryDataset
# Export to HuggingFace Hub
url = push_to_hub(
dataset,
repo_id="your-username/dataset-name",
token="hf_xxxxx" # Or set HF_TOKEN env var
)
print(f"Published at: {url}")CLI
What Gets Created
1. Data Files
2. Dataset Card (README.md)
3. Metadata
API Reference
push_to_hub
Parameter
Type
Required
Description
Author Attribution
Examples
Export All Splits
Export Single Split
Private Repository
Using Environment Variable
CLI Options
Best Practices
Repository Naming
Organization
Documentation
Troubleshooting
Authentication Failed
Repository Already Exists
Large Datasets
Last updated
Was this helpful?