allenai / kb

KnowBert -- Knowledge Enhanced Contextual Word Representations
Apache License 2.0
370 stars 50 forks source link

Simple Classification Predictor #15

Open AliOsm opened 4 years ago

AliOsm commented 4 years ago

I trained a model for simple text classification, but I can't predict from it because there is no text classification predictor and the built-in predictor can't be used because of conflicts in allennlp package versions.

Any ideas?

AliOsm commented 4 years ago

Hello, this is a kind reminder about this issue Thanks!

matt-peters commented 4 years ago

Can you paste a traceback? That may help debug.

In general there are two ways to predict: (1) you can implement your own predictor, usually it's a few lines of code (see examples in allennlp library) (2) if you want lower level access to the model predictions, you can use something similar to the code in bin/write_wic_for_codalab.py