Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(TF)DistilBertForTokenClassification requires the 🤗 Datasets library #480

Open
msusol opened this issue Mar 18, 2024 · 0 comments
Open

Comments

@msusol
Copy link

msusol commented Mar 18, 2024

Collision with datasets import created by the following assignment statement.

datasets = load_dataset("conll2003")
...
tokenized_datasets = datasets.map(tokenize_and_align_labels, batched=True)
...
train_set = model.prepare_tf_dataset(
    tokenized_datasets["train"],
    shuffle=True,
    batch_size=batch_size,
    collate_fn=data_collator,
)

"TFDistilBertForTokenClassification requires the 🤗 Datasets library"

Fixed simply by..

conll = load_dataset("conll2003")
...
tokenized_datasets = conll.map(tokenize_and_align_labels, batched=True)

Effects:

  • notebooks/examples/token_classification-tf.ipynb
  • notebooks/examples/token_classification.ipynb
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

No branches or pull requests

1 participant