"model/models/git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "df94175a0fb0356c9b9e9a62b73d908633c08810"
Unverified Commit a38d1c7c authored by sarnoult's avatar sarnoult Committed by GitHub
Browse files

Example NER script predicts on tokenized dataset (#8468)

The new run_ner.py script tries to run prediction on the input
test set `datasets["test"]`, but it should be the tokenized set
`tokenized_datasets["test"]`
parent 069b6384
...@@ -344,7 +344,7 @@ def main(): ...@@ -344,7 +344,7 @@ def main():
if training_args.do_predict: if training_args.do_predict:
logger.info("*** Predict ***") logger.info("*** Predict ***")
test_dataset = datasets["test"] test_dataset = tokenized_datasets["test"]
predictions, labels, metrics = trainer.predict(test_dataset) predictions, labels, metrics = trainer.predict(test_dataset)
predictions = np.argmax(predictions, axis=2) predictions = np.argmax(predictions, axis=2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment