Import a Hugging Face dataset
hf_dataset_import · Built-in action recipeDownload a dataset split from the Hugging Face Hub and save it as an Input asset, ready to annotate.
If you've connected Ellf to your coding assistant, it can set up the action for you: it knows the recipe's settings, can create the datasets and assets it needs and will ask you about anything it can't work out itself.
✳︎Claude Code: Setting up an action
› Set up an Ellf action using the Import a Hugging Face dataset recipe (hf_dataset_import) and help me choose the right settings for my data.- In the app, go to ActionsNew action.
- Select the Import a Hugging Face dataset recipe under Data.
- Fill in the form – you'll need to provide Dataset repo, Text column and Output asset. Everything else has sensible defaults.
- Create the action. It starts on your cluster straight away.
Create the action with ellf actions create and the recipe name. All settings from the form are available as arguments. To view all recipe arguments, run ellf actions create hf_dataset_import --help.
| Argument | Type | Description | Default |
|---|---|---|---|
--name | str | Name of the action | None |
--repo-id | str | Dataset repo: Dataset ID on huggingface.co, e.g. stanfordnlp/imdb. | |
--config | str | Subset (config): Dataset subset name. Leave empty if the dataset has only one. | "" |
--split | str | Split: Split to import, e.g. train or test. | "train" |
--text-field | str | Text column: Column holding the text to annotate. | |
--label-field | str | Label column: Column with an existing label. It is kept in each example's meta as hf_label for reference, and is not shown to annotators as a suggestion. | None |
--meta-fields | List[str] | Extra columns to keep: Columns copied into each example's meta. | None |
--limit | int | Maximum number of rows | 5000 |
--output.name | str | Output asset name | |
--hf-token | str | Hugging Face token: Your own HF token, stored as an Ellf secret. Not needed for public datasets; required for gated and private ones, and recommended beyond trying things out, since anonymous requests share the cluster's rate limit. | None |
--revision | str | Revision: Branch, tag or commit to import. The resolved commit is recorded on the asset. | "main" |
--accept-unknown-license | bool | Import datasets without a declared license: Datasets with no license on their card are refused unless this is enabled. Check the terms yourself before using the data. | False |
--project-id | str | Project ID to add action to. Defaults to your saved project. | None |
--worker-class | str | Worker class to launch the action on, as configured on your cluster | None |