Skip to content

Document training from Hugging Face DatasetDict splits - #3705

Open
emme1t wants to merge 1 commit into
flairNLP:masterfrom
emme1t:docs/huggingface-datasetdict-3667
Open

emme1t wants to merge 1 commit into
flairNLP:masterfrom
emme1t:docs/huggingface-datasetdict-3667

Conversation

@emme1t

@emme1t emme1t commented Nov 21, 2026

Copy link
Copy Markdown

Refs #3667

The custom dataset tutorial now shows how to pass Hugging Face DatasetDict splits to a Flair Corpus and construct each Sentence when its row is requested. The CoNLL-2003 example preserves token boundaries, decodes part-of-speech labels, and converts BIO tags into Flair spans. A second example uses a sentence-level class label for text classification.

I ran both code blocks from the tutorial. Across all three CoNLL-2003 splits, the converted tokens, POS labels, and BIO tags matched the source for all 20,744 sentences (301,418 tokens and 35,089 entity spans). A Flair SequenceTagger computed a finite loss and nonzero gradients on a batch from the corpus. The classification example recovered both class names from an in-memory Hugging Face Dataset.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant