title: How to load a finetuned sciBERT model in AllenNLP?
body: <p>I have finetuned the SciBERT model on the SciIE dataset. The repository uses AllenNLP to finetune the model. The training is executed as follows:</p>
  <pre><code>python -m allennlp.run train $CONFIG_FILE  --include-package scibert -s &quot;$@&quot; 
  </code></pre>
  <p>After a successful training I have a model.tar.gz file as an output that contains weights.th, config.json, and vocabulary folder. I have tried to load it in the allenlp predictor:</p>
  <pre><code>from allennlp.predictors.predictor import Predictor
  predictor = Predictor.from_path(&quot;model.tar.gz&quot;)
  </code></pre>
  <p>But I get the following error:</p>
  <blockquote>
  <p>ConfigurationError: bert-pretrained not in acceptable choices for
  dataset_reader.token_indexers.bert.type: ['single_id', 'characters',
  'elmo_characters', 'spacy', 'pretrained_transformer',
  'pretrained_transformer_mismatched']. You should either use the
  --include-package flag to make sure the correct module is loaded, or use a fully qualified class name in your config file like {&quot;model&quot;:
  &quot;my_module.models.MyModel&quot;} to have it imported automatically.</p>
  </blockquote>
  <p>I have never worked with allenNLP, so I am quite lost about what to do.</p>
  <p>For reference, this is the part of the config that describer token indexers</p>
  <pre><code>&quot;token_indexers&quot;: {
              &quot;bert&quot;: {
                  &quot;type&quot;: &quot;bert-pretrained&quot;,
                  &quot;do_lowercase&quot;: &quot;false&quot;,
                  &quot;pretrained_model&quot;: &quot;/home/tomaz/neo4j/scibert/model/vocab.txt&quot;,
                  &quot;use_starting_offsets&quot;: true
              }
          }
  </code></pre>
  <p>I am using allenlp version</p>
  <p>Name: allennlp
  Version: 1.2.1</p>
  <p>Edit:</p>
  <p>I think I have made a lot of progress, I have to use the same version that was used to train the model and I can import the modules like so:</p>
  <pre><code>from allennlp.predictors.predictor import Predictor
  from scibert.models.bert_crf_tagger import *
  from scibert.models.bert_text_classifier import *
  from scibert.models.dummy_seq2seq import *
  from scibert.dataset_readers.classification_dataset_reader import *
  
  predictor = Predictor.from_path(&quot;scibert_ner/model.tar.gz&quot;)
  dataset_reader=&quot;classification_dataset_reader&quot;)
  predictor.predict(
    sentence=&quot;Did Uriah honestly think he could beat The Legend of Zelda in under three hours?&quot;
  )
  </code></pre>
  <p>Now I get an error:</p>
  <blockquote>
  <p>No default predictor for model type bert_crf_tagger.\nPlease specify a
  predictor explicitly</p>
  </blockquote>
  <p>I know that I can use the <code>predictor_name</code> to specify a predictor explicitly, but I haven't got the faintest idea which name to pick that would work</p>